|
本帖最后由 goyuquan 于 2014-4-29 17:17 编辑
if (!empty($_POST['num']) ||
!empty($_POST['title']) ||
!empty($_POST['season']) ||
!empty($_POST['price']) )
{
$w = array();
foreach($_POST as $k=>$v) {
if(!empty($v)) $w[] = "$k='$v' ";
}
$where = join(' AND ', $w);}
SELECT `id`, `num`, `img` FROM (`product`) WHERE `title='567'` AND price='567567'
但是打印出来第一个数组是正常的
title='567' AND price='567567'
不知道怎么回事
Unknown column 'title='567'' in 'where clause'
|
|