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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -