Maybe that’s mainly a documentation-issue:
When looking around the forums here I see a lot of (db-related) stuff which is apparently not documented.
"getFullTableName" (what’s the purpose of this one??) "getColumn", "fetchRow" and the like.
Where can I find all this mysterious stuff? Or is it "developers only"?
Is there any source for a more or less complete doc for these parts of the DBAPI?
Now, coming to my current problem:
All I wanted was plain simple: find the highest documentID, so I tried:
$sql = "SELECT MAX(id) FROM ".$modx->getFullTableName("site_content");
$result = $modx->db->query($sql);
$row = $modx->fetchRow($result);
echo $row;
Result of the echo was merely "Array", not at all surprising - but how can I access this array?
print_r should provide more info about the structure and content of that array, but using "print_r $row" in the module-source caused an error.
Really don’t know how to continue coding
And BTW: How do the "pros" develop their more advanced stuff in the MODx environment?
I guess this can hardly be done by typing or copy&paste in the manager’s php-source fields.
Is it possible to get all that MODx system into an IDE, like Eclipse? So that I can see what’s really going on?
Working without a debugger/IDE in a framework like MODx - impossible! At least for me...