Hi there
Using 0.95 btw.
I’m attempting to implement a ’custom’ modx set of tables which deal with credits and the likes.
I’ve added them alongside the existing Modx_ set of tables but when I try to insert data into them
I get the follow reported back.
Fatal error: Call to a member function insert() on a non-object in E:\Apache2\htdocs\cms_tests\assets\snippets\CreditSystem\credits.php on line 29
Am I missing something? The code making the call is an include being called from a snippet and operates fine otherwise until I use the
$modx->db->insert
Cheers!
TXRX
-
MODX Staff
- 10,725 Posts
Without seeing the code in context, it’s gonna be mighty hard to help with this one...
got it sussed. I was over complicating the MySQL definitions and using the $modx->db->Insert dbapi wrongly. I’ve got it working at basic level just now but now I understand how to use it properly and look forward to filling my project credit system with loads of lovely data!
That is one nice API btw. Sooo useful!