Trying to get this to work, but i cannot find any documentation. Trying to migrate some evo code over, but not sure what to change in order to get everything to work "with minimal changes"!
Original Example from Evo:
$meQuery = $modx->db->query( "SELECT * from somewhere");
$queryArray= $modx->db->makeArray( $meQuery );
foreach ($queryArray as $result) {...}
Code for Revo
$meQuery = $modx->query( "SELECT * from somewhere");
$queryArray= $modx->makeArray( $meQuery );
foreach ($queryArray as $result) {...}
but it fails on $modx->makeArray
what should i do, is there an equivalent for makeArray in Revo?
My head is in a sad sad place where there is no inspiration today! Thickness galore
Hmm thats what i thought, but if i leave my code as
$modx->db->query( "SELECT * from somewhere");
it fails on that line, claiming "Call to a member function query() on a non-object"?
I have ensured DBAPI is installed and enabled...
mkay, got it to work.
In plugin system events, i had to tick OnWebPageInit. This seems to have initialised the plugin... hopefully in the correct way.
-
MODX Staff
- 10,725 Posts
You should have been presented the option to register the Plugin with the appropriate events when installing it.