Perhaps someone can help me. I am using MySQLi.
Depending on the choises that the user selects, an array is built with one or many DB_tableID. This array can have the have the same DB _tableID multiple times.
eg. array(1,1,2,2,2,1,3,2)
Now my program loops a function that runs the SELECT statement based on the DB_tableID which should populate a class.
eg. "SELECT name,age FROM User WHERE userID=$i";
where $i is the next element in the array (1,1,2,2,2,1,3,2).
Sounds simple, but...
Whenever there are multiple calls to the DB that are the same (1,1 OR 2,2,2), the DB sends back NULL as the results for everything.
The first "1" returns the correct results - the second "1" returns NULL - the first "2" returns the correct results - the second and third "2" returns NULL ... etc ...
It sounds like the DB is trying to do the least amount of DB-calls by not repeating the same results twice in a row. But, the way I'm saving the results, I need to have the DB re-send the results. Now that I type this out, it sounds like there's a setting I can change in MySQL. Does anyone have any ideas where I can look to get this problem fixed?