Question

since i am building a shopping a website how can a store the same product with different sizes as i don't want to create multiple rows..

Column Name Data Type   Nullable
DETAIL  VARCHAR2(4000)  Yes  -   -
BRAND   VARCHAR2(4000)  Yes  -   -
IMAGE   VARCHAR2(4000)  Yes  -   -
PRICE   NUMBER  Yes  -   -
CATEGORY    VARCHAR2(4000)  Yes  -   -
PRODUCT_ID  VARCHAR2(2000)  Yes  -   -
SEARCH_ID   VARCHAR2(4000)  Yes  -   -
CLOTH_SIZE  VARCHAR2(4000)  Yes  -   -

here i want multiple clothsize values for the same column

No correct solution

OTHER TIPS

$json = array();
while($row = mysql_fetch_array($result))     
 {
    $json[]= array(
     'IMAGE' => $row['IMAGE'],
     'PRICE' => $row['PRICE']
    );
}

$jsonstring = json_encode($json);
echo $jsonstring;

$jsonstring - add your data base this var.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top