PHP 7
- COUNT field incorrect or syntax error
placeholders must have unique names even if they have the same value
不確認是PDO還是Phalcon,但知道placeholder不可重覆
Reference: https://stackoverflow.com/questions/34089614/count-field-incorrect-or-syntax-error$sql = "SELECT * FROM m WHERE m.prod_market_sdate <= :nowDate AND m.prod_market_edate >= :nowDate $statement = $db->prepare($sql); $result = $db->executePrepared( $statement, array( 'nowDate' => date("Y-m-d H:i:s", time()) ), array() );
- Static property
- $this->$fileErr => $self::fileErr
Phalcon 3
- 不可以有重覆的andWhere
雖然不應該有這問題...
不過有時候條件太多,看走眼...
$builder->andWhere("name = 'Peter'"); $builder->andWhere("name = 'Peter'"); //重覆會有錯
沒有留言:
張貼留言