Skip to content
Advertisement

MySQL returns wierd result with normal query

So I have this code:

JavaScript

And it returns this instead of the normal values in the table:

array(12) {

[0]=> int(2) [“ID”]=> int(2) 1=> string(7) “anderes” [“Naam”]=> string(7) “anderes” [2]=> string(4) “0.00” [“Beschrijving”]=> string(4) “0.00” [3]=>
string(4) “0.00” [“Prijs”]=> string(4) “0.00” [4]=>
string(0) “” [“Prijsweergave”]=> string(0) “” [5]=>
int(2) [“Termijn”]=> int(2) }

This is the table:Table

Advertisement

Answer

I assume your issue is that the way you have written your code, you only ever get One result printed from a multiple result query.

The $module->get_result() can only be called once as it gets the whole resultset the first time, so the second call will return nothing.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement