Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > Databases - MySQL, SQL, Oracle, Access and others
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-10-2005, 08:09 PM   #1 (permalink)
proctor
Junior Member
 
Join Date: Oct 2005
Location: Annapolis, Maryland
Posts: 19
Default Select and add values of field

In this MySQL database each record has a visit_field that is an integer value.

How do I total and return values of the visit_field?

For example, if record 1 has a visit_field value of 8 and record 2 has a visit_field with a value of 10, I want to return 18.

I've been trying to figure this out but have ot been successfull. Tia
proctor is offline   Reply With Quote
Sponsored Links
Old 11-12-2005, 01:04 PM   #2 (permalink)
econ
Junior Member
 
Join Date: Jun 2005
Posts: 28
Default

Have you tried using Sum....

Code:
SELECT SUM( visit_field ) FROM database;
econ is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 09:00 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums