These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | require "vendor/autoload.php"; |
||
| 3 | |||
| 4 | $db = new \ByJG\AnyDataset\Repository\DBDataset('mysql://root:[email protected]/development'); |
||
| 5 | |||
| 6 | $iterator = $db->getIterator('select * from airports where idairports = [[idairports]]', ['idairports' => 898]); |
||
| 7 | |||
| 8 | // Convert all iterator to Array |
||
| 9 | print_r($iterator->toArray()); |
||
| 10 | |||
| 11 | // Iterate over all elements |
||
| 12 | foreach ($iterator as $row) |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 13 | { |
||
| 14 | print_r($row->toArray()); |
||
| 15 | } |
||
| 16 | |||
| 17 |