lazymofo / datagrid

PHP MySQL CRUD Datagrid
MIT License
141 stars 57 forks source link

custom update sql #81

Closed jmbanda closed 2 years ago

jmbanda commented 2 years ago

Greetings! Great contribution! I am wondering if there is a nicer way to pass a custom update SQL query other than hacking it directly in the main sql_update function.

Thanks in advance!

lazymofo commented 2 years ago

If you need to run additional SQL you can place it in an event hook:

https://htmlpreview.github.io/?https://github.com/lazymofo/datagrid/blob/master/index.html#on_insert_update_delete_events

https://htmlpreview.github.io/?https://github.com/lazymofo/datagrid/blob/master/index.html#on_insert_update_delete_events

on_insert_user_function on_update_user_function on_delete_user_function on_update_grid_user_function

after_insert_user_function after_update_user_function after_delete_user_function after_update_grid_user_function

On Sun, Nov 14, 2021 at 3:03 AM Juan M. Banda @.***> wrote:

Greetings! Great contribution! I am wondering if there is a nicer way to pass a custom update SQL query other than hacking it directly in the main sql_update function.

Thanks in advance!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lazymofo/datagrid/issues/81, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRM2WGBG4ZVOZD5HNVOK23UL6JRTANCNFSM5H7XJCWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.