Jump to content

how i can dysplay products prices on non whmcs page ?


biscaino

Recommended Posts

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'" ;

Link to comment
Share on other sites

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();?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated