ast_visitors
SET user_id=user_id+1
WHERE profile_id=1
ORDER BY ttimestamp LIMIT 1;
You don't have to explicitly update the timestamp column. It will do this
automatically. This will rotate through the five rows. This may have failed
in your test because if you executed this in a script and all of the sql
statements occurred in the same second, you would probably see the behavior
that you described.
--
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You can leave these off. Changing ENGINE to TYPE will fix that error, and
you can leave off the charset. I believe utf8 was added in 4.1. If you
leave off charset=xxx it will just default to whatever the server's
default-character-set is set to, probably latin1.
> On 4/19/2005 4:42:08 PM
ENGINE=MyISAM DEFAULT CHARSET=utf8
You do not need to specify the default clause on the timestamp column since
this is already the default behavior, and as you has seen this isn't valid
before 4.1 anyway. Also I wouldn't use the name 'timestamp' for a column
name.
It is generally not a good idea to use reserved words for column names.
--
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
3 matches
Mail list logo