i have 'topic' and 'comment' fields in table of database ,when some one give comment on topic no 1 ,it save in dabase with topic number and comment,
i want show topic number with higest comment.
tell me sql query to show result

SELECT count(*) AS count, topic 
FROM comments 
GROUP BY topic
ORDER BY count DESC LIMIT 1

nt show topic number with higest comment.
tell me sql query to show result

tell me same query if my table name is 'orange'

I am sure you can do that yourself.

Be a part of the DaniWeb community

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