[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,