i want to query my database using php count to count the number of values in a table then count which value appears more times than the others. Im new to this kind of thing.

Recommended Answers

The PHP version of count and max work on arrays. What you need is the MySQL version of COUNT and MAX. I'll move this to the right forum. Please explain what data you have, and what the expected output should be.

Jump to Post

All 3 Replies

The PHP version of count and max work on arrays. What you need is the MySQL version of COUNT and MAX. I'll move this to the right forum. Please explain what data you have, and what the expected output should be.

i understand how the functions work on mysql but i want this to be part of my php. I have a table called polls and there is a row named event and i want to count the number of distinct events in this column and then datermine which event appears more times than the others, is this possible.

Okay, I'll put it back in the PHP forum. Show some code. Clearly indicate what part you need help with.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.