MySQL/PHP problem
From: Jim (seib3184_at_fredonia.edu)
Date: 12/17/04
- Next message: sharma: "Re: What PHP tool to use for simple extranet site ?"
- Previous message: Gary Quiring: "XML feed and response"
- Next in thread: Thomas: "Re: MySQL/PHP problem"
- Reply: Thomas: "Re: MySQL/PHP problem"
- Reply: sharma: "Re: MySQL/PHP problem"
- Reply: JV: "Re: MySQL/PHP problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Dec 2004 18:01:47 -0500
I'm using PHP & MySQL to create a simple guestbook. I've created my
table and I'm able to load my information in as usual. I would like it
to display the latest entry first though. I set an id to each entry
that is auto-incremented. The idea seems real easy in theory:
1. Create a loop that starts at the last entry and goes until it
finishes the first.
2. Each time around display the entire entry.
My question is, how do I find the last entry if I don't know what it
is? For example, right now I have three entries and I can display them
starting with the first. I know there are three so I set my counter to
start at 0 and end on 2 (0,1,2) now if I want to reverse it and start
with the last, how do I get the last id?
Any help would be appreciated.
--
Cheers,
Jim
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
- Next message: sharma: "Re: What PHP tool to use for simple extranet site ?"
- Previous message: Gary Quiring: "XML feed and response"
- Next in thread: Thomas: "Re: MySQL/PHP problem"
- Reply: Thomas: "Re: MySQL/PHP problem"
- Reply: sharma: "Re: MySQL/PHP problem"
- Reply: JV: "Re: MySQL/PHP problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|