Hi
I’m trying to create a custom table on instructions
http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components. Filled with all my map and class files.
I run:
======================================================
$Stores = $ modx-> getCollection (’sfStore’);
echo ’Total:’. count ($ stores);
======================================================
In the frontend I see "Total: 0"
But the mysql tables are not created, what could be the problem?
======================================================
$store = $modx->newObject(’sfStore’);
$store->fromArray(array( <<< Fatal error: Call to a member function fromArray() on a non-object in line
’name’ => ’Store 1’,
’address’ => ’12 Grimmauld Place’,
’city’ => ’London’,
’country’ => ’England’,
’zip’ => ’12345’,
’phone’ => ’555-2134-543’,
));
$store->save();
======================================================
Sorry for my english.