MySQL/PHP problem

From: Jim (seib3184_at_fredonia.edu)
Date: 12/17/04


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


Relevant Pages

  • Re: Defrag Probs and Lag Time
    ... etc. to set the IE settings correctly? ... Clicking on the entry for your hard drive should display the ... enter chkdsk C: ... look for an Information type entry ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: MySQL/PHP problem
    ... > I'm using PHP & MySQL to create a simple guestbook. ... > to display the latest entry first though. ... Each time around display the entire entry. ...
    (comp.lang.php)
  • Re: How to create a window showing building block organiser in 2007
    ... doesn't display a "preview". ... show any formatting that's included in the entry; ... On the plus side, if the entries are all text, ... autotext at the location of the selection. ...
    (microsoft.public.word.vba.general)
  • Re: How to create a window showing building block organiser in 2007
    ... Christian is right that the preview from the Building Blocks Organizer isn't ... It displays the text of the entry, in the font used for the multiline ... display is guaranteed to be readable. ... insert a comment containing the selected autotext at the location of the ...
    (microsoft.public.word.vba.general)
  • Re: [opensuse] Strange Firefox Problem
    ... # begin quote ... User Name: [entry box] ... if I could get display screens to show Danish characters. ...
    (SuSE)