Networking, Programming and Graphics Tutorials

MySql select * from [2/2]

In next example we will extend the query to more complex and specific query.

This query will return you all male personal, ordered by age and will start from old to young mans.

<?php
$query
="select `id`, `name` from `staff` where `sex`='male' order by `age` desc";
$result=mysql_query($query);
?> 
And the above example will return you:

ID Name Sex Age
4 Peter Trump Male 46
1 John Smith Male 33
Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - MySql select * from [2/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: select inside select mysql  mysql SELECT from select query  mysql select inside select  "select from (select" mysql  php select from mysql SELECT * FROM  php select from mysql SELECT * FROM  mysql "select from select"  php mysql select  mysql select * from where and