}
switch ( $condition ) {
case 1 : $condition_sql = " order by id asc "; break ;
case 2 : $condition_sql = "where price between 9000 and 10000 order by id desc"; break;
case 3 : $condition_sql = "where price between 10001 and 20000 order by id desc"; break ;
case 4 : $condition_sql = "where price between 20001 and 30000 order by id desc"; break ;
case 5 : $condition_sql = "where price between 30001 and 40000 order by id desc"; break ;
case 6 : $condition_sql = "where price between 40001 and 50000 order by id desc"; break ;
case 7 : $condition_sql = "where price between 50001 and 60000 order by id desc"; break ;
case 8 : $condition_sql = "where price between 60001 and 70000 order by id desc"; break ;
case 9 : $condition_sql = "where price between 70001 and 80000 order by id desc"; break ;
case 10 : $condition_sql = "where price between 80001 and 90000 order by id desc"; break ;
case 11 : $condition_sql = "where price >=90000 order by id desc"; break ;
///
case 12 : $condition_sql = "where typework_id = '$selectTypework' order by id desc"; break ;
case 13 : $condition_sql = "where typework_id = '$selectTypework' and (price between 9000 and 10000) order by id desc"; break ;
case 14 : $condition_sql = "where typework_id = '$selectTypework' and (price between 10001 and 20000) order by id desc"; break ;
case 15 : $condition_sql = "where typework_id = '$selectTypework' and (price between 20001 and 30000) order by id desc"; break ;
case 16 : $condition_sql = "where typework_id = '$selectTypework' and (price between 30001 and 40000) order by id desc"; break ;
case 17 : $condition_sql = "where typework_id = '$selectTypework' and (price between 40001 and 50000) order by id desc"; break ;
case 18 : $condition_sql = "where typework_id = '$selectTypework' and (price between 50001 and 60000) order by id desc"; break ;
case 19 : $condition_sql = "where typework_id = '$selectTypework' and (price between 60001 and 70000) order by id desc"; break ;
case 20 : $condition_sql = "where typework_id = '$selectTypework' and (price between 70001 and 80000) order by id desc"; break ;
case 21 : $condition_sql = "where typework_id = '$selectTypework' and (price between 80001 and 90000) order by id desc"; break ;
case 22 : $condition_sql = "where typework_id = '$selectTypework' and price >= 90000 order by id desc"; break ;
} //ปิด switch ( $condition )
$search="selType=$selectType&selPrice=$selectPrice"; echo "<br />";
}
echo $sqlChk="select * from addnotebook ".$condition_sql; echo "<br />";