Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: PHP mysql help
03-07-2007, 10:03 AM #1
- Join Date
- Jan 2007
- Thanked 0 Times in 0 Posts
PHP mysql help
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
Last edited by hmvrulz; 03-07-2007 at 10:16 AM.
03-08-2007, 12:02 AM #2
- Join Date
- Jun 2002
- Thanked 5 Times in 5 Posts
simplify it and your fine ...
SELECT id, name, entry_date as post_time from guestbook ORDER by entry_date desc LIMIT 1, 1