The forums have permanently moved to
forum.kirupa.com. This forum will be kept around in read-only mode for
archival purposes. To learn how to continue using your existing account on the new forums,
check out
this thread.

Not really; Javascript is a client-side language and you need to communicate with the server to use a SQL query. Try Googling ‘Ajax’, and you’ll find some interesting results which request data from the server in a similar manner to what you’re looking for.

(That’s not to say that a MySQL driver for Javascript is inherently wrong, it’s just awkward and has never been implemented. Essentially, it’d use Ajax to the server the site was running on, but I suppose connect on a MySQL port and just make plain ol’ text requests and responses. Funky!)