Ci can not use the correct SQL to access database, and return an right object,
so that's why I use this sentence would call to a member function row() on a non-object ,
$query->row(0)->$photodbfield[1];
The problem is cause by the line highlighted:
Change that to correct SQL can run again:
$sql = 'SELECT * FROM p_photo AS pTo that : (added the quotion mark in red)
LEFT JOIN p_index AS ind ON p.photo_id = ind.p_photo
WHERE ind.html_index = '.$html_index.'
LIMIT 1;';
$sql = 'SELECT * FROM p_photo AS pP.s. So the solution is tried to look for the error in your SQL
LEFT JOIN p_index AS ind ON p.photo_id = ind.p_photo
WHERE ind.html_index = "'.$html_index.'"
LIMIT 1;';
No comments :
Post a Comment