fragger Posted February 16, 2013 Share Posted February 16, 2013 Hello, i have 2 Queries and i don't know how to integrate this in the SQL Helper function. Query #1: SELECT * FROM `mod_customer_rating` WHERE `rating` = '5' AND id >= (SELECT FLOOR( MAX(id) * RAND()) FROM `mod_customer_rating` WHERE `status` = 'Active' ) LIMIT 1 Cause of Select int the WHERE-Clause Query #2 SELECT DISTINCT `tblproductgroups`.`id`, `tblproductgroups`.`name` FROM `tblhosting` INNER JOIN `tblproducts` ON `tblhosting`.`packageid` = `tblproducts`.`id` INNER JOIN `tblproductgroups` ON `tblproductgroups`.`id` = `tblproducts`.`gid` WHERE `tblhosting`.`domainstatus` = 'Active' AND `tblhosting`.`userid` = '$_SESSION[uid]' Cause of DISTINCT in the Select Field Thanks! 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Chris Posted February 16, 2013 Share Posted February 16, 2013 Hello, What SQL helper function? 0 Quote Link to comment Share on other sites More sharing options...
fragger Posted February 16, 2013 Author Share Posted February 16, 2013 http://docs.whmcs.com/SQL_Helper_Functions -> select_query 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.