PHP error - Page 2

PHP error

2»

Answers

  • menashemenashe Posts: 198Questions: 44Answers: 2

    Thank you both!

    At least I wasn't crazy in being clueless--I have not done that before.

  • rf1234rf1234 Posts: 3,021Questions: 88Answers: 421
    edited November 6

    At least I wasn't crazy in being clueless--I have not done that before.

    No worries :smile:

    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 :wink:

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    edited November 7

    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).

    Allan

Sign In or Register to comment.