Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: PHP mysql help

  1. #1
    Regular Coder
    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

    PHP Code:
    CREATE TABLE guestbook (
    name VARCHAR(30NOT NULL,
    place VARCHAR(30NOT NULL,
    phone VARCHAR(30NOT NULL,
    email VARCHAR(50NOT NULL,
    message TEXT NOT NULL,
    entry_date DATETIME NOT NULL
    Last edited by hmvrulz; 03-07-2007 at 11:16 AM.

  • #2
    Regular Coder
    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


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts