I want to select: select id, car1 + car2 as Totalcar from $table where id = max(id)
What is the correct query? How do I select something where the id (primary key) is the hightest.
Thank you
This should work for you:
SELECT id, car1 + car2 AS Totalcar FROM $table ORDER BY id DESC LIMIT 1;
-Rich