ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life
back

ext/mysqli and LOBs anyone?

A while ago I implemented native prepared statements into the MDB2 mysqli driver. However I was never able to get LOB support to work in the execute method. I almost forget about this and only stumbled over this issue again while testing a new portability fetch mode that fixes the issue of sqlite returning table qualifiers in associative fetches unlike most other DBMS extensions in PHP. Maybe someone has experience here and/or is motivated to fix the problem.

FYI: I also added the ability to specify if the array keys in associative fetches should be lowercased (default) or uppercased via the "field_case" option (set it to CASE_LOWER or CASE_UPPER). Previously only lowercasing was supported. Technically I should probably even make uppercased the default, because this is what the SQL standard specifies, but I think this will just send all current MDB2 users and anyone migrating from DB or MDB through hell.

Comments



Re: ext/mysqli and LOBs anyone?

I was able to fix the issue with the help of Andrey and Georg. The problem was that I was sending the LOB data before I mysqli_stmt_bind_param(). Thinking about it now it seems rather obvious .. doh! Here is the commit with the fix.