Directlinq Posted September 11, 2011 Share Posted September 11, 2011 Help im really struggling. I have hit a brick wall in my php mysql project, i hope somebody can help me. I have a mysql table, here is a sample id DATE TIME BRTOTAL BRNO LENDER LONO LOTOTAL 54 10/09/2011 14:09 - - >>4.7% 40 £12k 55 10/09/2011 14:09 - - 4.6% 31 £6k .56 10/09/2011 14:09 - - 4.5% 106 £32k. .57 10/09/2011 14:09 - - 4.4% 14 £15k. 59 11/09/2011 14:09 - - >>4.7% 40 £12k 60 11/09/2011 14:09 - - 4.6% 31 £6k .61 11/09/2011 14:09 - - 4.5% 106 £32k. .62 11/09/2011 14:09 - - 4.4% 14 £15k. 64 11/09/2011 15:09 - - >>4.7% 40 £12k 65 11/09/2011 15:09 - - 4.6% 31 £6k .66 11/09/2011 15:09 - - 4.5% 106 £32k. .67 11/09/2011 15:09 - - 4.4% 13 £13k. Sorry if the layout has gone sqew but you get the idea. This is what i need to do If there is more than 2 records with the same date and time, delete the records with the same date and time except for 2 with the highest id I have put .'s by the records that should be left, once the code has been run. Could somebody help me try and put this into php script to delete records from mysql table. Many Many Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.