<?PHP
$sql = "SELECT * FROM product_details WHERE products_title_big_size = '$Products' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$products_color = stripslashes(str_replace('\r\n', '<br>',($datas['products_color_big'])));
}
?>
<?PHP
$sql = "SELECT * FROM product_details WHERE products_title_'$sizes'_size = '$Products' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$products_color = stripslashes(str_replace('\r\n', '<br>',($datas['products_color_'$sizes''])));
}
?>
หมายเหตุ $sizes จะมีค่าเท่ากับ big หรือ small ซึ่งแล้วแต่ข้อมูลค๊ะ
<?PHP
$sql = "SELECT * FROM product_details WHERE products_title_'$sizes'_size = '$Products' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$products_color = stripslashes(str_replace('\r\n', '<br>',($datas['products_color_'$sizes''])));
}
?>
<?PHP
$sql = "SELECT * FROM product_details WHERE products_title_'.$sizes_size.' = '$Products' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$products_color = stripslashes(str_replace('\r\n', '<br>',($datas['products_color_'.$sizes])));
}
?>
หรือ Code (PHP)
<?PHP
$products_title = 'products_title_'.$sizes_size;
$sql = "SELECT * FROM product_details WHERE $products_title = '$Products' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$products_color = stripslashes(str_replace('\r\n', '<br>',($datas['products_color_'.$sizes])));
}
?>