Hi,
I have to create a table to store product details. But the structure is inconsistent. For eg:- some product requires only six columns, some 7 columns, etc. and the column names would also be different as given below:
CODE - CARTRIDGE MODEL NO. - PRINTER DESCRIPTION - COLOR - TYPE
CODE - CARTRIDGE MODEL NO. - PRINTER DESCRIPTION - PRODUCT
From the above you can figure out that the product properties are inconsistent. In such a scenario how should i design a database table, and how should i display the product details on php page.
Can anyone help
regards,
harish
how to check whether all columns in an array have null value
Moderator: General Moderators
how to check whether all columns in an array have null value
Last edited by onion2k on Wed Jul 29, 2009 4:12 am, edited 1 time in total.
Reason: Moved to the Databases forum.
Reason: Moved to the Databases forum.
Re: how to check whether all columns in an array have null value
Allow null values in those columns that doesn't require a value.
When displaying the content you can for example use if(!empty($db_value) echo $value
or however you would like to display the data.
Play around a little bit and show us what you come up with.
When displaying the content you can for example use if(!empty($db_value) echo $value
or however you would like to display the data.
Play around a little bit and show us what you come up with.