Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: DBD::mysql and binding placeholders

by tantarbobus (Hermit)
on Sep 22, 2004 at 22:36 UTC ( #393105=note: print w/replies, xml ) Need Help??

in reply to DBD::mysql and binding placeholders

You are going to have to wait until mysql 4.x and DBD::mysql gets the real prepared statements. Once you get those, it will automatically look up types at prepare time (except for LIMIT stmts which you can't prepare server-side just yet).

Although, your mysql_discover_bind_type will probably go into the 2.9x tree because, I think, we are going to be removing the LIMIT ?, ? placeholder autodetection from the 2.9x code as there were just too many cases (bugs), and the code was getting too ugly trying to support it.

If you pester me over the weekend (I am slammed until friday afternnon), I'll add it for you. Of course (good) patches are always welcome. Also note that you can:

my $sth = $dbh->prepare($statement); $sth->bind_param(1, undef, SQL_INTEGER); # bind undef. for (1..$n) { #no need to rebind. $sth->execute($value); }

Replies are listed 'Best First'.
Re^2: DBD::mysql and binding placeholders
by steve (Deacon) on Aug 02, 2008 at 07:30 UTC
    I found this in a search looking for something else, but seeing how old this is I am curious. Can anyone comment on whether this is still a problem now (i.e. mysql 5.x ...)?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://393105]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2019-10-18 11:07 GMT
Find Nodes?
    Voting Booth?