View Single Post
Old 12-12-2005, 05:56 PM   #1 (permalink)
airoid
Junior Member
 
Join Date: Dec 2005
Posts: 2
Default Adding Selected Fields in mySQL

I have a table in mysql with a "titles" column filled with a number and a "userid" column filled with the User ID. I am trying to add the values of all of the "titles" columns for a specific User ID. For example:

userid titles
104 2
125 1
104 5
182 3

I want to add the number of "titles" for userid 104. The output would be 7 (2+5). How would I do this?
airoid is offline   Reply With Quote
Sponsored Links