|
NEODARK -> How to count same text values in one field, display total of each (4/10/2007 16:23:36)
|
Hey guys, New to the forum, but this is a great little site you have here, props. [:D] I have a little problem. I'm trying to create a page than can count the total number of equal values within a database column. (sort of like count) For example the database has 5 fields, one of them is PART. The form submitting to this database has pre-determined values in a drop down list, like type1, type2, type3, type4, type5. All these different types are values that will submit to the "PART" column. I can't figure out how to create a page that can look at the "PART" column, find how many type1, type2, type3, type4, type5 values are in it, count them then display using "GROUP BY" something like: PART: type1 total 5 type2 total 25 type3 total 56 type4 total 8 type5 total 3 Problem is that these are text values, so I can't figure out the correct SQL statement to make "COUNT" and "GROUP BY" work. I hope this makes sense, thanks for the help in advance :)
|
|
|
|