biscaino Posted May 26, 2010 Share Posted May 26, 2010 how i can dysplay products prices on non whmcs page i need show name description and monthly prices i try this query bin my page and not work $sql = "SELECT tblproducts.name, tblproducts.`description`, tblpricing.monthly FROM tblproducts, tblpricing WHERE gid = '1'" ; 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted May 27, 2010 Share Posted May 27, 2010 you have to connect to the whmcs database. best thing using something on non whmcs pages ist using the api and maybe own api functions. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted May 27, 2010 Share Posted May 27, 2010 You can try Sparky's Mod it works perfectly! 0 Quote Link to comment Share on other sites More sharing options...
dzhorov Posted May 28, 2010 Share Posted May 28, 2010 As HerrZ suggested, you will need to connect to the WHMCS database. In order to do that, you will need to build your website around WHMCS and not put it in a separate sub-directory. You can read http://wiki.whmcs.com/Creating_Pages which will certainly help you alot. It helped me! 0 Quote Link to comment Share on other sites More sharing options...
biscaino Posted May 28, 2010 Author Share Posted May 28, 2010 well i foud this query and it show all my products now i want its show only gid = 4 my whmcs is utf SELECT p.name, p.description, t.monthly, t.quarterly, t.semiannually, t.annually, c.code FROM tblproducts AS p INNER JOIN tblpricing AS t ON t.type='product' AND t.relid = p.id INNER JOIN tblcurrencies AS c ON c.id = t.currency WHERE p.hidden != 'on' AND p.type ='hostingaccount' my php function mysqlexecuta($id,$sql,$erro = 1) { if(empty($sql) OR !($id)) return 0; //Error if (!($res = @mysql_query($sql,$id))) { if($erro) echo "mysql error ."; exit; } return $res; } $sql= "SELECT p.name, p.description, p.gid, p.id, t.monthly, c.code FROM tblproducts AS p INNER JOIN tblpricing AS t ON t.type='product' AND t.relid = p.id WHERE p.hidden != 'on' AND p.type ='hostingaccount'"; $res = mysqlexecuta($id,$sql); <? print 'Qtd:'.mysql_num_rows($res).'<br />'; while ($row = mysql_fetch_array($res)) { ?> <tr> <td><?php print $row['name'];?></td> <td><?php print $row['description'];?></td> <td><?php print $row['monthly'];?></td> </tr> <?php } mysql_close();?> 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.