i not new to codeigniter 2 but i wasn't using flashdata before and i started to use it today i got strange issues i'm creating if statment
$query = $this->db->get_where('blocks', array('block_id' => $id));
if($query->num_rows() < 1)
{
$this->session->set_flashdata(array('notify_type'=>'error', 'notify_msg'=>'some error msg'));
return false;
}
return $query->row();
the problem is ,
my model returns the query perfect
and also the flashdata triggers
i'm sure num_row is < 1 and if not i has to return false;
but its returns the query
any help !!
According to the documentation of Session Documentation
CodeIgniter supports “flashdata”, or session data that will only be available for the next request, and is then automatically cleared. This can be very useful, especially for one-time informational, error or status messages
See also this link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With