Re: [PHP-DB] mysql databases

2006-10-14 Thread Bastien Koert
whynot keep all and just sort/limit them to get the data you want? bastien From: "bob plano" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: Re: [PHP-DB] mysql databases Date: Sat, 14 Oct 2006 12:47:38 -0500 sorry, i meant that i wanted to remove the oldest entry and pu

Re: [PHP-DB] mysql databases

2006-10-14 Thread Niel Archer
Hi Bob First you would need a means of identifying your oldest entry, some kind of Date-Time field would seem simplest. Then, one way, would be to SELECT the oldest value and use it in the 'where' clause of an UPDATE. SELECT MIN(stamp) FROM table; will get the oldest date-time value and UPDAT

Re: [PHP-DB] mysql databases

2006-10-14 Thread bob plano
sorry, i meant that i wanted to remove the oldest entry and put in a new entry with UPDATE or INSERT. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mysql databases

2006-10-13 Thread Niel Archer
Hi > He means that he wants to use REPLACE and take out the old entry and update > it with a new one. Although, you would probably use UPDATE instead. Hmmm... Thought this was DB list, not mind-readers. I would also *guess* that would be the intention, but his example seems to remove the newest e

Re: [PHP-DB] mysql databases

2006-10-13 Thread Dave W
He means that he wants to use REPLACE and take out the old entry and update it with a new one. Although, you would probably use UPDATE instead. -- Dave W

Re: [PHP-DB] mysql databases

2006-10-13 Thread Niel Archer
Hi Bob Your question isn't very clear. Do you want to remove the oldest entry, newest, or is there some other criteria to diceide? Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] mysql databases

2006-10-13 Thread bob plano
how would you add something new into a table and take out something old? example: (1) 1st something (2) 2nd something (3) 3rd something (4) 4th something and then you add in something new so then the table would look like (1) new something (2) 1st something (3) 2nd something (4) 3rd something