Check to see if column exists in the table being edited |
7/26/2022 2:38:32 PM |
PHPRunner General questions | |
A
asawyer13 authorDevClub member
I want to add code for updating a couple columns like date modified. Is there a way to check to see if a column exists in my table during before add and before update events? Thanks |
|
![]() |
Sergey Kornilov admin 7/26/2022 |
It will be cumbersome but check this post on Stackoverflow for instance. |
A
|
asawyer13 authorDevClub member 7/27/2022 |
I was thinking I might be able to interogate the data values somehow like $data["datamodified"] == nil or something. But if it can't be done, I don't think it's worth doing a database query so I'll just only put the code in if the column(s) exist. Alan |