terrid Posted October 6, 2010 Share Posted October 6, 2010 Hi Any ideas why the following is giving me an error: $result = mysql_query("update records_table set logo_id = (select id from logos where name = substring(retailer_message,12))"); Thanks Quote Link to comment https://forums.phpfreaks.com/topic/215283-mysql-error-in-query/ Share on other sites More sharing options...
kickstart Posted October 6, 2010 Share Posted October 6, 2010 Hi What is the error you are getting? All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/215283-mysql-error-in-query/#findComment-1119564 Share on other sites More sharing options...
BlueSkyIS Posted October 7, 2010 Share Posted October 7, 2010 you need to quote the value in your sub-select. Quote Link to comment https://forums.phpfreaks.com/topic/215283-mysql-error-in-query/#findComment-1119786 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.