Jump to content

Quick SELECT problem


DenchyKins

Recommended Posts

I have a slight problem, i think the answer is staring me in the face but i can't work it out:

 

  $required_funeral_ID = mysql_query("SELECT FuneralID FROM customer_table WHERE CustomerID = '184'");
    echo $required_funeral_ID ;
  

 

Now instead of echo - ing an ID, im getting Resource id#3, ive made sure that there is only one customerID = 184 and that this does have a funeralID, everything is spelled correctly, why am i not gettin my ID out of this query??

 

Link to comment
https://forums.phpfreaks.com/topic/95874-quick-select-problem/
Share on other sites

try

$result = mysql_query("SELECT FuneralID FROM customer_table WHERE CustomerID = '184'");
$required_funeral_ID = mysql_result($result, 0, 0);

 

your $required_funeral_ID was the query result resource, not the content of the results

Link to comment
https://forums.phpfreaks.com/topic/95874-quick-select-problem/#findComment-490847
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.