I am able to select records from the database using get_records but if I need to perform a more complex query such as grouping or summing or such like how to I go about this?
I saw this post:
…and tried the following (just using a very basic query to test it):
$db = get_db();
$select = “SELECT id FROM omeka_items where id = 56”;
$test = $db->getTable(“Item”)>fetchObjects($select);
The result is an array of all kinds of information (including the database password) but not the actual data.
Is there another way I can write SQL queries and send them to the Omeka databse?