In the future, to make things easier on yourself, when you get a query
syntax error add an "echo $sql;" line right before your query.
Almost every time I have a query problem, that solves it.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Scott VanCaster"" <[EMAIL
NEVERMIND! :)
-Original Message-
From: Scott VanCaster [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 15, 2001 6:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] SQL Query syntax error... Help?
Nevermind everyone, I'm an idiot :)
I had the case wrong. I needed $ID, no
ents.
chris
www.variancecreations.net
-Original Message-----
From: Scott VanCaster [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 15, 2001 5:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] SQL Query syntax error... Help?
I've only been trying to learn this stuff for a few days and thought
Nevermind everyone, I'm an idiot :)
I had the case wrong. I needed $ID, not $id !
Thanks for the assistance though. Nice to know ya'll are here.
Scott
""Scott VanCaster"" <[EMAIL PROTECTED]> wrote in message
9bd394$ikn$[EMAIL PROTECTED]">news:9bd394$ikn$[EMAIL PROTECTED]...
> I've only
Well, I added the echo($id); back in and am just getting $id printed, so it
looks like I have another problem :(
Now to see if I can find it and figure it out.
""Scott VanCaster"" <[EMAIL PROTECTED]> wrote in message
9bd3pv$qbd$[EMAIL PROTECTED]">news:9bd3pv$qbd$[EMAIL PROTECTED]...
> id is the
I changed $id to '$id'
No more error, but nothing updates. Assuming it's because with the single
quotes nothing in the table matches?
"Felix Kronlage" <[EMAIL PROTECTED]> wrote in message
20010415232649.A11407@mad">news:20010415232649.A11407@mad...
> On Sun, Apr 15, 2001 at 04:20:07PM -0500, Sc
I "think" I tried that. Let me go try that again to be sure.
Oh, and what's STDOUT ? I'm just getting started here and haven't even seen
that yet :)
I can't believe how fast the responses are either. Thanks to all for
helping others out so quickly :)
"Felix Kronlage" <[EMAIL PROTECTED]> wrot
id is the primary key for the table. If I add echo ($id); before the query
it echos a 15, which is correct. Well, it's the right id for the test
person I'm logged into the site as anyway. I'm missing something here :)
"Augusto Cesar Castoldi" <[EMAIL PROTECTED]> wrote in message
Pine.A41.4.32
On Sun, Apr 15, 2001 at 04:20:07PM -0500, Scott VanCaster wrote:
> Any idea what my problem is? I removed the WHERE id=$id and it works, but
> updates every record of course :(
Have you tried putting the $id in quotes too?
| WHERE = '$id'
if that doesn't help, print the sql-statement to STDO
What do you have in the id variable?
It's contents can be the problem.
regards,
Augusto Cesar Castoldi
On Sun, 15 Apr 2001, Scott VanCaster wrote:
> I've only been trying to learn this stuff for a few days and thought I was
> on a roll, but now have run into a problem I don't get at all. In
I've only been trying to learn this stuff for a few days and thought I was
on a roll, but now have run into a problem I don't get at all. In my script
I have the following sql query and am receiving the following error when it
executes "You have an error in your SQL syntax near '' at line 1."
An
11 matches
Mail list logo