Welcome Guest, Not a member yet? Register   Sign In
active record bug on update
#1

[eluser]anurat[/eluser]
Hi All,
I found that if I put null value in where clause,
It will update the whole table. This is very serious
It should return an error and not execute the command
which is what happens if you use sql update statement.

Here is an example.
Code:
$id = null;
  $_data = array( 'csu_id' => 20 );
  $this->db->where( 'sl_id', $id );
  $this->db->update( 'storefront_lead', $_data );
All rows will have csu_id = 20

Thanks,
Anurat,


Messages In This Thread
active record bug on update - by El Forum - 10-10-2007, 11:01 AM
active record bug on update - by El Forum - 10-10-2007, 01:11 PM
active record bug on update - by El Forum - 10-10-2007, 01:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB