Author: Frederik Holljen
Date: 2006-08-09 15:53:09 +0200 (Wed, 09 Aug 2006)
New Revision: 3253

Log:
- Fix syntax mistakes in example (shame shame..)

Modified:
   trunk/Database/docs/tutorial_example_06.php
   trunk/Database/docs/tutorial_example_07a.php
   trunk/Database/docs/tutorial_example_07b.php
   trunk/Database/docs/tutorial_example_08.php

Modified: trunk/Database/docs/tutorial_example_06.php
===================================================================
--- trunk/Database/docs/tutorial_example_06.php 2006-08-09 13:03:53 UTC (rev 
3252)
+++ trunk/Database/docs/tutorial_example_06.php 2006-08-09 13:53:09 UTC (rev 
3253)
@@ -8,21 +8,21 @@
   ->set( 'id', 1 )
   ->set( 'name', $q->bindValue( 'Robert Foster' ) )
   ->set( 'quote', $q->bindValue( "It doesn't look as if it's ever used!" ) );
-$q->prepare();
-$q->execute();
+$stmt = $q->prepare();
+$stmt->execute();
 
 // update
 $q = $db->createUpdateQuery();
 $q->update( 'quotes' )
   ->set( 'quote', 'His skin is cold... Like plastic...' )
   ->where( $q->expr->eq( 'id', 1 ) );
-$q->prepare();
-$q->execute();
+$stmt = $q->prepare();
+$stmt->execute();
 
 // delete
 $q = $db->createDeleteQuery();
 $q->deleteFrom( 'quotes' )
   ->where( $q->expr->eq( $q->bindValue( 'Robert Foster' ) ) );
-$q->prepare();
-$q->execute();
+$stmt = $q->prepare();
+$stmt->execute();
 ?>

Modified: trunk/Database/docs/tutorial_example_07a.php
===================================================================
--- trunk/Database/docs/tutorial_example_07a.php        2006-08-09 13:03:53 UTC 
(rev 3252)
+++ trunk/Database/docs/tutorial_example_07a.php        2006-08-09 13:53:09 UTC 
(rev 3253)
@@ -8,8 +8,8 @@
 // "SELECT id FROM table1 RIGHT JOIN table2 ON table1.id = table2.id".
 $q->select( 'id' )->from( 'table1' )->rightJoin( 'table2', 
$q->expr->eq('table1.id', 'table2.id' ) );
 
-$q->prepare();
-$q->execute();
+$stmt = $q->prepare();
+$stmt->execute();
 
 // Right join of three tables. Will produce SQL:
 // "SELECT id FROM table1 RIGHT JOIN table2 ON table1.id < table2.id RIGHT 
JOIN table3 ON table2.id > table3.id".
@@ -17,6 +17,7 @@
         ->from( 'table1' )
             ->rightJoin( 'table2', $q->expr->lt('table1.id', 'table2.id' ) )
             ->rightJoin( 'table3', $q->expr->gt('table2.id', 'table3.id' ) );
-$q->prepare();
-$q->execute();
+
+$stmt = $q->prepare();
+$stmt->execute();
 ?>

Modified: trunk/Database/docs/tutorial_example_07b.php
===================================================================
--- trunk/Database/docs/tutorial_example_07b.php        2006-08-09 13:03:53 UTC 
(rev 3252)
+++ trunk/Database/docs/tutorial_example_07b.php        2006-08-09 13:53:09 UTC 
(rev 3253)
@@ -10,8 +10,9 @@
         ->from( 'table1' )
             ->rightJoin( 'table2', 'table1.id', 'table2.id' )
             ->rightJoin( 'table3', 'table2.id', 'table3.id' );
-$q->prepare();
-$q->execute();
 
+$stmt = $q->prepare();
+$stmt->execute();
 
+
 ?>

Modified: trunk/Database/docs/tutorial_example_08.php
===================================================================
--- trunk/Database/docs/tutorial_example_08.php 2006-08-09 13:03:53 UTC (rev 
3252)
+++ trunk/Database/docs/tutorial_example_08.php 2006-08-09 13:53:09 UTC (rev 
3253)
@@ -4,12 +4,12 @@
 
 $q = $db->createSelectQuery();
 
-// $q->rightJoin( 'table1', 'table2', 'table1.id', 'table2.id' ) will produce 
+// $q->rightJoin( 'table1', 'table2', 'table1.id', 'table2.id' ) will produce
 // string "table1 RIGHT JOIN table2 ON table1.id = table2.id"
 // that should be added to FROM clause of query.
 // resulting query is "SELECT id FROM table1 RIGHT JOIN table2 ON table1.id = 
table2.id".
 $q->select( 'id' )->from( $q->rightJoin( 'table1', 'table2', 'table1.id', 
'table2.id' ) );
-$q->prepare();
-$q->execute();
+$stmt = $q->prepare();
+$stmt->execute();
 
 ?>

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to