Php SQLite PDO fetchAll给出了一个空数组,尽管表中有记录
请查看下面的代码。 SQLite3 PHP-SQLite-PDOPhp SQLite PDO fetchAll给出了一个空数组,尽管表中有记录,php,sqlite,pdo,Php,Sqlite,Pdo,请查看下面的代码。 SQLite3 PHP-SQLite-PDO $sql = 'SELECT * FROM employee WHERE name IN (:v1, :v2, :v3)'; $statement = $connection->query($sql); $statement->bindValue(':v1','manash'); $statement->bindValue(':v2','ram'); $statement->bindValue(':v3',
$sql = 'SELECT * FROM employee WHERE name IN (:v1, :v2, :v3)';
$statement = $connection->query($sql);
$statement->bindValue(':v1','manash');
$statement->bindValue(':v2','ram');
$statement->bindValue(':v3','rahim');
for($i=0;$i<$statement->columnCount();$i++){
$statement->getColumnMeta($i)
}
$sql='SELECT*FROM employee WHERE name IN(:v1,:v2,:v3)';
$statement=$connection->query($sql);
$statement->bindValue(':v1','manash');
$statement->bindValue(':v2','ram');
$statement->bindValue(':v3','rahim');
对于($i=0;$icolumnCount();$i++){
$statement->getColumnMeta($i)
}
检查sqlite中员工表中的记录!!存在7条记录您的php是否有权读取数据库文件?PDO不通过默认抛出Exception sqlite文件的名称是什么???是的,它有。。因为它在另一张桌子上工作