php - Mysqli dynamic query bind_results -


i wrote 1 databasse class use , used mysqli.i wanted write pdo slow (it not ip connection :) ),and website huge , pdo little slowness big problem,that's why choosed difficult way --mysqli--.i wrote dynamic class bind params dynamicly , usage this:

db::getinstance()->query(sql,'ss',array($a,$b)); 

this useful untill today.i wanted result , count values discover reaally big problem when use num_rows mysqli get_result not work,when use get_result num rows never work,also when use get_result , if want use again same query second 1 not work .also get_result not function because support mysqlid.then have tried bind result useless because every select query should write bind_result(params) not other developers on company also.what should do?pdo slow , website slow,mysqli not developers increase development time.how can bind results dinamicly query?i want write sql statement , bind result should column names dinamicly bind them aoutomaticly , write fetch() , write column names , result.how can that?

when use get_result num rows never work

this not true
besides, never need num rows anyway

when use get_result , if want use again same query

you don't want it

get_result not function because support mysqlid

this true
however, if site big , distinct, there no problem install required module or two.

how can bind results dinamicly query?

use get_result.

to reuse result rows array using fetch_all() , use array anywhere wish

instead of num_rows fetch data , see whether fetched or not.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -