Hi
I’ve been trying to work out how to write update statements to table outside of modx but inside the same db.
I thought I could leverage the same connection as modx somewhere.
I read
http://modxcms.com/forums/index.php?topic=57183.0
and it indicates I can run
$affectedRows = $modx->exec("UPDATE `food` SET `rating` = 'EXCELLENT' WHERE `type` = 'beer'");
But I wasnt sure if this is safely escaped. How would I write my own prepared statements?