Request for help with writing a MySQL Query

By JeffC - November 16, 2013

My cmsb has been hacked. My own fault - I have a form without recapture and I have received 87,000 spam entries.

I would like to export all of the entries so that I can sort the genuine from the spam using Apple's 'Pages' software

I have the csv export plugin but it can't handle 87,000 entries (Just gives up on the export after a while).  I also have the MySQL console plugin which I am hoping will do the trick but would like some advice as to what the query should be.

The offending files are in a table called contacts.

To keep the export a manageable size (Pages wasn't designed for large databases it seems) I would like to export the files in batches of 5,000

thanks 

Jeff