Jump to content


Photo

Can I insert and select


  • Please log in to reply
2 replies to this topic

#1 crouchjay

crouchjay
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 19 May 2006 - 08:21 PM

I want to create a new row of data, but I need the query to return the newly created rowID. How do I go about doing this?


Jay,

#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 19 May 2006 - 09:29 PM

on the php side, use mysql_insert_id().

within mysql, use SELECT LAST_INSERT_ID()
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 crouchjay

crouchjay
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 19 May 2006 - 10:01 PM

Thank you




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users