php-general | 2000071
Date: 07/03/00
- Next message: Alex Black: "Re: [PHP] Database Browsing"
- Previous message: Danny Rice: "Re: [PHP] getting rid of form variable definition"
- In reply to: Philip Hallstrom: "[PHP] Re: Limiting results to X number of rows"
- Next in thread: August Zajonc: "[PHP] Help Desk - Email Support Handling"
- Reply: August Zajonc: "[PHP] Help Desk - Email Support Handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
it helps a little, thanks :)!
yes, I was hopinh oracle would allow selects on an entire, final result
set... and can't see a way so far :(
_a
-- Alex Black, Head Monkey enigma <email protected>The Turing Studio, Inc. http://www.turingstudio.com
vox+510.666.0074 fax+510.666.0093
Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522
> From: philip <email protected> (Philip Hallstrom) > Newsgroups: php.general > Date: 3 Jul 2000 09:29:40 -0700 > Subject: [PHP] Re: Limiting results to X number of rows > > I've never tried it, but someone once sent me the following for oracle: > select linenum, foo, bar > from (select rownum as linenum, foo, bar from > (select foo,bar from chaos order by bar) ) > where linenum between 11 and 20; > My understanding for the sub select is that linenum is generated in the > fly by the result set *BEFORE* the order by clause... so if order it > afterward it won't give you what you want. > Like I said, I've never used it, but if it helps... yahoo! > In article <am.php.general.962572347.35288 <email protected>>, > Alex Black <enigma <email protected>> wrote: >> how about ranges? >> >> select * from table limit 10 >> forks great for the first bit, I have been trying to find a good way of >> doing 11-20 in oracle: >> >> select * from table where rownum between 11 and 20 (from memory, but you get >> the point) >> >> which doesn't work very well. >> >> the only other thing I can think of is to just get the entire result set >> into an associative array, and just use PHP to do it :P >> >> :) >> >> >> -- >> Alex Black, Head Monkey >> enigma <email protected> >> >> The Turing Studio, Inc. >> http://www.turingstudio.com >> >> vox+510.666.0074 >> fax+510.666.0093 >> >> Saul Zaentz Film Center >> 2600 Tenth St Suite 433 >> Berkeley, CA 94710-2522 >> >> >> >> >>> From: mail <email protected> (CDitty) >>> Newsgroups: php.general >>> Date: 2 Jul 2000 11:49:15 -0700 >>> Subject: Re: [PHP] Limiting results to X number of rows >>> >>> Thanks. That did it the trick. >>> >>> CDitty >>> >>> At 12:51 PM 7/2/00 , Rasmus Lerdorf wrote: >>>>> Does anyone know of a way to limit the mysql return results to X number of >>>>> rows? In Oracle, I use rowcount < 10, but I can't use this in Mysql. >>>>> >>>>> The only way I can think to do this is to do a select then subtract the >>>>> number I want from the total. Then in the select statement I need it in, >>>>> select * from table where id > previous_select. >>>>> >>>>> Any tips? >>>> >>>> select * from table limit 10 >>>> >>>> -Rasmus >>>> >>>> >>>> -- >>>> PHP General Mailing List (http://www.php.net/) >>>> To unsubscribe, e-mail: php-general-unsubscribe <email protected> >>>> For additional commands, e-mail: php-general-help <email protected> >>>> To contact the list administrators, e-mail: php-list-admin <email protected> >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: php-general-unsubscribe <email protected> >>> For additional commands, e-mail: php-general-help <email protected> >>> To contact the list administrators, e-mail: php-list-admin <email protected> >>> >> >> >> -- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe <email protected> > For additional commands, e-mail: php-general-help <email protected> > To contact the list administrators, e-mail: php-list-admin <email protected> >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Alex Black: "Re: [PHP] Database Browsing"
- Previous message: Danny Rice: "Re: [PHP] getting rid of form variable definition"
- In reply to: Philip Hallstrom: "[PHP] Re: Limiting results to X number of rows"
- Next in thread: August Zajonc: "[PHP] Help Desk - Email Support Handling"
- Reply: August Zajonc: "[PHP] Help Desk - Email Support Handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

