Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 选择查询日期介于_Php_Mysql - Fatal编程技术网

Php 选择查询日期介于

Php 选择查询日期介于,php,mysql,Php,Mysql,我正在做一个项目,我必须获取日期之间的数据加上用户名。 只查询date Between工作正常,但使用and运算符时出错,因此请建议我如何实现它以实现所需的输出。 这是我的代码: $qry11=mysqli_query($con,"select * from entry where (create_date between '$first' and '$second') && cnor='$nme'"); 因此,请建议ne如何做到这一点……任何想法都将不胜感激 &&am

我正在做一个项目,我必须获取日期之间的数据加上用户名。 只查询date Between工作正常,但使用and运算符时出错,因此请建议我如何实现它以实现所需的输出。 这是我的代码:

$qry11=mysqli_query($con,"select * from entry where (create_date between '$first' and '$second') && cnor='$nme'");
因此,请建议ne如何做到这一点……任何想法都将不胜感激

&& 
应替换为

AND
您似乎已经在使用和查询了,对吗

(create_date between '$first' and '$second')

使用如下查询

$qry11=mysqli_query($con,"select * from entry where (create_date between '$first' and '$second') and cnor='$nme'");

我认为您需要用AND NOT working(不工作)来替换&&检查控制台是否存在任何潜在的错误不工作……。请描述cnor=“$nme”这一部分好吗?在这种情况下,你想买什么?