Jump to content

Outputting wrong data from a query


cliftonbazaar

Recommended Posts

The code I have is

$check_email = mysql_query("SELECT CustomerID FROM customers WHERE email='[email protected]'");
  echo $check_email."<br>";

 

The echo line is there for debugging purposes and it displays "Resource id #2" when it is run - but I want the line to display 'customerID' which is a number (in this case it should show '1' so I have no idea why it says what it says).

Please note that the email address [email protected] is in the database for testing purposes.

Link to comment
https://forums.phpfreaks.com/topic/153431-outputting-wrong-data-from-a-query/
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.