Re: What's wrong with this query?

From: Date: Thu, 26 Feb 2004 18:51:09 +0000
Subject: Re: What's wrong with this query?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-33156@lists.php.net to get a copy of this message
Actually, yes, a thousand times is an obvious exaggeration, but I have done a whole lot of times, and the query syntax is the query syntax. Different don't make it wrong. This is working in several other places throughout this particular set of scripts. Paul Fitz wrote:
You haven't done that a thousand times - the syntax is wrong :). You are using a combo of INSERT and UPDATE syntax there. Try INSERT INTO log (term, returns, time, date, ip) VALUES ('$search', '$arrayword',CURTIME(), CURDATE(), '$ip'); Cheers, Paul -----Original Message----- From: Axel IS Main [mailto:nfzgrld@axelis.com] Sent: Thursday, February 26, 2004 7:06 PM To: PHP-DB Subject: [PHP-DB] What's wrong with this query? I've just tried to do something I've done a thousand times. It does not work. I've checked all of the syntax, made sure the field and variable names are correct. No matter what I do it just doesn't work. The table remains empty. Here's the query: $logit = mysql_query("INSERT INTO log SET term='$search', returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'"); Now that doesn't look too difficult does it? Well, apparently it's impossible! I'm really hoping someone out there can see something that I missed. Nick


« previous php.db (#33156) next »