Heres the situation, a variable, $username is set to “scott” or something. then these lines happen:
$query = mysql_query("SELECT * FROM users WHERE username='$username'") or die(mysql_error());
print_r(mysql_fetch_array($query));
This prints our the following, which is what is in the table at the time.
( [0] => 1 [userid] => 1 [1] => 0 [username] => 0 [2] => 0 [password] => 0 [3] => 0 [email] => 0 [4] => 1346924695 [time] => 1346924695 )
How can i fix this? Thanks
Please check the data type of all. Guess everything is in
int.You can do it in MySQL Console as:
You might need to re-up all the rows!