Welcome Guest, Not a member yet? Register   Sign In
Add named values for query binding
#1

I truly hope I am not saying something wrong if I say that today, the latest version of CI I'm using 3.1.0 does not support named values for query binding.

Whenever I implement insert queries or update queries, there could be tons of fields to pass to a query through the binding mechanism. I find it very difficult to maintain, read, implement with only adding '?' everywhere in the SQL and pass an array that has in the exact right sequence order the values which match with each '?' in the SQL.

PDO supports the query binding with named values to pass associative array. Why not CI?

The method DB_driver::compile_binds method even states: "// Make sure we're using numeric keys" Sad


I don't know what others think about it, but I would really love to see named binds array work with CI 4.
Thank you
- Nicolas C. -
Reply
#2

You're in luck
Reply




Theme © iAndrew 2016 - Forum software by © MyBB