Hello Sandeep! > I am trying to insert data from a form which has 4 fields such that the data > always sits at the top in my database occupying locations : > > SEC_ID: 1, 2 , 3 & 4 > > Everytime i insert data the data gets appended at the end i,e, if the first > 4 fields are occupied my data takes the postions 5,6,7 & 8 but this wont > do..
Well, if you have a TABLE that contains x records, and you INSERT y records, you now have x + y records. That is the purpose of INSERT and fortunately there is no way around that fact. :) > Can anyone pl help me out with a suitable query to achieve the same?? Sure! Try UPDATE. You will (as it says in O'Reilly,) 'change actual data within a table without altering the table itself.' Meaning you won't be adding or deleting any records, simply adjusting existing records. Have a :) day! jb -- jim barchuk [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php