Project module add-on: database access

Project module add-on: database access

walid touati -
回帖数: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
回复walid touati

Re: Project module add-on: database access

Don Hinkelman -
Particularly helpful Moodlers的头像 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... 微笑
Don
回复Don Hinkelman

Re: Project module add-on: database access

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.