db_fetch_assoc -vs- mysql_fetch_assoc

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

db_fetch_assoc -vs- mysql_fetch_assoc

Post by peebee » 2014-08-25 02:33

Just an observation I'd like to offer in case anybody experiences the same difficulties I did with some custom hooks.

I had applied some hooks in Appgini Version 5.23 and prior that relied on the line:
while($row = mysql_fetch_assoc($res)){
to fetch the result row

My hooks stopped working when I updated to V5.30

I've noticed that V5.30 now uses:
if($row = db_fetch_assoc($res)){
in the generated tablename_dml.php files

I changed my hook code from "while($row = mysql_fetch_assoc($res)){" to "while($row = db_fetch_assoc($res)){" and my hooks are now working again.

Hopefully that might save somebody the hours it took me to work out why my hooks weren't working.

Noha Eshra
Moderator
Posts: 82
Joined: 2013-11-11 19:21

Re: db_fetch_assoc -vs- mysql_fetch_assoc

Post by Noha Eshra » 2014-08-25 22:44

:) Thanks for sharing it, Peebee! It's so nice of you!

Post Reply