How do I write a query that basically pulls only the latest (according to a UNIX_TIMESTAMP field) entry from a database?SketchPHP Code:SELECT * FROM table WHERE date....what?
Printable View
How do I write a query that basically pulls only the latest (according to a UNIX_TIMESTAMP field) entry from a database?SketchPHP Code:SELECT * FROM table WHERE date....what?
Select * from table order by datefield desc
I think the top command also works in MySQL, so you could use the TOP 1 type of syntax in the select to return just one record.
Top 1 is not correct MySQL syntax...
But the simple query worked...der. Knew it was easy. Thanks.
Sketch