I m makin database in which i hav 10 tables for each sem storeing student result.
i hav link this with php...and giving access to students to see thier results and administrator to edit them olso.
i hav a problem in updating the fields.

first i authenticate the user,ask for sem in which he wants to change (in case of adminisrator) , take the inputs.and insert it back to the database.

Now my question is :
since each table having the students of different stream ( no of subjects are diffrent )..!!
so i m not able to put bak these updated values bak into the database.

(At the time of takin values from admin,i only show those fields which are olready set in database...but at the time of inserting i am not able to insert these values back to table) .
(if i inserted all the values bak to table ...then the unsetted fields olso get sets,, and the next tym when admin see the result the unnecessary fields will olso show as they hav been set to zero( since default value for postin is zero ) in previous insertin...i dont want this... plezzz help me out...:(
its hurry....plezzz.thank you

suppose you hav 20 fields in a form ...u show sometimes 8 sometimes 10 depend upon some condition.
now how you insert back .. sometimes 8 .. or some times 10 values...

if i inserted oll 20 values every time,then the next tym when student/admin access the reslt...it shows 20 fields everytym rather than what just it required(8 or 10).
getting na..!!
plezz plezz help me out this.... :(

Hello pleeezzzz somebody replyyyy....!!!

all i can think of is to set the dafault to NULL
what's not the same as zero (=numerical value where NULL means doesn't exist)

thanks pzuurveen... see i hav olrady set the values to null.but while updating...i m inserting oll the values back to the database..which making them set to zero(for those which are not filled).....that is the thing.

do u knw how to set default value= null in forms (but it should not displayed on forms then)
like in form if i left some feild blank,,it takes null value
it might help me...
thank you.

If you check the value befor youre query, and ,if empty, just not include in your insert, mysql shout use the default NULL

thanks .
but how to chek that it is empty or null.
see,if i left blank ,,then it stores zero not null.

i cant chek for zero..becoz some field can also hav zero.
take out the round for last lines in my last post.

heyy...pzuurveen thaanks.
I hav done this problem solve. thaanks for giving ideaa which give me hint for solution.