leemason Posted September 5, 2011 Share Posted September 5, 2011 i know with announcements you can get the last modified from the db. im creating a sitemap addon (nearly finished) and it would be great if i could get the last modified for each knowledgebase article. i know this info isnt stored as a value for the articles, but does anyone know a way to use the logs, or a built in mysql command to find the modified date for each row? 0 Quote Link to comment Share on other sites More sharing options...
leemason Posted September 5, 2011 Author Share Posted September 5, 2011 i just found an article which would allow me to alter the table and add a TIMESTAMP row, the set all rows to current time (and update when row is updated later on). I can see this working great, but i would just like to know if the whmcs see altering core tables as bad pratice? should i create a custom table to store this data? and use hooks to check for article updates? or do you think it is okay to alter core tables?? this is the article http://pointbeing.net/weblog/2008/03/mysql-versus-postgresql-adding-a-last-modified-column-to-a-table.html 0 Quote Link to comment Share on other sites More sharing options...
leemason Posted September 7, 2011 Author Share Posted September 7, 2011 after speaking with the support team, my doubts have been confirmed. WHMCS WOULD ADVISE *NOT* TO MODIFY CORE TABLES This is as expected really as it could cause problems. I will have to go down the route of creating a custom table, or getting the team to add either: A: a hook for when knowledgebase articles are saved (so i can capture this information in a seperate table) B: request a last mod field be added to the core knowledgebase articles table. ticket still in progress so i will update when i have more. all developers please take note of the above advice, do not alter core tables. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.