属性テーブルに関連するアイテムの値テーブルがあります。 項目クエリが実行されている場合、その属性値は、私はあなたがnum_row
をスペルミスPHPでデータベースレコードを反復する一方で、配列インデックスは異なる製品では異なります
$appearanceSql = "SELECT * FROM values WHERE item_id='$itemID'";
$appearanceResults = $conn->query($appearanceSql);
if($appearanceResults->num_row>0){
//how to loop through to iterate the values of the product if the product have different attributes like mobile phones have some different attributes than a laptop
}
あなたは出力を表示できます – Exprator
質問がありますか? – Strawberry
実際には、アイテムidに関連付けられたすべての属性をエコーする必要があります。 table strucutureは です。val_id item_id att_name(カテゴリに応じて異なる属性) –