panicgripdesigns Posted February 12, 2015 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.
ruden Posted January 28, 2020 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; } }
Fredi Posted January 28, 2020 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
ArtcoInc Posted January 28, 2020 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.