Hi,
I have a problem i don't know how to start with a searching on height. I have member profiles on my websites and i want visitors to search on height like > 4ft <6ft.
Anyone an idea how i best can start with this?
Searching on height function
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You mean take data from your database only within a given range?
Unsanitized example (Could enter a negative range by accident).
Unsanitized example (Could enter a negative range by accident).
Code: Select all
$start = 4;
$end = 6;
$query = "SELECT * FROM `table` WHERE `height` > $start AND `height` < $end ORDER BY `height`";
$results = mysql_query($query);- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia