Hello,
Can someone help me figure this out? I have a count query that does exactly what I need when I run it directly against my dabase, but the count column does not show up in the resulting PHP page that I'm making. How do I get the data from the count column to appear??
Here is the code:
<?php
$query=("SELECT disp_name, COUNT(*) FROM links, stitchers WHERE links.stitcherid = stitchers.stitcherid GROUP BY links.stitcherid ORDER BY 2 DESC") or die("Couldn't execute query.");
$result=mysql_query($query);
{
echo ("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
echo ("<tr><th><u>Stitcher Name</u></th><th><u>Count of Links</u></th></tr>\n");
while($row=mysql_fetch_array($result)) {
echo("<tr>");
echo("<td>".$row["disp_name"]."</td>");
echo("<td>".$row["count"]."</td>");
echo("</tr>");
}
echo("</table>");
}
?>
when I run this, the only column that has info is the first one, where i get my list of names. I guess I just don't know what to put in the second echo statement of my array to make the data in the count column appear. any advice?
Thanks!