MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 14 1999 12:42pm
Subject:Re: Navigation Through DB
View as plain text  
>>>>> "Kevin" == Kevin P O'Brien <kevino@stripped> writes:

Kevin> Thanks Tim.
Kevin> The Last syntax works.

Kevin> This is what I have for Next

Kevin> if ($FORM{'next'})
Kevin> {
Kevin> $next = $FORM{'TNum'};
Kevin>     $sth=$dbh->query("SELECT * FROM Tickets LIMIT @{[$next + 1]}, 1");
Kevin>     &Display
Kevin> }

Kevin> When I print $next before the query it holds the current TicketNumber.
Kevin> Although, I am sure the syntax for the query is incorrect.

In this case you should do:

"SELECT * FROM Tickets WHERE TicketNumber > $next LIMIT 1"

(The above should be very efficient)

Navigation Through DBKevin P. O'Brien12 Mar
  • Re: Navigation Through DBThimble Smith13 Mar
Re: Navigation Through DBKevin P. O'Brien13 Mar
  • Re: Navigation Through DBMichael Widenius15 Mar
Re: Navigation Through DBKevin P. O'Brien13 Mar