为什么此查询和条件返回行

时间:2022-06-18 06:58:17

I'm working on a large select statement, it was working fine, but with some dates
it gives a strange result, I started reducing it to track the mistake in vain! until I wrote this code

我正在做一个大的选择声明,它工作正常,但有一些日期它给出了一个奇怪的结果,我开始减少它来徒劳地追踪错误!直到我写这个代码

SELECT DISTINCT 
     CURDATE()      AS `Rdat`,
    `p`.`pspsalm1` AS `pspsalm1`,
    `p`.`pspsalm2` AS `pspsalm2`,
    `p`.`pspsalm3` AS `pspsalm3`,
    p.`PSDescription` AS `PSDescription`
FROM
    (`dailyreadings` `d`, `psalms` `p`, `weeks` `w` ,`feasts` `f`)
WHERE      1=2

it gives result as well..! I think this condition ( 1=2) should give no result any clarification?

它也给出了结果..!我认为这个条件(1 = 2)应该没有任何结果澄清?

为什么此查询和条件返回行

2 个解决方案

#1


1  

It shouldn't give any result Try: refreshing your browser clear broser cache and try again

它不应该给出任何结果尝试:刷新浏览器清除更高的缓存,然后再试一次

#2


0  

Thanks to you guys It is a browser issue, the browser kept the previous criteria and query data using it, even when I changed the condition in the sql statement. Thanks to you all

感谢你们这是一个浏览器问题,浏览器使用它保留了以前的标准和查询数据,即使我在sql语句中更改了条件。谢谢大家

#1


1  

It shouldn't give any result Try: refreshing your browser clear broser cache and try again

它不应该给出任何结果尝试:刷新浏览器清除更高的缓存,然后再试一次

#2


0  

Thanks to you guys It is a browser issue, the browser kept the previous criteria and query data using it, even when I changed the condition in the sql statement. Thanks to you all

感谢你们这是一个浏览器问题,浏览器使用它保留了以前的标准和查询数据,即使我在sql语句中更改了条件。谢谢大家