I wrote a website using Google App Engine intended for the 'Datastore' database but now the website is already complete and because of Google's resources limit the website goes down too frequently (and I don't have any money to spend on it, even if I did I wouldn't :/)
Question:
When ever I fetch a table, I want to simply return it like this:
- Each row is in it's own array to make it easy to iterate through
- Instead of the standard number, each key would be the name of column is from
Problem:
No matter if I use fetch_all, fetch_assoc, or fetch_objectI never get anything that looks like what I am trying to get.
I am pretty bad with iterations and for loops so I couldn't figure how to do it manually.
mysqli_fetch_assoc()performs exactly that, however using amysqliresource, only 1 row is returned at a time, which is why you see a lot of result loops. An easy line to do this is:$result = array(); while($result[] = $mysqli_con->mysqli_fetch_assoc());