hmvrulz
03-07-2007, 10:03 AM
i am creating a guestbook for wap... since wap surfing is some times timed out since it depends on the signal strengent i am getting double n more posts of the same content by the same user...
so i want to write a script which checks the lastest entry in the db n match it with the present submitted entry ...if both match it needs to be redirected to diff page...
i want help to pull out the lastest entry from the DB
should i do it using
SELECT id, name, date_format(entry_date, '%b %e') as post_time from guestbook ORDER by entry_date desc LIMIT 1, 1
can i use this to call the lastest entry n check it with the submitting entry n do the needfull ?
if not plz let me know the MYSQL query statement
CREATE TABLE guestbook (
id INT(10) NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
place VARCHAR(30) NOT NULL,
phone VARCHAR(30) NOT NULL,
email VARCHAR(50) NOT NULL,
message TEXT NOT NULL,
entry_date DATETIME NOT NULL
);
so i want to write a script which checks the lastest entry in the db n match it with the present submitted entry ...if both match it needs to be redirected to diff page...
i want help to pull out the lastest entry from the DB
should i do it using
SELECT id, name, date_format(entry_date, '%b %e') as post_time from guestbook ORDER by entry_date desc LIMIT 1, 1
can i use this to call the lastest entry n check it with the submitting entry n do the needfull ?
if not plz let me know the MYSQL query statement
CREATE TABLE guestbook (
id INT(10) NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
place VARCHAR(30) NOT NULL,
phone VARCHAR(30) NOT NULL,
email VARCHAR(50) NOT NULL,
message TEXT NOT NULL,
entry_date DATETIME NOT NULL
);