mysql_insert_id? |
[eluser]duffy0[/eluser]
Is there any native way in the codeigniter database abstraction to do something like mysql_insert_id? I am inserting a post from a user into a "posts" table. I then want to insert the ID generated for this post into another table called "index_queue." I have a perl script that will run every 10 minutes or so and will create an index of all the posts whose ID's are in "index_queue." I just need to know how I can get ID's of the posts when I insert them to the database. Here is my code. This is an API call so I am using XML_RPCS, but I dont thing that complicates anything. Code: function new_post($request) {
[eluser]jedd[/eluser]
[quote author="duffy0" date="1254543570"] I just need to know how I can get ID's of the posts when I insert them to the database. [/quote] Yeah, it's the kind of thing you'd expect would [url="http://codeigniter.com/wiki/FAQ/"]be in the FAQ[/url], isn't it?
[eluser]tokyotech[/eluser]
Can I request that this be added to the manual instead of only in the FAQ? Thanks.
[eluser]Aken[/eluser]
It is in the manual... http://ellislab.com/codeigniter/user-gui...lpers.html If even says that it is in the manual in the FAQ entry, lol.
[eluser]mjsilva[/eluser]
It was so much easier when we have file cabinets with letters separating the files |
Welcome Guest, Not a member yet? Register Sign In |