Re: LAST_INSERT_ID & LAST_UPDATE_ID
| From: | Stut | Date: | Thu, 24 May 2007 21:52:41 +0000 |
| Subject: | Re: LAST_INSERT_ID & LAST_UPDATE_ID | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-27962@lists.php.net to get a copy of this message | ||
sam rumaizan wrote:
How can I select (retrieve) the last updated cell (field). Basically I need to pull the new information only. I'm using for updating my database: UPDATE table SET column = CONCAT_WS ('column,'" . $column."') WHERE column= value; I need to select data: SELECT * FROM table WHERE column=WhateverLAST_INSERT_ID will not work because you're not inserting anything. The clue, you see, is in the name. Your best bet would be to add a timestamp/datetime field to the table and include that in the update. Then you can use that field to get the last row that was changed. -StutI found LAST_INSERT_ID but i doesn't work