我知道这很简单,但它真的很烦人,
为什么会这样:
$query = $pdo->prepare('SELECT index FROM active_notifications WHERE direction = ">"');
这有效:
$query = $pdo->prepare('SELECT trigger_price FROM active_notifications WHERE direction = ">"');
但这不会!:
$query = $pdo->prepare('SELECT trigger_price, index FROM active_notifications WHERE direction = ">"');
我得到这个垃圾:
无法连接到数据库。原因:异常 'PDOException' 带有消息 'SQLSTATE[42000]:语法错误或访问冲突:1064 您的 SQL 语法有错误;