Hi Sottwell, thanks for the link.
I have been following the "Custom Database Tables" from Bob's Guides at
http://bobsguides.com/custom-db-tables.html and have been able to partially run the "Create XPDO Classes" (some tables indicated missing ID primary key even tho row included ID fields) script but I'm currently having trouble getting the code from "Show Quotes" snippet to work with my application tables.
I have attached the MySQL database and files produced vis the "Create XPDO Classes" snippet.
If anyone can provide advise I would be extremely grateful.
$path = MODX_CORE_PATH . 'components/bookingsystem/';
$result = $modx->addPackage('bookingsystem',$path .
'model/bookingsystem/','booking_');
if (! $result) {
return 'failed to add package';
} else {
$output = '<p>added Package</p>';
}
$quotes = $modx->getCollection('vacationrentalslistings');
foreach($quotes as $quote) {
$output .= '<p>owner_id: ' . $quote->get('owner_id');
}
return $output;