Welcome Guest, Not a member yet? Register   Sign In
escaping null values
#1

[eluser]ken_t[/eluser]
hi, i just started working with frameworks and im not a pro php programmer.
So i dont know if im doing something wrong.

In my application i have a function that insert at a db some values from the view input fields.
There are some int type fields at this table as for example the age field.

Im using $this->db->insert(table,values) function.

And when i leave the age input field null and submit the form, the escape function treats it as string and escape it.

Then i get a db error saying invalid value for int "".

I edited the escape function at db_driver.php to make it not escape null values. Is there another way for it?


Messages In This Thread
escaping null values - by El Forum - 10-31-2007, 08:27 AM
escaping null values - by El Forum - 10-31-2007, 08:56 AM
escaping null values - by El Forum - 10-31-2007, 09:39 AM
escaping null values - by El Forum - 10-31-2007, 10:28 AM
escaping null values - by El Forum - 10-31-2007, 10:37 AM
escaping null values - by El Forum - 10-31-2007, 11:21 AM
escaping null values - by El Forum - 10-31-2007, 11:33 AM
escaping null values - by El Forum - 10-31-2007, 11:33 AM
escaping null values - by El Forum - 10-31-2007, 11:39 AM
escaping null values - by El Forum - 10-31-2007, 11:47 AM
escaping null values - by El Forum - 10-31-2007, 11:56 AM
escaping null values - by El Forum - 10-31-2007, 12:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB