Hi.this is order by ascending and descending order to alphabets and number .this very a simple to PHP MySQL .if order by ascending ("ORDER BY FILED_NAME ASC") or order by descending ("ORDER BY FILED_NAME DESC") ..,
ORDER BY Ascending
<?php
$select= mysql_query("SELECT * FROM table_name ORDER BY filed_name ASC"); ?>
$select= mysql_query("SELECT * FROM table_name ORDER BY filed_name ASC"); ?>
ORDER BY Descending
<?php
$select= mysql_query("SELECT * FROM table_name address ORDER BY filed_name DESC");
?>
$select= mysql_query("SELECT * FROM table_name address ORDER BY filed_name DESC");
?>
filed_name:
table filed name exaple id,name ,email and etc....
No comments:
Post a Comment