Hi
How do I instantiate the xPDO object to use the current connection, so I can write my own sql? I am running this within a snippet.
I have much more complex SQL which would be much easier to write in SQL using prepared statements so I rather not use the ORM for now.
At the moment, I am doing :
$dsn = 'mysql:host='.$hostname.';dbname='.$dbname;
$xpdo= new xPDO($dsn,$username,$password);
$stmt = $xpdo->prepare("INSERT INTO outlinks_log
(`trackTy`,`tracking_code`)
VALUES(':trackTy',':tracking_code')");
$stmt->bindParam(':trackTy', $this->dcstormTracking);
$stmt->bindParam(':tracking_code', $this->a8id);
$stmt->execute();
Do I have to get the db details separately from the config?