Project module add-on: database access

Project module add-on: database access

by walid touati -
Number of replies: 3
hi all,
i wanna know how does the project module acces to the database(i searched in source code and i didn't find any thing like "mysql_connect"or "mysql_select_db"..)
thanks a lot
Average of ratings: -
In reply to walid touati

Re: Project module add-on: database access

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Walid,

According to my programmer friend, the project module accesses the database the same as any other module in Moodle, by the settings in the config.php file. He says, "There is no need to write these functions "mysql_connect"or "mysql_select_db" in Moodle, it's enough to include config.php file to the beginning of the script and we'll be automatically connecting with MySQL database where there is Moodle and Moodle functions."

I hope this helps... smile
Don
In reply to Don Hinkelman

Re: Project module add-on: database access

by walid touati -

Hi Don,

i find it, i must:

include config.php file to the beginning of the script

then, use insert_records(),get_records()...

thanks a lot, best regards.