Query¶
Fetch a result row as an associative array, a numeric array, or both.
See also
Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <?php
require_once 'dalmp.php';
$user = getenv('MYSQL_USER') ?: 'root';
$password = getenv('MYSQL_PASS') ?: '';
$DSN = "utf8://$user:$password".'@127.0.0.1/test';
$db = new DALMP\Database($DSN);
$rs = $db->Execute('SELECT * FROM City');
if ($rs) {
while (($rows = $db->query()) != false){
list($r1,$r2,$r3) = $rows;
echo "w1: $r1, w2: $r2, w3: $r3",$db->isCli(1);
}
}
|
Note
Use Pquery when using Prepared statements.
Thanks Navicat for supporting Open Source projects.
A great amount of time has been spent creating, crafting and maintaining this software, please consider donating.
Donating helps ensure continued support, development and availability.
comments powered by Disqus