If a item does not exist it gives a :
"Fatal error: MySQL Error: ( SELECT * FROM `[prefix]albums` WHERE id = ) failed. MySQL returned the error MySQL not connected in /home1/glamwor2/public_html/clients.zen.com/zp-core/functions-db-MySQL.php on line 69"
$imageobject = getItemByID("images", '4000'); (wrong or removed ID)
any way to check the if exists to avoid this error so I can do a proper exit out the code?
Comments
Fatal error: MySQL Error: ( SELECT `id`, `date`, `data` FROM `[prefix]search_cache` WHERE `criteria`='a:5:{s:4:\"item\";s:6:\"albums\";s:6:\"fields\";s:4:\"tags\";s:6:\"search\";s:20:\"a:1:{i:0;s:3:\"Vue\";}\";s:4:\"sort\";s:1:\" \";s:4:\"user\";s:13:\"76.173.231.93\";}' ) failed. MySQL returned the error MySQL not connected in /var/www/vhosts/my-domain.com/httpdocs/gallery/zp-core/functions-db-MySQL.php on line 69
I this first when clicking on an image's tag. If I hit the back button, any link will give the same error. If I start over (refresh gallery home), I can navigate normally, as long as I don't click a tag.
I am not sure exactly when this started.
I'll take a look at the MySQL logs to see if I can determine the underlying issue.