Hi all,
I made a channels page and I want each channels block displaying in the channels page I did that correctly but there is infomation that I want displaying on here that is in different tables..
echo "<table border=\"0\" width=\"749\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"6\" rowspan=\"3\"> </td><td>";
echo "<b>Channel List:</b><br>";
echo "Here is the current list of channels in M3diaServer.com!";
echo "<center><form method=\"POST\" action=\"channels.php?action=search\">";
echo "<input type=\"text\" name=\"name\"> <input type=\"submit\" name=\"search\" value=\"Search\">";
echo "</form></center>";
$gg = mysql_query("SELECT * FROM `accounts` WHERE `channelname`='".$name."'") or die(mysql_error());
$g = mysql_fetch_array($gg);
$result99 = mysql_query("SELECT * FROM `music` WHERE `musicuploaderid`='".$g['id']."'") or die(mysql_error());
$num_rowsy = mysql_fetch_array($result99);
$result98 = mysql_query("SELECT * FROM `videos` WHERE `videouploaderid`='".$g['id']."'") or die(mysql_error());
$num_rowsz = mysql_fetch_array($result98);
$xx = mysql_query("SELECT * FROM `channels` WHERE `accountid`='".$g['id']."'") or die(mysql_error());
$x = mysql_fetch_array($xx);
$result17 = mysql_query("SELECT `channelviews` FROM `channels` WHERE `accountid`='".$g['id']."'");// videos haracter section
$num_rowsx = mysql_num_rows($result17);
$gp = mysql_query("SELECT * FROM `accounts` WHERE `channelname` != 'NULL' ORDER BY `channelname` ASC") or die(mysql_error());
while($p = mysql_fetch_array($gp)){
echo "<table width=\"749\" height=\"115\" bgcolor=\"#FFFFCC\" border=\"0\" style=\"border: 1px solid #000000\">
<tr><td width=\"146\" rowspan=\"2\">
<p align=\"center\"><img src=".$p['dpic']."><br><br>".$p['profile_name']."</td>
<td width=\"593\" colspan=\"2\"><img src=".$x['channelicon']."> <a href=\"channels.php?name=".$p['channelname']."\">".$p['channelname']."</a></td></tr>
<tr>
<td width=\"257\">Music: ".$num_rowsz."<br>
Videos: ".$num_rowsy."</td><td width=\"332\">Views:<br>
".$num_rowsx.</td><br>
</tr>
</table>";
}
echo "</td></tr></table>";
As you can see.. there is 3 results that need to be the number of rows and 1 other result is from another table:
".$num_rowsz." = is from the table music and I want this displaying how many music files the user has uploaded
".$num_rowsy." = is from the table videos and I want this displaying how many videos the user has uploaded
".$num_rowsx." is from the table channels and I want this displaying the amount of views of each channel
x channelicon = is the channels icon
Can anyone help me this all needs to be inside the while tag.. I have been at this for hours trying to figure out how to make it work I googled and searched but no luck..