I'm sure this should be so easy but I can't for the life of me get it to work correctly...
What I'm trying to do is have a user make a race choice (this is for a game engine btw) which is passed back in $race_id.
All rows in the db with a race_id equaling that of $race_id and 0 should be shown on another page for the end user.
This is the basic select statement that I thought should work ok...but it never quite grabs everything from the db....so I think there is something really silly I've missed here.
Eg.
$race_id = intval($HTTP_POST_VARS['race']);
$sql = "SELECT race_desc FROM php_test_table
WHERE race_id = 0
AND race_id = $race_id ";
if (!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, 'Error');
}
Could someone tell me if this should work ok or if there is something silly I've missed.
Thanks in advance. 🙂