Menu

PHP code in datamodel not executing

2023-04-11
2023-05-17
  • Abdullah Noman

    Abdullah Noman - 2023-04-11

    Hello,

    I have followed the tutorial outlined in this page: https://www.itophub.io/wiki/page?id=3_0_0:customization:insert-xml#insert_a_php_method . But from what I can understand is that my php code is not executing when the objects are loading. Can anyone explain me how the php code is supposed to work when it is included in a datamodel file and what are the steps I can take to make sure/test that my php code will be executed?

    Thanks in advance.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-04-12

    You'll first need to explain much more what you want to try, and how you tried it.

    The proper solution would be to create an extension to modify the datamodel, and re-run the setup. This generates some PHP files which would include your code, if done properly.

     
  • Abdullah Noman

    Abdullah Noman - 2023-04-12

    Hello Jeffrey, I do have an extension and writing code in the datamodel file. I am trying to create a simplified ticket system, when all the tickes are displayed I want to show the unique attribute "id" that is the db_key_field for each ticket and also add a hashtag with it. But I cant access the db_key_field and I am wondering how can I do that. Besides, can I have a field that will be autoincremented?

     
  • Pierre Goiffon

    Pierre Goiffon - 2023-05-17

    Question was answered in [7d4cec3bb3]

     

    Related

    Discussion: 7d4cec3bb3


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.