Hi Guys, I have been given a task to convert the code of PHP to Coldfusion. However I am Stuck at this PHp Stuff.
Please Guide Me
PHP Code:
$result = mysql_query("select cid, title, cdesc from cat where parentid=0 order by title", $link);
$count =1;
$displaycat="<tr>";
while(list($cid, $title, $cdesc) = mysql_fetch_row($result)) {
$sql=mysql_query("SELECT count(list.listid) AS totallist, count(cat.cid) as totalcat FROM list LEFT JOIN cat ON list.cid = cat.cid WHERE list.cid =cat.cid AND cat.parentid='$cid' or cat.cid ='$cid' AND active='1'",$link) or die("Error".mysql_error());
list($totallist,$totalcat)=mysql_fetch_row($sql);
$displaycat.="<td class=\"nowconvert\"><br><strong><a href=\"index.php?cid=$cid\">$title ($totallist)</a></strong><br>";
$result2 = mysql_query("select cid, title from cat where parentid=$cid order by title limit 0,2", $link);
$space = 0;
while(list($cid, $stitle) = mysql_fetch_row($result2)) {
if ($space>0) {
$displaycat.=", ";
}
$cresult2 = mysql_query("select * from list where cid='$cid'", $link);
$cnumrows2 = mysql_num_rows($cresult2);
$displaycat.="<a href=\"index.php?cid=$cid\">$stitle</a></span>";
$space++;
}
I am Confused at this Guys.
Please help me Guys Thanks
:confused: