Throwing mysqli result object into massive practice?
I was wondering if I have some code like:
$result = $db->query($sql); // dont worry, its escaped
$myData = (array)$result->fetch_assoc();
Where
$result->fetch_assoc();
returns mysqli result object.
Is this exactly the case? I would assume that this is an expensive call - is it true?
It's pretty sure it's convenient to use right after the request for it, but I want to make sure I'm not doing anything bad.
Thanks for any input,
0
a source to share
2 answers