Click to See Complete Forum and Search --> : Can Javascript access localhost MySQL database?
ljcharlie
11-30-2004, 10:45 AM
I'm building a photogallery. I like to know if Javascript can access my localhost MySQL database. If so, will someone point me to a documentation that talks about connecting to mysql database and retrieving information from the database?
Thank you,
ljCharlie
mitya
11-30-2004, 11:05 AM
Nope, JS can't work server-side. You'd need a go-between such as PHP to feed it to JS.
ljcharlie
11-30-2004, 11:11 AM
Many thanks for the response. Yes, that is what I'm afraid the answer will be. I already got my photo gallery to work using PHP but it's quite slow so that is why I wonder if JS can do it.
Well, thanks again.
ljCharlie
mitya
11-30-2004, 11:24 AM
yeah, it's illogical if you think about it, because JS happens post-html, within the confines of a page. real time. SQL requires going back to pre-html, server-side.
Have fun.