moodle database access functions

July 21, 2014

Access denied

One of the dramatic proofs that OOP is NOT an improvement. In fact OOP programming is at least 3 times more expensive, time consuming, than structured programming. It is a step backward.

If you try to use a standard php – mysql function call, you get "Access denied"

these 2 database connection statements in your program
enable bypassing moodle’s "Access denied" lock-out.

$socket = mysql_connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass);
mysql_select_db($CFG->dbname) ;

for a reference list of moodle’s database access functions see

Leave a Reply

Your email address will not be published. Required fields are marked *

We try to post all comments within 1 business day