![]() |
PDO fetching objects - how to assign variables ?
Hi guys,
very simple I'm sure - what is the better way of assigning variables to rows in this case? I'm assuming this is probably a stupid way of doing it: PHP Code:
|
Yep, you can use list.
PHP Code:
|
Tip: you don’t need ->fetchAll() for this, you can loop directly over
$stmt |
Thanks guys, if there is any more ways I'll be glad to get to know them.
Fou-Lu - I've used it and it works great. Cheers |
Quote:
|
| All times are GMT +1. The time now is 02:44 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.