TAO 3.3 is released. Check out the announcement here - https://forum.taotesting.com/discussion/593/tao-community-edition-3-3-released#latest
How to make a request to the database PostgreSQL
Hello,
I want to write to a custom table all user session from a method taoDelivery/DeliveryServer/runDeliveryExecution
How to write a request?
$dbquery = new common_persistence_sql_dbal_Driver();
$dbquery->query('custom_table', ['field','value']);
Something like this?
Comments
Hello,
I wrote the code here, but for some reason it doesn’t work. Where is the mistake?
$storageService = $this->getServiceManager()->get(StorageInterface::SERVICE_ID);
$persistence = $storageService->getPersistence();
$sql = "select * from statements where predicate = 'http://www.tao.lu/Ontologies/generis.rdf#login';";
$r = $persistence->exec($sql);
print_r($r);
use common_persistence_SqlPersistence;
use oat\oatbox\service\ServiceManager;