Sandbird Posted September 13, 2010 Share Posted September 13, 2010 Hi, I am having problems making a php page that will output the domain names and their prices on a table. I got this code from a tpl file: {foreach key=num item=tldpricelist from=$tldpricelist} <tr class="clientareatableactive"><td>{$tldpricelist.tld}</td><td>{$tldpricelist.period}</td><td>{if $tldpricelist.register}{$tldpricelist.register}{else}{$LANG.domainregnotavailable}{/if}</td><td>{if $tldpricelist.transfer}{$tldpricelist.transfer}{else}{$LANG.domainregnotavailable}{/if}</td><td>{if $tldpricelist.renew}{$tldpricelist.renew}{else}{$LANG.domainregnotavailable}{/if}</td></tr> {/foreach} and i am trying to make the php file. function getDomains() { $query = mysql_query("SELECT d.id, d.extension 'tld', t.type, c.code, c.suffix, t.msetupfee FROM tbldomainpricing AS d INNER JOIN tblpricing AS t ON t.relid = d.id INNER JOIN tblcurrencies AS c ON c.id = t.currency WHERE t.type IN ('domainregister','domaintransfer','domainrenew') ORDER BY d.id ASC"); $dataArray=array(); while($row = @mysql_fetch_array($query, MYSQL_ASSOC)) { $dataArray[$row['tld']][$row['type']]=$row; } return $dataArray; } $mydata = getDomains(); $smartyvalues["tldpricelist"] = $mydata; But i notices that the period of the domain names is nowhere to be found in the database. For example i have set some names on a minimum of 2 years registration, renewal period...but i cant find this value anywhere in the database. Can someone provide the original SQL that produces the values for this table ? TLD | Min Reg Years | Register Price | Transfer Price | Renewal Price Thanks 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted September 13, 2010 Share Posted September 13, 2010 there is example code pasted elsewhere on the forum for showing the domains and their pricing (from tblpricing) on external sites ... 0 Quote Link to comment Share on other sites More sharing options...
Sandbird Posted September 13, 2010 Author Share Posted September 13, 2010 yeah...thats the code i use above but its not including the duration of the names (ex. .com for 2 years)...like the original function does. The original function has that field...but it uses some complex functions to show it on the table...cause the period of a name is writen in different tables (msetupfee qsetupfee ssetupfee asetupfee bsetupfee) 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.