PHP select语句中where 中怎么取到值?
请给具体写发<?PHPinclude("conn.php");$ID=$_POST['ID'];$IN_USE=implode(',',$_POST['IN_USE'])...
请给具体写发
<?PHP
include ("conn.php");
$ID = $_POST['ID'];
$IN_USE = implode(',',$_POST['IN_USE']);
$IN_MARNY = $_POST['IN_MARNY'];
$IN_DUE = $_POST['IN_DUE'];
$P_USE = $_POST['P_DUE'];
$P_M_MIN = $_POST['P_M_MIN'];
$P_M_MAX = $_POST['P_M_MAX'];
if ($_POST['Submit']){
echo $sql5 = "select * from product a,totel b where b.['$in_use']='a.['$P_USE']' and b.in_marny between a.P_M_MIN and a.P_M_MAX";
$query = mysql_query($sql5,$con);
}
?>
请指点where后面怎么取到值 ?
between这里我要查in_marny的值是否在P_M_MIN 和P_M_MAX数之间。这样写可以吗? 展开
<?PHP
include ("conn.php");
$ID = $_POST['ID'];
$IN_USE = implode(',',$_POST['IN_USE']);
$IN_MARNY = $_POST['IN_MARNY'];
$IN_DUE = $_POST['IN_DUE'];
$P_USE = $_POST['P_DUE'];
$P_M_MIN = $_POST['P_M_MIN'];
$P_M_MAX = $_POST['P_M_MAX'];
if ($_POST['Submit']){
echo $sql5 = "select * from product a,totel b where b.['$in_use']='a.['$P_USE']' and b.in_marny between a.P_M_MIN and a.P_M_MAX";
$query = mysql_query($sql5,$con);
}
?>
请指点where后面怎么取到值 ?
between这里我要查in_marny的值是否在P_M_MIN 和P_M_MAX数之间。这样写可以吗? 展开
1个回答
2013-06-06
展开全部
where in_marny between P_M_MIN and P_M_MAX
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询