Codeigniter Active record help
Posted
by sea_1987
on Stack Overflow
See other posts from Stack Overflow
or by sea_1987
Published on 2010-05-05T09:19:07Z
Indexed on
2010/05/05
9:48 UTC
Read the original article
Hit count: 150
Hello,
I am trying to increment a INT column by 1 if a certain field is not null on an update request, currently I have this update too columns,
public function updateCronDetails($transaction_reference, $flag, $log) {
$data = array (
'flag' => $flag,
'log' => "$log"
);
$this->db->where('transaction_reference', $transaction_reference);
$this->db->update('sy_cron', $data);
}
What I need to know is how I can check if the value being sent to the log field is NULL and if it is how could I increment a column called count by 1?
© Stack Overflow or respective owner