Jump to content

[SOLVED] Query returns nothing.


StanLytle

Recommended Posts

This looks simple, but it doesn't work.  I get no output what so ever, not even an error message.  The page does connect to the database, I've tried existing queries that do work.  $NewPhotoID is valid, it contains a value, I've checked.  Field names and table name are correct and spelled correctly.

 

$sql = "SELECT FileName FROM Photos WHERE PhotoID = $NewPhotoID";

$result = mysql_query ($sql);

print $FileName;

 

My server is running:

php version 5.2.6

mysql version 5.0.51a-community

Link to comment
https://forums.phpfreaks.com/topic/131053-solved-query-returns-nothing/
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.