Page 1 of 1

db_fetch_assoc -vs- mysql_fetch_assoc

Posted: 2014-08-25 02:33
by peebee
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.

Re: db_fetch_assoc -vs- mysql_fetch_assoc

Posted: 2014-08-25 22:44
by Noha Eshra
:) Thanks for sharing it, Peebee! It's so nice of you!