Welcome Guest, Not a member yet? Register   Sign In
database problem, and really searching for a fix
#1

[eluser]Unknown[/eluser]
hi guys,

I'm having a serious problem. I need to expand the CI_DB_driver class to add an extra escape option to the escape funtion.
I'm currently using the this->db->insert() funtion with an dynamic array with kolumn names and values (multidimensional, but that is allready fixed) but some of the column values are subqueries, so the escape funtion will handle the subquery as a string and not as a query.
I'm allready fixing this with a preg_match on the array, but I need to 'unpack' the array and repacking it. But CI is allready doing this in the CI_DB_driver class.
My problem is, I need to write around 100 extra lines of code because I can't expand that class. If I could expand it, I only would have to write around 3 lines of code.
So, anybody knowns how to expand that class? B.t.w: class is the file "system/database/db_driver.php"

Oh and i cant use a join or something else because the data to be inserted is from remote xml files, normalized, and read in php through objects and arrays.

Thanks..


Messages In This Thread
database problem, and really searching for a fix - by El Forum - 09-06-2012, 03:21 PM
database problem, and really searching for a fix - by El Forum - 09-07-2012, 01:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB