ActaNonVerba1 Posted February 7, 2011 Share Posted February 7, 2011 Can someone explain why this code: if (mysql_result($data,0,$SQLLargeName) = " "){ $LargeImage = "#"; } else { $LargeImage = mysql_result($data,0,$SQLLargeName); } Gives me this error? Fatal error: Can't use function return value in write context in /home/worldw44/public_html/SQL.php on line 38 And ways round it? Thanks. Link to comment https://forums.phpfreaks.com/topic/226995-just-trying-to-see-if-a-value-exists-in-my-sql/ Share on other sites More sharing options...
Maq Posted February 7, 2011 Share Posted February 7, 2011 A single '=' is used to assign. You need to compare '=='. Link to comment https://forums.phpfreaks.com/topic/226995-just-trying-to-see-if-a-value-exists-in-my-sql/#findComment-1171163 Share on other sites More sharing options...
ActaNonVerba1 Posted February 7, 2011 Author Share Posted February 7, 2011 A single '=' is used to assign. You need to compare '=='. Amateur mistake, thanks! Link to comment https://forums.phpfreaks.com/topic/226995-just-trying-to-see-if-a-value-exists-in-my-sql/#findComment-1171186 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.