dodgei Posted January 24, 2007 Share Posted January 24, 2007 How/Can you display data using fetch object from the database??If so, what is the synatx?I know that if you use fetch array you can do $row.['fieldname'];How bout fetch object? Link to comment https://forums.phpfreaks.com/topic/35563-using-fetch-object/ Share on other sites More sharing options...
Caesar Posted January 24, 2007 Share Posted January 24, 2007 [code]<?php $query = $db->query("SELECT * FROM users"); while ($row = $db->fetch_object($query)) { echo $row->userid; echo $row->username; }?>[/code] Link to comment https://forums.phpfreaks.com/topic/35563-using-fetch-object/#findComment-168388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.