php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #36714 wrong squlite_query example
Submitted: 2006-03-13 11:26 UTC Modified: 2006-03-13 11:44 UTC
From: tobias dot nix at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: doesnt matter
Private report: No CVE-ID: None
 [2006-03-13 11:26 UTC] tobias dot nix at gmail dot com
Description:
------------
The example1 is the following:

<?php
if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
  sqlite_query('CREATE TABLE foo (bar varchar(10))');
  sqlite_query("INSERT INTO foo VALUES ('fnord')");
  $result = sqlite_query('select bar from foo');
  var_dump(sqlite_fetch_array($result));
} else {
  die ($sqliteerror);
}
?> 

On sqlite_query is a $db missing:
<?php
if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
  sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
  sqlite_query($db, "INSERT INTO foo VALUES ('fnord')");
  $result = sqlite_query($db,'select bar from foo');
  var_dump(sqlite_fetch_array($result));
} else {
  die ($sqliteerror);
}
?> 




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 11:31 UTC] mazzanet@php.net
Can you provide a link to this example? 
I can't seen to find it.
 [2006-03-13 11:34 UTC] vrana@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2006-03-13 11:41 UTC] tobias dot nix at gmail dot com
Sorry for missing link: http://php.net/manual/de/function.sqlite-open.php
 [2006-03-13 11:44 UTC] vrana@php.net
German documentation is outdated. If you want to help with the translation, contact doc-de@lists.php.net.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 16:01:33 2025 UTC