php - Is there any way to close database connection after fetch data in moodle -
i trying access value database in every 2 seconds , simultaneously 50 users.
my query looks follows:
global $db; $curseid = $_request['crseid']; if(isset($curseid)){ $qstndetails = $db->get_records_sql('select * {questions} courseid=? order id desc limit 0,1',array($curseid)); $qstnval = array_values($qstndetails); }
because of heavy load data not loading , continuously fetching in every 2 seconds.
how can close data base connection after fetching record?
in case of java
can close object of connection class. suppose con object close connection after fetching data con.close();
.
is there way close database connection after fetch data in moodle
??
moodle version - 2.9.1
Comments
Post a Comment