sql syntax error

From: Date: Wed, 29 Jan 2003 03:46:13 +0000
Subject: sql syntax error
Groups: php.db 
Request: Send a blank email to php-db+get-25218@lists.php.net to get a copy of this message
hello, i can not pinpoint this. your time and help is very much appreciated. best, addison Error: id=, HTTP_POST_VARS=Array, key=, value=, category=, subcategory=, logname=addison@bellsouth.net Error in query: insert into ads values (year,make,model,color,mileage,condition,price,other,contact,next_,,created) values ('',,NOW()),Error:You have an error in your SQL syntax near 'created) values ('',,NOW())' at line 1 Code:
else                                                        {                                                                    foreach($HTTP_POST_VARS as $column_name => $column_value)
        $column_names .= $column_name . ',';
        $column_values .= "'$column_values',";
        $query = "insert into ads values ($column_names,created)
          values ($column_values,NOW())";
        $result = mysql_query($query)
                   or die ("Error in query: $query,Error:" .mysql_error());
        }
?> -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 addison@bellsouth.net info@smipco.com subsidiaries of small independent publishing co. info@gloabaldog.com info@momandpocentral.com

« previous php.db (#25218) next »