[thelist] PHP Code not working as expected....

CDitty mail at redhotsweeps.com
Sun Dec 8 21:16:01 CST 2002


I am embarrassed to say that I never thought about just checking the
database.  Turns out, it was my process of adding the records to the
database that was causing the array.  I don't know why I didn't think about
the database part.  I do it all the time at work, but not at home.  :(

Thanks for the tips.

Chris


At 06:46 AM 12/8/2002, you wrote:
>What happens if you run this query in mysql directly? If that times out then
>you have and issue with the query itself, maybe need and index on the
>columns.
>Thanks,
>AC
>
>----- Original Message -----
>From: "Mike Migurski" <mike at saturn5.com>
>To: <thelist at lists.evolt.org>
>Sent: Sunday, December 08, 2002 6:15 AM
>Subject: Re: [thelist] PHP Code not working as expected....
>
>
> > >This is all the page does.  There is nothing above this point except the
> > >database connect info. This is running against 300,000 records and is
> > >taking forever to run.  Just started this today.
> > >$sqlPrim = mysql_query("select prodID, prodSecCat from jandr_items order
>by
> > >prodSecCat asc limit 0, 10") or die(mysql_error());
> > >
> > >while($row = mysql_fetch_array($sqlPrim)){
> > >         echo $row[0] . " " . $row[1] . " " . "<br>";
> > >}
> > >
> > >Here is what is returned.
> > <snip>
> > >
> > >Can anyone tell me why row[1] is returning array and row[0] is not?
> >
> > Hard to say without knowing the specifics. Can you provide the results of
> > print_r() on each row, so it's more obvious what's actually there?
> >
> > -mike.
> >
> > ---------------------------------------------------------------------
> > michal migurski- contact info and pgp key:
> >                  http://www.saturn5.com/mike/contact.html
> >
> >                 "Freedom! Horrible, horrible freedom!"
> >
> >
> >
> >
> > --
> > * * Please support the community that supports you.  * *
> > http://evolt.org/help_support_evolt/
> >
> > For unsubscribe and other options, including the Tip Harvester
> > and archives of thelist go to: http://lists.evolt.org
> > Workers of the Web, evolt !
>
>--
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester
>and archives of thelist go to: http://lists.evolt.org
>Workers of the Web, evolt !




More information about the thelist mailing list