Eric4gh Posted May 1, 2008 Share Posted May 1, 2008 Hi everyone. I wonder if anyone would know how to query WHMcs to see if a certain product add-on has been added to an order. This would be a very similar query to what is written into invoices.php - that lists hosting add-ons. (although I can't see it because the file is encoded.) I see that this type of information is stored in table: tblhostingaddons - and there are three identifying columns "id", "orderid", and "hostingid" However, I am not the best at creating queries. The goal is to take an action based if on order includes an add-on for Sitebuilder access. This column name where the add-on is named is "name" and if this column contains text "Sitebuilder Access" - then the query should return positive. Thank you for your help. 0 Quote Link to comment Share on other sites More sharing options...
Eric4gh Posted May 2, 2008 Author Share Posted May 2, 2008 I imagine it would be something along the lines of this this SQL query: $qresult = mysql_query("select * FROM tblhostingaddons WHERE $vars["accountid"] eq hostingid AND name='Sitebuilder Access'"); if(mysql_num_rows($qresult) > 0) { // create new sitebuilder site } else { // customer does not have a Addon } 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.