floridaflatlander Posted April 10, 2014 Share Posted April 10, 2014 I keep getting an unknown column error and I've been staring at this for hours. I've checked and double checked the column names(all are lower case) even copied and pasted them from the table to the sql but I keep getting the same error. When I remove the referral_code = fa4cc5218dc647ee7345c84103938812 it works but I need that to update the right record. The sql is UPDATE emails SET joined = 1, id = 80 WHERE referral_code = fa4cc5218dc647ee7345c84103938812 AND mem_id = 26 errorUnknown column 'fa4cc5218dc647ee7345c84103938812' in 'where clause Thanks in advance s Link to comment https://forums.phpfreaks.com/topic/287677-unknown-column/ Share on other sites More sharing options...
Barand Posted April 10, 2014 Share Posted April 10, 2014 Use quotes round the string value or SQL thinks it is a column name UPDATE emails SET joined = 1, id = 80 WHERE referral_code = 'fa4cc5218dc647ee7345c84103938812' AND mem_id = 26 Link to comment https://forums.phpfreaks.com/topic/287677-unknown-column/#findComment-1475699 Share on other sites More sharing options...
floridaflatlander Posted April 10, 2014 Author Share Posted April 10, 2014 Thanks that did it Link to comment https://forums.phpfreaks.com/topic/287677-unknown-column/#findComment-1475707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.