I'm not very good in mySQL but am trying to modify a script.
It has to do with a log table.
I want to retrieve the last 2 log records (if any) and if the last log
entries are the same as my current (to be) entry, simply update the time in
the last entry. But if not, simply insert the new entry.
My question is how to select the last two entries from the log table?
CREATE TABLE broadcast_log (
id mediumint(8) unsigned NOT NULL auto_increment,
time varchar(20) NOT NULL,
entry varchar(255) NOT NULL,
PRIMARY KEY (id)
);
Thanks.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003