Hey guys!
I believe this is the first time I've ever asked you people for help so here goes...
I am currently working on a site that stored statistics on benchmarks that user's submit. An admin comes along, logs in and views these submissions and verifies them. I'll state the query for this in a mo, but I want in the list of hardware types to have a number in brackets () stating the amount of successful queries.
How do I do this? I know that the links will go to the next page with the actual queries but for ease' sake, let's assume this number is on the same page as the queries.
I'm gonna use the example from querying the CPU table.
$cpu="SELECT * from cpu WHERE verified='No' ORDER by submissionDate"; // Querying the table for unverified CPU submissions
$cpuresult=mysql_query($cpu);
// the below is just the table used for displayign the data in case you need that info. It also says that the results are stored in the array 'CPU'.
while ($cpu=mysql_fetch_array($cpuresult))
{
echo "<tr>";
echo "<td>";
echo $cpu['manufacturer']." ".$cpu['model'];
echo "</td>";
echo "<td>";
echo "<a href=hardwareEdit.php?type=cpu&hwID=".$cpu['IDnum'].">Edit</a>";
echo "</td>";
echo "<td>";
echo "<a href=verify.php?type=cpu&hwID=".$cpu['IDnum'].">Verify</a>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
/* The above table also includes the links that make the changes. Well, the links don't make the changes - they add _GET variables to the URL for the processing page to pick up and make the necessary changes using use of if statements. */
As far as I can see - this is all the info you will need. I hope somebody can help me for a change!! Thanks in advance.