Skip to main content
5 events
when toggle format what by license comment
Aug 26, 2022 at 15:01 comment added TylerH @miken32 The second question is not "How can I do x using MySQLi", it's "How can I do y in MySQLi", and the answer is "This way. But if you want y to be in x form, you have to use PDO". That is why they are slightly different.
Aug 20, 2022 at 15:23 comment added Barmar But even if the questions aren't exactly the same, the answer is applicable. It says that fetch_all() is the only way to get all the rows at once, and enumerates the format of results it returns. This answers the original question (the answer is "no").
Aug 20, 2022 at 15:20 comment added Barmar So you're saying it's not a dupe because the old question never clearly says that they want an array of objects? It seems to be implied because they user fetch_object() in the loop and then say they're looking for something that might be called fetch_objects(). @mickmackusa seems to have taken this as implicitly asking for the same thing as the new question.
Aug 20, 2022 at 3:21 comment added miken32 "Can I use Mysqli::fetch_all() to do x?" "No, you have to use PDO." vs "How can I do x using Mysqli?" "You can't, you have to use PDO." Both questions and answers seem pretty similar to me. Technically they're different but in practical terms they're both asking the same thing.
Aug 19, 2022 at 16:43 history answered Makoto CC BY-SA 4.0