I just need a few links on how to do the following
Install XPDO
Insert row into a existing database table
update row into a existing database table
retrieve records from a existing database table.
-
☆ A M B ☆
- 3,141 Posts
http://www.xpdo.org/documentation/
If you’re looking to use it within MODX, here’s a little somethign to get you started..
Insert
$res = $modx->newObject('modDocument'):
$res->set('pagetitle' => 'Pagetitle comes here!!');
$res->setContent('This is your long text explaining about your pagetitle.');
$res->save();
Update
$res = $modx->getObject('modResource',5);
$res->set('pagetitle',$res->get('pagetitle').' and some more');
$res->save();
Retrieve records
$c = $modx->newQuery('modResource');
$c->where(array(
'parent' => 3,
'published' => 1,
'hidemenu' => 0));
$ress = $modx->getCollection('modResource',$c);
$o = array();
foreach ($ress as $res) {
$o[] = $res->get('pagetitle')
}
return implode(", ",$o);
Thanks for the examples but how would you use it externally without modx at all
If you’re using it with MODX Revolution, it will be installed automatically and there’s some info here that may help:
http://bobsguides.com/revolution-objects.html
What if you are not using modx but only using XPDO is that possible