View Single Post
Old 11-27-2003, 10:24 AM   #4 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Nitro - actually you're only half correct. You would need single quotes around a string you want to compare, e.g.
PHP Code:
$sql "SELECT * FROM table WHERE name = '$username'";

// or
$sql "SELECT * FROM table WHERE name = 'bdl'"
The `backtick` only works for selecting column names, not values. You must use single quotes.
bdl is offline   Reply With Quote