samsbc12 Posted June 30, 2007 Share Posted June 30, 2007 I am trying if ($REQUEST_METHOD=="POST") { mysql_query('REPLACE INTO info_comments (Id, Text, isOn) VALUES (1, "'.mysql_escape_string($aboutus).'", $isOn)') or die(mysql_error()); } a but I get error Unknown column '$isOn' in 'field list' any ideas Link to comment https://forums.phpfreaks.com/topic/57804-replace-into/ Share on other sites More sharing options...
bubblegum.anarchy Posted June 30, 2007 Share Posted June 30, 2007 Pretty much just switch the double and single quotes. settype($isOn, "integer"); mysql_query($query = " REPLACE INTO info_comments (Id, Text, isOn) VALUES (1, '".mysql_escape_string($aboutus)."', {$isOn})") or trigger_error(mysql_error()."<PRE>".$query."</PRE>", E_USER_ERROR); Link to comment https://forums.phpfreaks.com/topic/57804-replace-into/#findComment-286423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.