StanLytle Posted November 2, 2008 Share Posted November 2, 2008 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 More sharing options...
corbin Posted November 2, 2008 Share Posted November 2, 2008 http://php.net/mysql_fetch_assoc Link to comment https://forums.phpfreaks.com/topic/131053-solved-query-returns-nothing/#findComment-680439 Share on other sites More sharing options...
StanLytle Posted November 2, 2008 Author Share Posted November 2, 2008 Thanks. I didn't know it would have to be output as an array. Link to comment https://forums.phpfreaks.com/topic/131053-solved-query-returns-nothing/#findComment-680521 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.