Hi, thanks for your suggestion but I already have an update query in my code...
Let me repeat the scenario.. I have 4 scroll boxes on my front page corresponding to SEC_ID1,2 3 & 4 respectively.. Everytime I feed data thru a backoffice into a db, it updates the existing first four fields in the database , the data shows up in the front page and everything works fine.. BUT what happens is it overwrites the existing data!! what I am now trying to do is a way to archive the existing data to be displayed later on another page while Replacing/Updating the first four fields of the db to show the new data on my frontpage.. I hope I could convey what I need.. Would appreciate any more suggestions... TIA, sandeep ----- Original Message ----- From: "jim barchuk" <[EMAIL PROTECTED]> To: "Sandeep Murthy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 3:25 AM Subject: Re: Inserting Data on top > 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