how to count how many times in mysql database

Mobile
feeds
Welcome Login | Register

how to count how many times in mysql database
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » MYSQL Forums
        » » how to count how many times in mysql database
how to count how many times in mysql database
Post Description: how to count how many times in mysql database MYSQL
Post Tags:
This Post Has Been Viewed 173 Times Since Sun Oct 05, 2008 2:17 pm Author hostman with 1 replies
how to count how many times in mysql database
Advertise On This Page




ok, if you are reading this post, im hoping you are here because you want to count how many rows are in your database with a specific value.

lets say you have a wallpaper website and you want to know how many times a member of your website has submitted a wallpaper.

well you can use this query example for counting the number of times the user "wallpaperama" has submitted a wallpaper.
you have a database able which is called "usersdb".

is the "usersdb" database, you have a field called "userid"

the "userid" for "wallpaperama" is equals to "345"

now that you have this information, you can send this query:


$sql = "SELECT COUNT(userid) AS TOTAL FROM users WHERE userid='345'";

$results = $myrwow['userid'];



when you execute this query, it will show you the number of times

hope this helps





Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : how to count how many times in mysql database

Comments and replies About how to count how many times in mysql database
:: 1 :: Reply #111896 Reply By James On Fri Aug 07, 2009 4:18 am
James:
thanks alot mate