Jump to content

Archived

This topic is now archived and is closed to further replies.

avo

Error with inputting data to DB

Recommended Posts

Hi All

can 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 to

if i press a button what ever the list is populated with will be echoed out onto my form allong with all the selected data

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

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

Share this post


Link to post
Share on other sites
[!--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 column

and 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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.