Get Next Auto Increment on Code Igniter
Code Igniter October 30th, 2008
Today, I got problems to get next auto increment with Code Igniter. In this case, I tried to provide link to view current post page, after users post his blog. For example: blog table contain fields id, title, and body. I used auto increment for id and id as primary key. Users will only fill title and body on form available, and id will automatically auto increment on MySql Table. So I can’t send id by post method.
Well in this case, I need to get next auto increment to detect id on current user post. Why? because I usually sent post id parameters on url. For example: http://localhost/blog/fullpage/45 with base http://localhost/. So, post id placed on segment(2) of uri. Then I make query from table blog where id = uri segment(2) to get fullpage post where id = 45.
Sphere: Related Content| Tags: Code Igniter, Framework, PHP, Tutorial |


About



