xgarb
August 9, 2021, 6:05pm
1
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');
");
markh
August 9, 2021, 7:00pm
2
Sure, but $transport->xpdo instead of $transport->$xpdo.
xgarb
August 9, 2021, 7:11pm
3
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...
system
Closed
August 11, 2021, 7:11pm
4
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”.