I need age limit search script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
honeybeeuk
Forum Newbie
Posts: 1
Joined: Tue Jun 29, 2010 12:06 pm

I need age limit search script

Post by honeybeeuk »

I need age limit search script like age between 25 to 35. After searching display found records.
Regards
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: I need age limit search script

Post by AbraCadaver »

Code: Select all

$result = mysql_query("SELECT * FROM `table` WHERE `age` BETWEEN 25 AND 35");

while($row = mysql_fetch_assoc($result)) {
   echo $row['field'];
   //etc...
}
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply