asprin
Active member
My addon will be using the credits/vcash feature from other some other addons (to my knowledge, there about 2-3 addons that add this feature). The basic idea is to know which column in the
Now whenever I want to modify the value in this column, I feel it's best to validate the existence of the column first (because the site admin may not always be accurate with the words/spelling of the column) before running the update query on the table/entity.
So is there a valid way to check this from my addon's controller? Can I directly use the
xf_user
table does the addon store the vcash/credit value. In order to do this, I've added two fields as part of my addon options like below:Now whenever I want to modify the value in this column, I feel it's best to validate the existence of the column first (because the site admin may not always be accurate with the words/spelling of the column) before running the update query on the table/entity.
So is there a valid way to check this from my addon's controller? Can I directly use the
$db
object to do a SHOW COLUMNS
query or is there a more effective to do that?