SQL Query won't run; syntax error?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Reaper
Forum Newbie
Posts: 2
Joined: Tue Jun 07, 2005 9:41 am

SQL Query won't run; syntax error?

Post by Reaper »

Hi.

I'm having a problem with a SQL query; I'm making a log for my site. It looks like this:

Code: Select all

UPDATE logs SET hits = hits + 1, latest = NOW() WHERE page = index
PHPMyAdmin identifies a syntax error in it, but I can't figure out where it is. I'd be grateful for any help.

-Reaper
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Code: Select all

WHERE page='index'
Reaper
Forum Newbie
Posts: 2
Joined: Tue Jun 07, 2005 9:41 am

Post by Reaper »

It worked, thanks a lot! :)
Post Reply