panicgripdesigns Posted February 12, 2015 Share Posted February 12, 2015 I've been building some new interfaces on my shop, and have realized that I would like to use mysqli_fetch_all, so I added it into my database.php. It might be a useful function to have in osC. Just a proposal. function tep_db_fetch_all($db_query) { return mysqli_fetch_all($db_query, MYSQLI_ASSOC); } A little knowledge of php goes a long way. Link to comment Share on other sites More sharing options...
ruden Posted January 28, 2020 Share Posted January 28, 2020 still need to add check extension mysqlnd function tep_db_fetch_all($db_query) { // check if "mysqlnd" driver is used if (extension_loaded('mysqlnd') && function_exists('mysqli_fetch_all')) { return mysqli_fetch_all($db_query, MYSQLI_ASSOC); } else { $data = []; while ($row = tep_db_fetch_array($db_query)) { $data[] = $row; } return $data; } } Link to comment Share on other sites More sharing options...
Fredi Posted January 28, 2020 Share Posted January 28, 2020 Need change adds from @panicgripdesigns to adds from @ruden Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
ArtcoInc Posted January 28, 2020 Share Posted January 28, 2020 Please note that the original post was 5 years ago. What else has changed in the osC code since then? M Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.