Re: LAST_INSERT_ID & LAST_UPDATE_ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  What I want to do is:
   
  1-user has 10 columns (fields).
  2- User updated one of these fields using CONCAT_WS(adding new data to previous data).
  3- When user views any of his information he sees only the last updated part of the data. 
   
   
  So, timestamp/datetime field  is not going to work.
   
   
   
  
Stut <stuttle@xxxxxxxxx> wrote:
  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=Whatever
> 
> I found LAST_INSERT_ID but i doesn't work 

LAST_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.

-Stut

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





       
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux