order by

0 MAYANK JINDAL · April 30, 2015
what is the meaning of order by??

Post a Reply

Replies

Oldest  Newest  Rating
0 Peer Ligthart · April 30, 2015
When retrieving data from a database you can order the data retrieved, ae:

Database Structure:
idcountry_nameprice
1Australia123
2USA111
3Poland222
4321


$sql = "SELECT * FROM countrys ORDER BY country_name";

It would order the data when retrieving it with the query:

idcountryprice
1Australia123
4Holland321
2USA111
3Poland222

I hope this helped you, for more information about databases: http://www.w3schools.com/php/php_mysql_intro.asp
  • 1

PHP

107,248 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators