chuckbridges
Programmer
I am completely new to SQL
I connect to the database ok and the table is phpSP_users
when I run this statement or others changed a bit I either get the "Blah" or id = 24 Resource id #7 Thank you!
I am looking to get the info on userID 24 which is am sure $ID equals...
The odd part is on the cpanel if I put in some of this SQL in the PHPSQL form it seems to work but on my web page
I get a Resource message?
$sql = "SELECT * FROM phpSP_users WHERE userID = '$ID'";
$result=mysql_query($sql) or die("Blah");
echo "id =", $ID;
echo "\n";
echo "\n";
echo $result;
echo "\n";
echo "Thank you!\n";
?>
Here is what I am trying to do, I want to look up a user by their current id which is in $ID and check it agaist the userID field in the table, if it matches I want to get some what to say ok do update their email field which is in the variabel $email ???
Thanks a million
I connect to the database ok and the table is phpSP_users
when I run this statement or others changed a bit I either get the "Blah" or id = 24 Resource id #7 Thank you!
I am looking to get the info on userID 24 which is am sure $ID equals...
The odd part is on the cpanel if I put in some of this SQL in the PHPSQL form it seems to work but on my web page
I get a Resource message?
$sql = "SELECT * FROM phpSP_users WHERE userID = '$ID'";
$result=mysql_query($sql) or die("Blah");
echo "id =", $ID;
echo "\n";
echo "\n";
echo $result;
echo "\n";
echo "Thank you!\n";
?>
Here is what I am trying to do, I want to look up a user by their current id which is in $ID and check it agaist the userID field in the table, if it matches I want to get some what to say ok do update their email field which is in the variabel $email ???
Thanks a million