Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 02-14-2005, 05:06 PM   PM User | #1
fana605
New to the CF scene

 
Join Date: Feb 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
fana605 is an unknown quantity at this point
Get the most frequent field

Hello!
I have a database where I insert fields from a form. These fields are like: enterprise, adress, date of question, date of answer and question theme. I choose this "question theme" from a list box and they are always the same (arround 15). I now wanted to list the most frequent "question theme" of the month.
Does anybody have an idea?
Thanks
fana605 is offline   Reply With Quote
Old 02-15-2005, 02:11 PM   PM User | #2
kenetix
New Coder

 
Join Date: Feb 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
kenetix is an unknown quantity at this point
if question_theme is an integer value say everytime someone posts a question theme, it increases the count by 1 then you can list all rows order by question theme DESC

however if question_theme is text you could do a num_rows query where question_theme LIKE '%$yourpost%'

so it does a search for the most similar matches related to question theme
__________________
Kenetix:: Achieving more than the ordinary.
http://www.kenetix.net
kenetix is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:24 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.