Hi everyone, have a look at this custom function
when I call for example (countcat(5)) it only prints "List: ", I tried (countcat('5')) also doesn't work.. the connection and query is correct cause when I write it like thatPHP Code:function countcat($ccount){
$conn=mysql_connect($server,$dbuser,$dbpass);
$q="select * from linkslinks where catno='$ccount'";
$r=mysql_db_query($dbname,$q,$conn);
while($row=mysql_fetch_array($r)) {
print "List: " . $row[title];
}
}
it works fine.. wut am I missing? TY..PHP Code:$conn=mysql_connect($server,$dbuser,$dbpass);
$q="select * from linkslinks where catno='$ccount'";
$r=mysql_db_query($dbname,$q,$conn);
while($row=mysql_fetch_array($r)) {
print "List: " . $row[title];
}


Reply With Quote

Bookmarks