@@ -155,29 +155,29 @@ These operations will return the number of affected result set. (integer)
155155``` php
156156<?php
157157// Delete
158- $db ->query("DELETE FROM fruit WHERE id = :id", array("id"=>"1"));
159- $db ->query("DELETE FROM fruit WHERE id = ?", array("1"));
158+ $DB ->query("DELETE FROM fruit WHERE id = :id", array("id"=>"1"));
159+ $DB ->query("DELETE FROM fruit WHERE id = ?", array("1"));
160160// Update
161- $db ->query("UPDATE fruit SET color = :color WHERE name = :name", array("name"=>"strawberry","color"=>"yellow"));
162- $db ->query("UPDATE fruit SET color = ? WHERE name = ?", array("yellow","strawberry"));
161+ $DB ->query("UPDATE fruit SET color = :color WHERE name = :name", array("name"=>"strawberry","color"=>"yellow"));
162+ $DB ->query("UPDATE fruit SET color = ? WHERE name = ?", array("yellow","strawberry"));
163163// Insert
164- $db ->query("INSERT INTO fruit(id,name,color) VALUES(?,?,?)", array(null,"mango","yellow"));//Parameters must be ordered
165- $db ->query("INSERT INTO fruit(id,name,color) VALUES(:id,:name,:color)", array("color"=>"yellow","name"=>"mango","id"=>null));//Parameters order free
164+ $DB ->query("INSERT INTO fruit(id,name,color) VALUES(?,?,?)", array(null,"mango","yellow"));//Parameters must be ordered
165+ $DB ->query("INSERT INTO fruit(id,name,color) VALUES(:id,:name,:color)", array("color"=>"yellow","name"=>"mango","id"=>null));//Parameters order free
166166?>
167167```
168168
169169#### Get Last Insert ID
170170
171171``` php
172172<?php
173- $db ->lastInsertId();
173+ $DB ->lastInsertId();
174174?>
175175```
176176
177177#### Get the number of queries since the object initialization
178178
179179``` php
180180<?php
181- $db ->querycount;
181+ $DB ->querycount;
182182?>
183183```
0 commit comments