#36714 [Csd]: wrong squlite_query example

From: Date: Mon, 13 Mar 2006 10:44:57 +0000
Subject: #36714 [Csd]: wrong squlite_query example
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969372369@lists.php.net to get a copy of this message
ID: 36714 Updated by: vrana@php.net Reported By: tobias dot nix at gmail dot com Status: Closed Bug Type: Documentation problem Operating System: doesnt matter PHP Version: Irrelevant New Comment: German documentation is outdated. If you want to help with the translation, contact doc-de@lists.php.net. Previous Comments: ------------------------------------------------------------------------ [2006-03-13 11:41:51] tobias dot nix at gmail dot com Sorry for missing link: http://php.net/manual/de/function.sqlite-open.php ------------------------------------------------------------------------ [2006-03-13 11:34:35] 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:31:49] mazzanet@php.net Can you provide a link to this example? I can't seen to find it. ------------------------------------------------------------------------ [2006-03-13 11:26:00] 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); } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36714&edit=1

« previous php.doc (#969372369) next »