var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Returning Top N elements
I have a db that stores searches. I want to return top N searches.
Currently it stores like...
I want to return it like...
Can you please help me with the query?
SELECT keyword AS Top
BY COUNT(*) DESC LIMIT N
A little change...
Instead of storing each keyword, I am going to check if keyword is already in table, if yes then increase it's "repeat" column by 1 or else add it to db with "repeat" as 1.
Is it possible with MySQL or do I have to do it in lang?
yes, it's possible
use INSERT... ON DUPLICATE KEY UPDATE ...