Jump to content

Newb Question?


biscutty

Recommended Posts

How can I extract the actual value of customerID to a variable from the result of the following query?

 

:?

 

PHP:

--------------------------------------------------------------------------------

 

$result = @mysql_query(\"SELECT customerID FROM customers WHERE dirNAME = \'.$jclogin.\'\");

 

--------------------------------------------------------------------------------

 

 

Thanks

?>[/code]

Link to comment
https://forums.phpfreaks.com/topic/869-newb-question/
Share on other sites

[php:1:5c656c3b10]

$result = @mysql_query(\"SELECT customerID FROM customers WHERE dirNAME = \'.$jclogin.\'\");

if (!$result) { echo mysql_errno().\": \".mysql_error().\"n\"; exit; }

 

$custdata = mysql_fetch_array($result);

$customerID = $custdata[customerID];

[/php:1:5c656c3b10]

Link to comment
https://forums.phpfreaks.com/topic/869-newb-question/#findComment-2898
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.