View Single Post
Old 06-06-2005   #1 (permalink)
Space Cowboy
Registered User
 
Space Cowboy's Avatar
 
Join Date: May 2005
Location: England (South)
Posts: 40

Selecting from table

Ok im back again, im trying to make a script select a value from "Race" in my SQL database when given the username. I've bein trying to work it out for my self but so far im useless with SQL Querys
Code:
//SQL Querys
$sql = "SELECT * FROM $login_table WHERE username = '$username' AND Race";
Will ^^^ That code select the Race from the table givven the Username!

Then last bit here i want to make it output something Like this, where if the race = human it tells flash race is o and sends the race back to flash!
Code:
IF $Race=Human 

echo "checkrace=good"; 
echo "race=$race";
else

echo "checkrace=bad";
Space Cowboy is offline