Run sql - mysql - code everytime my page is updated
Were in my php code do I have to put this lines:
**$sql = ''
. ' ALTER TABLE `equipos5a6f`'
. ' ORDER BY `ganados` DESC';**
In or开发者_StackOverflow中文版der to make that happen everytime the page is refreshed.
Any performance boost you get from the ALTER TABLE ... ORDER BY
statement is going to be negated by running it every page request.
First you need to make a connection to your database (depend on wich database you are using : phpMyAdmin, EasyPHP, Oracle...) And then make a request. I suggest you to look at this website.
How to make a connection and request with PHP to MySQL
Maybe it will be more clear
Good Luck!
精彩评论