Page 1 of 1

ID for post

Posted: Sat Jan 03, 2009 5:28 am
by yoji
I am creating this blog. My question is that how can I get the id (which is primary auto) of the post i JUST made??? Now, I can't use WHERE to compare the post itself with the database to get the id... How can I do it???

Take it as this: If you had 3 columns in a table, ID, TITLE,MESSAGE. Where ID is primary auto. If you insert a record in the database, how can you now find out what ID did it get? Considering that the Title field CAN be NULL. I don't think comparing the whole message is a good idea.

Re: ID for post

Posted: Sat Jan 03, 2009 6:33 am
by VladSun

Re: ID for post

Posted: Sat Jan 03, 2009 6:52 am
by yoji
Wow thanks a million... Didn't knew that one...