Re: [MySql] PHP Question
| From: | Folke Ashberg | Date: | Mon, 27 Nov 2000 12:03:26 +0000 |
| Subject: | Re: [MySql] PHP Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27342@lists.php.net to get a copy of this message | ||
Hi,
the next ones you'll get with limit 25,25
limit 50,25, and so on
LIMIT [offset,] rows is the syntax
http://www.mysql.net/documentation/mysql/bychapter/manual_Reference.html#SELECT
regards
Folke
--
Folke Ashberg
Stage Internet Services GmbH
Technical Development
folke@fanstage.de
folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49 89 454591-71
Kreillerstr. 21 | 81673 Munich | Germany | www.fanstage.de
On Sun, 26 Nov 2000, Matt Lush wrote:
> hey thx, one other thing say have the limit set at 0,25 right thats 25 per
> page how would I make it so there is a thing at the bottem saying next page
> so it would view the next 25???
>
> THX
> Matt
> ----- Original Message -----
> From: "Folke Ashberg" <folke@fanstage.de>
> To: "Matt Lush" <mlush26@hotmail.com>
> Cc: "PHP General List" <php-general@lists.php.net>
> Sent: Saturday, November 25, 2000 3:06 PM
> Subject: Re: [PHP] [MySql] PHP Question
>
>
> Hi!
> if ($select_stuff=="datedescr") $order="order by date desc";
> elseif ($select_stuff=="name") $order="order by name";
> elseif ($select_stuff=="foo") $order="order by foo";
> else $order="order by bar";
>
> select * from files $order limit 0,15;
>
> isn't is easy?
>
> regards
> Folke
>
> --
> Folke Ashberg
>
> Stage Internet Services GmbH
> Technical Development
> folke@fanstage.de
>
> folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49 89 454591-71
> Kreillerstr. 21 | 81673 Munich | Germany | www.fanstage.de
>
> On Sat, 25 Nov 2000, Matt Lush wrote:
>
> > ok I have a question on MYSQL and a form say when using this to select the
> db
> >
> > select * from files order by date desc limit 0,15
> >
> > That selects from the tables files goes oder by date descending and has a
> limit of 15 how would I make it if I had a form below with different info
> for the select it would use them look below
> >
> > <select name="select_stuff" size="1">
> > <option value="datedesc">by date
> > <option value="name">by Name
> > <option value="etc">etc
> > </select>
> >
> > so if I had selected by date it would use the select by date and if I
> clicked by name it would go by name and beside it there would be another
> pulldown menu with ascending and descending it so if I had by name on it
> could descend or ascend?
> >
> > Does anyone know if what I should do?
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>