это работает
PHP |
$query = "SELECT `name` FROM `data` WHERE `cat_id`='".(int)$_POST['cat']."' LIMIT 1"; |
PHP |
$query = "SELECT `name` FROM `data` WHERE `sd_id`='".(int)$_POST['sdelka']."' LIMIT 1"; |
PHP |
$query = "SELECT `name` FROM `data` WHERE `cat_id`='".(int)$_POST['cat']."' LIMIT 1" &&(`sd_id`='".(int)$_POST['sdelka']."' LIMIT 1) |
PHP |
echo $query; |
SQL |
$query = "SELECT `name` FROM `data` WHERE `cat_id`='".(int)$_POST['cat']."' and `sd_id`='".(int)$_POST['sdelka']."' LIMIT 1"; |