avo Posted June 6, 2006 Share Posted June 6, 2006 Hi Allcan any one tell me why this is what i am doing is reading a text file selecting data from the text file and writing it to a DB all is well here im then creating a while loop reading the DB and echoing onto a drop down list all good here toif i press a button what ever the list is populated with will be echoed out onto my form allong with all the selected datathis is all good as long as i have entered data in my database manualy or if i go into and edit one that as been read from a text file dont alter anything and save this can then be read by my script why would this be please ?ive not tryed yet but my guess is if i do an update in my while loop as the text file is been entered into my db this may well solve the prob but just very curious why this is.thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/11362-error-with-inputting-data-to-db/ Share on other sites More sharing options...
shortj75 Posted June 7, 2006 Share Posted June 7, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]this is all good as long as i have entered data in my database manualy or if i go into and edit one that as been read from a text file dont alter anything and save this can then be read by my script [/quote]you have to enter it manualy because it will read the text file as one file and it wouldnt how to seperate it into the appropriate columns it would insert all of it into one columnand yes doing an update will probably work but it will insert you data two or more times depending on how many columns you have in your db table because a while loop keeps looping through each column so it will update every time i hits a new column until it has looped through every column once Quote Link to comment https://forums.phpfreaks.com/topic/11362-error-with-inputting-data-to-db/#findComment-42716 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.