how to get mysql data with jquery in php mvc [closed]

-1

I am a newbie in programming and I am learning php mvc without any framework, my questions are, should I ask the model or the controller ?, and what script should I load with jquery to get that data without reloading the page?

    
asked by Giovanny Garcia Holguin 14.09.2017 в 23:44
source

2 answers

0

Database queries are made in the MODEL layer. While you can implement MVC from scratch, there are some frameworks that can help you to use MVC in php, such as codeigniter, laravel, phalcon, etc. MVC Framework: link

To obtain the data without reloading the page you use AJAX, jQuery you have different ajax functions that will simplify you and facilitate the use of ajax, such as $ .ajax, $ .get, $ .post, etc. This link can give you more reference: link

Luck.

    
answered by 15.09.2017 / 03:39
source
0

The queries to the Database are made in the Model, the controller contains the necessary code to respond to the actions that are requested in the application. However you could find that in google, this website is to help resolve code errors, so I urge you not to ask questions of that style. The community has a very good disposition in that sense, they have always helped me: D. I hope it serves you.

    
answered by 15.09.2017 в 01:54