Have been using php code snippet in editor to show some values like an dashboard in PHPRunner 7.1 and older.
In my project for 8.0 i have added 3 different databases:
hosted_wg
shorewarecdr and
shoreware
As example i try to show value of incoming calls in an listpage (most of all i would like it to display in dashboard).
The code should select from the db and table shorewarecdr.call
In the listpage of table "call" i have added this php code snippet:
$rstmp = CustomQuery("SELECT
COUNT(CallID) AS COUNT(CallID)
FROM call
WHERE (WorkgroupCall =1)
GROUP BY WorkgroupCall
ORDER BY StartTime DESC");
if ($datatmp = db_fetch_array($rstmp))
echo "Inkommande samtal: ".$datatmp["COUNT(CallID)
"];
Now in PHPRunner 8 i get fault message like:
Table 'hosted_wg.call' doesn't exist
Is there a way to make the code choose the right database?
I guess that i chooses the databse "hosted_wg" as that was the first database i added to the project?