I tried:
I inserted a row in mysql using php in the first webpage and second webpage i tried to retrieve it.
I got:
But in the next page i did not get the lastely inserted row.
When inserted the another row, i was able to get the first inserted row and not the lastest row.
So every time i miss the last inserted row the first time and when then i was able to get it as soon as i insert another row.
How to solve this issue? Is it something related to commit i am missing here?
Last edited by Orjan; 03-09-2010 at 01:25 AM. Reason: Removed spam
What is your table structure? Do you have an indicator of when something was added?
I also don't know this problem , I want to know the reason too.
if you use a primary key that auto increment, you can get the last row with
"select * from yourtable order by yourid desc"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks