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. Quote 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 '=='. Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.