At least I wasn't crazy in being clueless--I have not done that before.
No worries
I am here to help. Of course these "scary" use cases aren't exactly what you see in the docs. But for the heavy lifting AND if you want to rely on Data Tables and Editor to support all of your use cases, then you need to be able to do those "customizations".
I had to work hard to make these things work, but it was worth it. I don't have a single CRUD application that doesn't use Editor. That makes life a lot easier.
If you need more code examples just let me know. I have tons of them
There is an example using the Database->insert() method from the Editor database abstraction library shown here.
The full list of methods is available here (select and insert are what you would be interested in here). And there is also the raw method like in @rf1234's example if you just want to execute some SQL.
One thing to remember, use $editor->db() to get the current DB transaction handler (assuming you have transactions enabled, which they are by default).
Answers
Thank you both!
At least I wasn't crazy in being clueless--I have not done that before.
No worries
I am here to help. Of course these "scary" use cases aren't exactly what you see in the docs. But for the heavy lifting AND if you want to rely on Data Tables and Editor to support all of your use cases, then you need to be able to do those "customizations".
I had to work hard to make these things work, but it was worth it. I don't have a single CRUD application that doesn't use Editor. That makes life a lot easier.
If you need more code examples just let me know. I have tons of them
There is an example using the
Database->insert()
method from the Editor database abstraction library shown here.The full list of methods is available here (
select
andinsert
are what you would be interested in here). And there is also theraw
method like in @rf1234's example if you just want to execute some SQL.One thing to remember, use
$editor->db()
to get the current DB transaction handler (assuming you have transactions enabled, which they are by default).Allan