$transport->$xpdo->exec to insert data into a table

Should I be able to insert data into a table with a xPDOScriptVehicle in a Teleport transport package like this?

$transport->xpdo->addPackage($packageName,MODX_CORE_PATH.'components/'.$packageName.'/model/','modx_');

$transport->$xpdo->exec("INSERT INTO 'com_appointment' (`id`, `event_id`, `time`, `available`, `reserved`, `rec_type`) VALUES
(1, 0, '08:00:00', 10, 0, 'master'),
(2, 0, '08:30:00', 10, 0, 'master'),
(3, 0, '09:00:00', 10, 0, 'master');
");

Sure, but $transport->xpdo instead of $transport->$xpdo.

Argh! Cut and paste mash up error!

I also saw this method:

$transport->xpdo->exec("INSERT INTO " . $transport->xpdo->getTableName('ComAppointment'). "(`id`, `event_id`, `time`, `available`, `reserved`, `rec_type`) VALUES...

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.