Can I get records from MySql database using jQuery?

Is this possible, and how can I do this?

+3
source share
3 answers

Yes, but using ajax and the server side of the script. jquery and JS do not support MySQL connection.

+3
source

Not directly, but you can use Ajax to extract content from a server-generated page. Here's how to use Ajax with jQuery .

+2
source

:

, . JavaScript- , MySQL . -Javascript - (pfewww!:).

:

-- ( RESTful) json:

"" Ruby on Rails:

List of all users issued as a GET request. Creates a new user when it is issued as a POST.

/users.json 

Returns the user with database id 1 when issued as a GET request. Updates the user with database identifier 1 when a PUT request is issued. Deletes an object when issuing a DELETE request.

/users/1.json

The returned json code (JavaScript Object Notation) can be easily parsed using eval () in JavaScript. So here you can access your database using jQuery in semi-direct form :)

Hope this helps

+2
source

Source: https://habr.com/ru/post/1708937/


All Articles