I'm trying to insert data into a database which has part of a row filled in and part empty. For example, my database has the following structure: userID, user_name, user_pass, user_confirm_pass, user_email, user_address and user_postcode. All of the data is filled in except user_address and user_postcode. I have a section on the website that allows the user to fill in these details and then submit them to the database, but I can't get it working.
I think it's because as I said, part of the row is already filled it. Is is possible to add data to a row which already contains some data?
Now at a future date I would like to update user_address and user_postcode without changing any other data. I have the query and everything else set up, but I'm not sure if I can actually add data to part of a row which is empty.
i understood what you want, your basically writing a update statement and in this statement your putting all the column names whether its empty or with data and setting the data to update based on what was entered on the webpage.
to allow an empty field to update as empty make sure that column or field doesnt have the not null selected so that you will be able to update it witout data.
im thinking that you used the update or insert statement and had set the column to not null and that when you tried to insert or update you were getting errors.