PDO & MySQL: Subquery using dynamic time? Way to solve using Join by avoiding while loop?

前端 未结 1 1601
死守一世寂寞
死守一世寂寞 2021-01-29 02:04

In trying to pull down some stock data after a certain set of criteria is triggered from a database I am getting a slow response mostly based around using dynamic data. I have

相关标签:
1条回答
  • Just quickly, you seem to have one too many "OR"

    WHERE   
        (
        y.exchange = 'NASDAQ CM' OR
        y.exchange = 'NASDAQ GM' OR
        )
        AND k.t BETWEEN 20150101 AND 20150110
    

    Should be ...

    WHERE   
        (
        y.exchange = 'NASDAQ CM' OR
        y.exchange = 'NASDAQ GM'
        )
        AND k.t BETWEEN 20150101 AND 20150110
    
    0 讨论(0)
提交回复
热议问题