Bill,

If you want to get the last ID from a table in MySQL, use the following SELECT 
statement, and put the result into a variable - which will be the last ID value 
in that table:

SELECT id FROM tripulatnes ORDER BY id DESC limit 1

This selects the column: id from the table: tripulantes, and sorts the table by 
column: id, in descending order. This returns the last record in the table. 
Warning: this only returns the last record, not the greatest (or MAX) value in 
that column, which I'm assuming is the Primary Key to the table.

Now if you want the MAX value returned from the column: id, use the following 
SELECT statement:

SELECT MAX(id) FROM tripulantes

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to