Well that stopped it from crashing.
I am trying to return the field $campaign. Here is the code
$query=$this->db->get_where('employees', array('employee_email'=>$email_key));
if ($query->result_id->num_rows > 0)
{
$camp=$query->result()->$campaign;
}
I thought this would do it but it is returning $camp=null. There are two rows where employee_email=$email_key, so num_rows=2. But how do I reposition the pointer to point at the first row and then get a single value?
proof that an old dog can learn new tricks