note 93889 added to pdo.query

From: Date: Mon, 05 Oct 2009 16:38:07 +0000
Subject: note 93889 added to pdo.query
Groups: php.notes 
Request: Send a blank email to php-notes+get-161369@lists.php.net to get a copy of this message
The example here is not very good. Firstly, why has the author used print over echo? Secondly, showing users how to use this function using print_r() or var_dump() would give readers a better example of the kind of result to expect. My example looks like this: <?php $sql="SHOW TABLES FROM $_dbname"; $r=$db->query($sql)->fetchAll(); var_dump($r); ?> ---- Server IP: 87.124.86.46 Probable Submitter: 82.152.138.226 (proxied: 82.152.138.226) ---- Manual Page -- http://www.php.net/manual/en/pdo.query.php Edit -- https://master.php.net/note/edit/93889 Del: integrated -- https://master.php.net/note/delete/93889/integrated Del: useless -- https://master.php.net/note/delete/93889/useless Del: bad code -- https://master.php.net/note/delete/93889/bad+code Del: spam -- https://master.php.net/note/delete/93889/spam Del: non-english -- https://master.php.net/note/delete/93889/non-english Del: in docs -- https://master.php.net/note/delete/93889/in+docs Del: other reasons-- https://master.php.net/note/delete/93889 Reject -- https://master.php.net/note/reject/93889 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#161369) next »