Jump to content

[SOLVED] Quick Question


pspfreak101

Recommended Posts

Ok I'm trying to get the statistics of how many approved entries their are (approved being 1) and how many unaproved entries (unaproved being 0)

 

So my question is how can I just make it like this "Unaproved entries 10, Aproved entres 5"

 

Here is my code

 

if (@$_GET['action'] == 'dapprove') {

if ($row["admin"] == "1") {

$sql = "SELECT * FROM downloads";
$result = mysql_query ($sql);

$row = mysql_fetch_array($result);

$approved = ($row["approve"] == 1);
$unaproved = ($row["approve"] == 0);

if(empty($unaproved)) {
$unaproved = 0;
}

echo "Their are ". $approved ."  approved entries<br>";
echo "". $unaproved ." waiting for approval<br>";

}//End admin
}//End dapprove

Link to comment
Share on other sites

I'm trying to make it gather all the approved entries and telling me how many their are such as "6 approved entries"  1 and 0 stand for approved and disapproved

 

So right now its not displaying all the entries and only says this "Their are 1 approved entries

0 waiting for approval" their is one approved entrie but 5 are not approved and yet it still says 0

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.