Hi all,
Is there a way to use the kirby Db
class to query a stored procedure on a sql database and get the same result as I would use mysqli_query
. Using mysqli_query
I can call it like so and the result is an object like below.
mysqli_query($db_conn, "CALL myStoredProcedure");
Object
(
[current_field] => 0
[field_count] => 6
[lengths] =>
[num_rows] => 6934
[type] => 0
)
Using the Db
class will output it like so.
$results = Db::query('CALL myStoredProcedure');
Kirby\Toolkit\Collection Object
(
[0] => 0
[1] => 1
[2] => 2
[3] => 3
[4] => 4
[5] => 5
....
)
Thanks,
Flo