Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Mysql with JQuery without using php

Tags:

jquery

mysql

I'm very new to JQuery, but I was told the one of the cool things about it is you can query a mysql database right from an html page(or in my case a smarty template)with out needing php.

I have not found any examples of this so I am asking if someone has one? Thanks

like image 662
Miek Avatar asked Apr 26 '10 19:04

Miek


3 Answers

Let's hope that you continue not to find any examples of this. By necessity, DB access is kept away from the client. Imagine the mayhem if users could pop open your JS and start firing arbitrary queries/commands at your DB.

like image 52
spender Avatar answered Nov 13 '22 16:11

spender


This is not possible.

You might be hearing about the HTML5 Web SQL Database standard.

like image 24
SLaks Avatar answered Nov 13 '22 16:11

SLaks


Nope, you're misinformed. This is definitely not possible. You will always need a server-side language to access a remote database, JQuery is not built to do this.

JQuery is able to parse RSS feeds, JSON and XML documents without a server-side language (related questions e.g. here and here). Maybe that is what you mean?

like image 6
Pekka Avatar answered Nov 13 '22 15:11

Pekka