I am not sure how this is supposed to work? $results is an array that gets loaded with a few records. I have looked for $row to be populated somewhere else in the code but it is not. My debugger runs down to the $image_filename. But $image_filename is null according to the debugger. I think that it should be the $row->URL_field, which is a string.
PHP Code:
$results = $this->ci->db->get($this->table_name)->result();
$thumbnail_url = !empty($this->thumbnail_path) ? $this->thumbnail_path : $this->image_path;
$final_results = array();
foreach($results as $num => $row)
{
$image_filename = $row->{$this->url_field}; //this is the field that should be populated with the URL string
if (empty($image_filename)) {
continue;
}
Any idea why this is failing to get the string in the URL field? It seems to work normally, except if there is only one row. What is the first row? $row or $row+1?
proof that an old dog can learn new tricks