At 10:26 AM -0700 8/10/04, Justin Patrin wrote:
Of course, this begs the question of why you're re-implementing what
has been done so many times in the past.
At 11:56 AM -0700 8/10/04, Ed Lazor wrote:
Hey, while you guys are talking about those DB classes, I've always opted to
not use them because
> > > http://pear.php.net/package/DB
> > > http://pear.php.net/package/MDB
> > > http://pear.php.net/package/MDB2
> > > http://adodb.sourceforge.net/
> > > http://www.phpclasses.org/browse/package/20.html
> >
> > I'm building a class for use with our PHP applications.
> Packages
> > like w
From: "Dan Joseph" <[EMAIL PROTECTED]>
> > Of course, this begs the question of why you're re-implementing what
> > has been done so many times in the past.
> >
> > http://pear.php.net/package/DB
> > http://pear.php.net/package/MDB
> > http://pear.php.net/package/MDB2
> > http://adodb.sourceforge.n
> > I'm building a class for use with our PHP applications.
> Packages
> > like what you've linked me to are nice, but we need a little flexibility
> > here, so we're writing a few methods of our own.
> >
>
> Flexibility?? Those classes are very flexible and have many useful
> utility meth
On Tue, 10 Aug 2004 13:37:50 -0400, Dan Joseph <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> > Of course, this begs the question of why you're re-implementing what
> > has been done so many times in the past.
> >
> > http://pear.php.net/package/DB
> > http://pear.php.net/package/MDB
> > http://pear.php.
Hi,
> Of course, this begs the question of why you're re-implementing what
> has been done so many times in the past.
>
> http://pear.php.net/package/DB
> http://pear.php.net/package/MDB
> http://pear.php.net/package/MDB2
> http://adodb.sourceforge.net/
> http://www.phpclasses.org/browse/packag
On Tue, 10 Aug 2004 10:31:36 -0400, Dan Joseph <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I'm trying to build a class to handle various SQL functions.
> One of them is to take a query, and return all rows. Here's what I have so
> far:
>
> function selectRows( $sql )
>
> {
>
>
John Nichel wrote:
John W. Holmes wrote:
Change that to:
$array = array();
$results = mysql_query( $sql, DB::connect() );
while($data = mysql_fetch_array($result))
{ $array[] = $data; }
return $array;
Would there be any speed/performance issuse with using something like...
array_push ( $array, $d
Robby Russell wrote:
Run some tests and let us know. ;-)
I'd be interested in knowing as well.
Not really worth worrying about according to this...
array_push() averaged 0.20226655006409 seconds when running the test 10
times
array[] averaged 0.20317406654358 seconds when running the test 10 times
On Tue, 2004-08-10 at 08:33, John Nichel wrote:
> John W. Holmes wrote:
> >
> > Change that to:
> >
> > $array = array();
> > $results = mysql_query( $sql, DB::connect() );
> > while($data = mysql_fetch_array($result))
> > { $array[] = $data; }
> >
> > return $array;
>
> Would there be any spee
Hi,
> Would there be any speed/performance issuse with using something like...
>
> array_push ( $array, $data );
>
> vs.
>
> $array[] = $data;
They seem to react the same in my test script.
-Dan Joseph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
John W. Holmes wrote:
Change that to:
$array = array();
$results = mysql_query( $sql, DB::connect() );
while($data = mysql_fetch_array($result))
{ $array[] = $data; }
return $array;
Would there be any speed/performance issuse with using something like...
array_push ( $array, $data );
vs.
$array[]
Hi,
> $array = array();
> $results = mysql_query( $sql, DB::connect() );
> while($data = mysql_fetch_array($result))
> { $array[] = $data; }
>
> return $array;
>
> No need to loop through $data.
Ahh, thanks for that tip. That's much cleaner.
-Dan Joseph
--
PHP General Mailing List
From: "Dan Joseph" <[EMAIL PROTECTED]>
> > In order to get all of the data back you are going to have to loop
> > through it and return the array so that it will be available for
> > manipulation.
>
> Hmm.. I suspected this might be the case. I have modified my
> functiona bit:
>
>
Hi,
> In order to get all of the data back you are going to have to loop
> through it and return the array so that it will be available for
> manipulation.
Hmm.. I suspected this might be the case. I have modified my
functiona bit:
function selectRows( $sql )
[snip]
I'm trying to build a class to handle various SQL functions. One of them
is to take a query, and return all rows. Here's what I have so far:
function selectRows( $sql )
{
$count = 0;
$results = mysql_query( $sql, DB::connect() );
$data = mysql_fetch
16 matches
Mail list logo