Lukemob Posted October 25, 2010 Share Posted October 25, 2010 Hi, I have a small problem. Each time I want to connect DB from tpl file it doesn't work. It shows: NULL Code in .tpl: {php} function ht_getPrice($id="", $currency="", $period="") { $query=mysql_query("SELECT ".$period." FROM tblpricing WHERE relid='".$id."' AND currency='".$currency."'"); while($row=mysql_fetch_array($query)) { $price=$row[$period]; } return $price; } $test=ht_getPrice("68","1","monthly"); var_dump($test); {/php} If I include dbconnect.php, it stops showing anything. Any ideas? 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.