Networking, Programming and Graphics Tutorials

How to make SQL SELECT query [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 - How to make SQL SELECT query [2/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: PHP make the query - select  make 2 select in one query in php  how to make a select query in php  how to make a select query  mysql how to make a select query php  how to make select query in mysql  mysql select query inside update query  usings select query inside update query  select inside mysql select query  query mysql select dalam select  select from select query mysql  update query+select query+php  php select make  make