Hey, > Why are you setting the profile_id equal to a value when you also have > that in your WHERE clause? I may have missed something here, but I > though the purpose of this was to track the last ten visitors to a > certain page, and if this is the case, why increment the user_id when > updating the row? Shouldn't the query be more like... I was just playing with the SQL....instead of entering new user_id's for each person visiting i just tried increment it... > UPDATE `test_last_visitors` SET `user_id`=$user_id, > `ttimestamp`=now() WHERE `profile_id`=$profile_id ORDER BY `ttimestamp` > ASC LIMIT 1 I ran the above in phpmyadmin like so: UPDATE `test_last_visitors` SET `user_id`=7, `ttimestamp`=now() WHERE `profile_id`=2 ORDER BY `ttimestamp` ASC LIMIT 1 its only updateing the top first record :-( I'm just about to throw in the towel... Thanks, Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 4/18/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php