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;
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());
$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) {
$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>";

I am Confused at this Guys.

Please help me Guys Thanks


8 Years
Discussion Span
Last Post by peter_budo

I think this should be moved to php, if you want so just post bellow your reply. Also you better explain what you looking for or which part of code you do not understand...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.