[FX.php List] FMFindAny to pull two random records

Gjermund Gusland Thorsen ggt667 at gmail.com
Mon Feb 19 11:51:42 MST 2007


Portal or not, random number is the way to go if you want more than
one record at random.

ggt667

On 2/19/07, Alex Gates <alex at gandrpublishing.com> wrote:
> Hi again-
>
> After looking at this a little more I realized that I'm actually using a
> portal that is on one record - so I imagine the only way to do this is
> to make a random number with php to pull back a random portal record.
> This seems pretty straightforward.
>
> Alex P. Gates
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Alex Gates
> Sent: Monday, February 19, 2007 11:46 AM
> To: 'FX.php Discussion List'
> Subject: [FX.php List] FMFindAny to pull two random records
>
> Hi everyone-
>
> I'd like to display two random records on the side of my page as a way
> of having some dynamic content.  Each will consist of an image and also
> some text to be used in a mouseover tooltip.
>
> Is it advisable to use FMFindAny twice (two separate queries to the
> database) in order to get two randomly returned sets?
>
> I imagine that this method could theoretically return the same record
> twice... but with 100 or so records in the database, it seems rather
> unlikely... but I imagine it is still possible.
>
> Does anyone have any experience with this or any advice?
>
>
> Alex P. Gates
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list