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:
Rudolf.my $sth = $dbh->prepare($statement); $sth->bind_param(1, undef, SQL_INTEGER); # bind undef. for (1..$n) { #no need to rebind. $sth->execute($value); }
In reply to Re: DBD::mysql and binding placeholders
by tantarbobus
in thread DBD::mysql and binding placeholders
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |