I recently upgraded to EE 2.x. We use custom PHP to pull in additional Tables from MySQL. For some reason in the new version (came from version 1.7), any PHP code we add throws an error such as this:
{!-- ra:000000001f173b7d0000000097627d64 --}
Fatal error: Call to a member function query() on a non-object in /home/xxxx/public_html/system/expressionengine/libraries/Functions.php(688) : eval()‘d code on line 19
I’ve even tested this with a simple query such as this:
<?php
global $DB;
$data = $DB->query(“SELECT * FROM `exp_channels` WHERE `channel_name` LIKE ‘connect’”);
?>
I do have PHP enable for the Template and have never had any issues with this until the new 2.x install. We use this a lot to pull in additional data from tables we import outside of EE.
Any ideas? Thanks!