|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-05 01:29 UTC] derick@php.net
[2005-02-07 03:33 UTC] fernando dot wendt at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
Description: ------------ Hi, I have downloaded the SQLite 3.0.8 for Windows, and it seems to work fine: via prompt, database created, data inserted, dump done, imports and outputs made. Then, when trying to make it really works, whith PHP 5.0.3 and Apache 2.0.52, always PHP points an error, that saids "file is not a database or is encrypted". To make this really hapends, and what motivated me to came here, i get SQLite 2.8.15, created the same database (all right), and with this version PHP works. The table is very simple: it?s name "tabela", and have two columns "numero" and "nome" (smallint and varchar). Two data inserted: 1-Fernando and 2-Nidiane. Thats all. Reproduce code: --------------- <?php $banco = new SQLiteDatabase("exemplo.sqi"); $res = $banco->unbufferedQuery("Select * from tabela"); foreach ($res as $row){ print_r($row); } ?> Expected result: ---------------- Array ( [0] => 1 [numero] => 1 [1] => Fernando [nome] => Fernando ) Array ( [0] => 2 [numero] => 2 [1] => Nidiane [nome] => Nidiane ) Actual result: -------------- Warning: SQLiteDatabase::unbufferedQuery() [function.unbufferedQuery.html]: no such table: tabela in C:\Arquivos de programas\Apache Group\Apache2\htdocs\sqlite\exemplo.php on line 3 Warning: Invalid argument supplied for foreach() in C:\Arquivos de programas\Apache Group\Apache2\htdocs\sqlite\exemplo.php on line 4