Content / Old Plugins Updating / Queries - How To replace old db_fetch()

Queries - How To replace old db_fetch()

Examples how to replace not supported db_fetch()

comments: 0
$sql->db_Select('gold_asset', 'gasset_asset', 'where gasset_user_id =' . USERID, 'nowhere', false);<br>
while ($gasset_row = $sql->db_Fetch())

replace:

$gasset_records = e107::getDb()->retrieve('gold_asset', 'gasset_asset', 'gasset_user_id =' . USERID, true);
foreach($gasset_records AS $gasset_row)
Notice:
- nowhere parameter removed
- where word removed
- false changed to true
$userfound = $sql -> db_Select("onlineinfo_read","*","user_id=".USERID."");

replace:

$userfound = $sql -> select("onlineinfo_read","*","WHERE user_id=".USERID."", true);
Notice:
- added Where
- added 4th parameter