List:General Discussion« Previous MessageNext Message »
From:Martin Edelius Date:August 2 1999 4:08pm
Subject:SV: Error in SQL statement? Where?
View as plain text  
>I'll add some more printf() debugging to the script and see what
>happens.

I added some error checking to the script that actually inserts any data
into the DB. The query is like this (again in PHP3):

$ok=mysql_query("replace posts (name, email, topic, post, id, parent,
originator, number) values (\"$name\",
\"$email\",\"$newtopic\",\"$newpost\", $id, $parent, $originator, 0)");

I get this error in return:

1064 -- parse error near 'posts (name, email, topic, post, id, parent,
originator, number) values ("Martin' at line 1

And it doesn't matter if I remove the semicolon or not, I still get the
same error.

I have no idea how either PHP or MySQL is configured/compiled on the
server this doesn't work on, my devel server, on which this works, is
SOOTB (straight out of the box). Could magic_quotes have anything to do
with this? I haven't had the need to fool around with any parameters so
I'm not very well versed in what they do...

Again, any and all ideas are much appreciated.


Best regards,
Martin Edelius

Spirex Digital Design

--------------------------------
www: http://www.spirex.se
Mail: martin.edelius@stripped
Phone: +46-31-514651, 0708-113711
Fax: +46-31-514331
S-422 43 Hisings Backa
--------------------------------



Thread
SV: Error in SQL statement? Where?Martin Edelius2 Aug
  • SV: Error in SQL statement? Where?Jani Tolonen3 Aug