I am having trouble in returning data in php from an SQL query. here is my code:
public function get_audit_message($productId,$accountId)
{
$sql_list ="SELECT notes
FROM ".$this->tables_audit."
WHERE productId = '".mysql_real_escape_string($productId)."'
AND accountId = '".mysql_real_escape_string($accountId)."'
";
$query = $this->db->query($sql_list);
if($query->num_rows() > 0)
{
$return = $query->result_array();
return $return;
}
else return false;
}
the reason I am having trouble is that as it is at return $return;
returns the correct number of results but only displays the word "array". then if i change it to return $return[0];
returns the first entry of information correctly.
So what i want to be able to do is select all array numbers e.g return $return[*];
if only was possible.
Any suggestions would be much appreciated.