i have a data (in tabular form) that look like as follows
1 2 3
4
5 0 6
8
This table contains three column and four rows and 12 cells.but all cells do not have value.i have stored data in this table to a database entering zero in the place of empty cells. but it result in the wastage of lot of space in database. I need to enter only non-zero values to my database and must be shown as the above table when retrieved.
This seems pretty simple:
Store the
rowandcolumnvalues in their own separate columns, along with avaluecolumn that holds the cell value.You’ll never enter non-zero or blank database values.
When you retrieve the values, populate them into a multidimensional array: