Delete records not in top 15


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I'm creating a hall of fame page in my game and the page will only display the top 15 scores.
So I want to delete the scores that get bumped down the list.

How would I write the query to delete everything NOT in the top 15?

I've been trying different things, but nothing is working.
I thought maybe something like this, but it didn't work.
Line number On/Off | Expand/Contract $removeold = $db->execute("DELETE FROM `soundoff_hof` WHERE `id` NOT IN (SELECT `id` LIMIT 15 FROM `soundoff_hof`)");

am I close with something like this, or is there another method to do it?

No comments posted yet

Your Answer:

Login to answer
303 Like 25 Dislike
Previous forums Next forums
Other forums

Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

SAP Management Console is blank
Dear All ,

I am facing problem in my des sever suddely in SAP Management Console is blank and

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

Problem with Subscreen
Dear Experts ,
I am facing a problem with the subscreens. My senario is as follows :

Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of

CHMOD script
Hi,

I need a script to read all files in a folder and set to 777.

Can anyone help out

Libraries in C++
Hi all,

I have two libraries. one is based targeted on linux platform and uses another li

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash