svn: /phpdoc/en/trunk/reference/sqlite3/sqlite3stmt/ bindvalue.xml

From: Date: Wed, 12 Aug 2009 12:18:23 +0000
Subject: svn: /phpdoc/en/trunk/reference/sqlite3/sqlite3stmt/ bindvalue.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4651@lists.php.net to get a copy of this message
nilgun Wed, 12 Aug 2009 12:18:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287154 Log: add example Changed paths: U phpdoc/en/trunk/reference/sqlite3/sqlite3stmt/bindvalue.xml Modified: phpdoc/en/trunk/reference/sqlite3/sqlite3stmt/bindvalue.xml =================================================================== --- phpdoc/en/trunk/reference/sqlite3/sqlite3stmt/bindvalue.xml 2009-08-12 11:53:57 UTC (rev 287153) +++ phpdoc/en/trunk/reference/sqlite3/sqlite3stmt/bindvalue.xml 2009-08-12 12:18:23 UTC (rev 287154) @@ -94,6 +94,32 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>SQLite3Stmt::bindValue</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +unlink('mysqlitedb.db'); +$db = new SQLite3('mysqlitedb.db'); + +$db->exec('CREATE TABLE foo (id INTEGER, bar STRING)'); +$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')"); + +$stmt = $db->prepare('SELECT bar FROM foo WHERE id=:id'); +$stmt->bindValue(':id', 1, SQLITE3_INTEGER); + +$result = $stmt->execute(); +var_dump($result->fetchArray()); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file

« previous php.doc.cvs (#4651) next »