Web Analytics Made Easy -
StatCounter Get assigned ID - CodingForum

Announcement

Collapse
No announcement yet.

Get assigned ID

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get assigned ID

    HI

    I'm newbie on Mysql and need your help...

    I'm creating one small script and have a little problem. I have one table called posts with two columns ID and content. How can I get the ID when I send new record? I need it because once the record is made the number equal to this ID should be sent in other table as well with one click.

    Hope you guess what I mean...

    Thanks in advance

  • #2
    last_insert_id is what you are looking for


    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

    Comment

    Working...
    X