How in the name of cow do you get the next autoindex of a given table in a database, i know it can be done but the PHP Manual isnt helping and the SQL manual is terrible! Anyone have any idea at all?
__________________ A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill
Please visit my sites: Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
Found that you can use LAST_INSERT_ID() to do what i needed, as i wanted to place the ID of something i had added into one table and place it in another related table.
Magic.
__________________ A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill
Please visit my sites: Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
and if you want to get the last used ID from any table you can use;
SELECT LAST_INSERT_ID(auto_column) AS alias FROM table ORDER BY auto_column DESC LIMIT 1 ;
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?