When returning to the main page of my script sometimes I'll get the
following error:
Warning: mysql_fetch_array(): 8 is not a valid MySQL result resource in
/home/nick/http/search/includes/main.inc on line 13
This happens only AFTER the first element in the resource has been
processed. Here's
Error trapping is not really relevant here as the server is properly
configured so the errors are going to show up in either event. In fact,
using the die() function on my server just makes thing worse. In any
case, the var_dump was a good idea as I was able to find out that what
is happening i
What you propose makes sense of course, but no matter what I do, where I
send the errors, even to the system log, the mysql_fetch_array () error
is the only one that shows up. It would appear that either the query is
failing is some way that PHP isn't recognizing, or the fetch isn't
working pro
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='
ing that's going wrong. If nothing is apparent,
post
the results of echo $sql back to the list and maybe one of us will find
something.
HTH.
Rich
-Original Message-
From: Axel IS Main [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 2:37 PM
To: PH
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 Messag
,
time=CURTIME(), date=CURDATE(), ip='$ip'";
echo $sql;
$logit = mysql_query($sql) or
die(mysql_error());
And check out what gets spit out to the browser when $sql is echoed? Maybe
that'll point out something that's going wrong. If nothing is apparent, post
the resu
Ok, ok. I get the message about the syntax. Since I've used this syntax
for a long time and so far there hasn't been a problem I'll assume
that's not the problem. I will, however, review this and probably make
some changes for the sake of compliance if nothing else. In any event,
the syntax is