Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Below I can not figure out the issue Please HELP

Status
Not open for further replies.

chuckbridges

Programmer
Apr 15, 2005
19
US
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

 
Sorry, you'll have to reword that; it's hard to figure out what you're trying to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top