List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:April 6 2001 5:35pm
Subject:Re: Mysql speed :)
View as plain text  
>>>>> "PD" == Paul DuBois <paul@stripped> writes:

PD> But why does it matter?  MySQL will convert the strings to numbers
PD> anyway.

But according to earlier threads here, it will mess up with BIGINTs

Also it may screw up with LIMIT:

$sth = $dbh->prepare("SELECT foo FROM bar LIMIT ?,?") or die;
$sth->execute($start,$howmany);

may fail depending on how you set $start and $howmany.  I got this
error the other day, where $start was the string "3" and DBI tried to
quote it, making my query look like this:

 ... LIMIT '3',2

and resulting in a parse error.  The fix was to call
$sth->execute($start+0,$howmany+0) and then DBI did the right thing.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/
Thread
Mysql speed :)Peter Zaitsev5 Apr
  • Re: Mysql speed :)Sinisa Milivojevic5 Apr
Re: Mysql speed :)Richard Ellerbrock5 Apr
Re: Mysql speed :)Heikki Tuuri5 Apr
  • Re: Mysql speed :)Tim Bunce6 Apr
    • RE: Mysql speed :)Martin Hubert6 Apr
      • Re: Mysql speed :)Tim Bunce6 Apr
    • Re: Mysql speed :)William R. Mussatto6 Apr
      • Re: Mysql speed :)Paul DuBois6 Apr
      • Re: Mysql speed :)Tim Bunce6 Apr
        • Re: Mysql speed :)William R. Mussatto6 Apr
    • Re: Mysql speed :)Vivek Khera6 Apr
      • Re: Mysql speed :)Christian Jaeger7 Apr
  • Re: Mysql speed :)Sinisa Milivojevic6 Apr
Re: Mysql speed :)Sinisa Milivojevic6 Apr
RE: Mysql speed :)Gregert Johnson6 Apr
  • Re: Mysql speed :)Tim Bunce6 Apr
RE: Mysql speed :)Gregert Johnson6 Apr