|
I need to add it to forum profiles avatars
We have a forum (Php) for our school cadets and want to know how to make available in search
cadets in age range.
in our forum database Mysql there is no feild of age. but it out puts age of cadet through a code
which calculates cadet's age from db feilds cadet_birthday,
cadet_birthmonth and cadet_birthyear
and in profile it says
cadet
name: lalit
age : 16
gendre : male
class: 8th
can you tell me how to make a mysql search code for searching cadets for a particular range like e.g.
search cadets
gender=emale
age= 10 to 15
php code :
<?php
$max_results = 10;
$from = (($page * $max_results) - $max_results);
$get_results = mysql_query("SELECT * FROM cadetforum_users WHERE cadet_gender='".$_GET['gender']."' AND cadet_class='".$_GET['class']."' AND cadet_rank='".$_GET['rank']."' AND cadet_section='".$_GET['section']."' AND active_status='".$_GET['online']."' AND profile_picture='".$_GET['picture']."' LIMIT $from, $max_results");
?>
Regards,
hitesh
Last edited by hitesh123; 08-22-2007 at 01:48 AM..
|