Add a file in moodledata/filedir

Re: Add a file in moodledata/filedir

by Julen Pardo -
Number of replies: 0

Hi Justin,

When using the Database API, you don't have to specify table's name. And, when using "_sql" methods (any method where you have to hardcode the SQL query), you should wrap the table names between curly braces; the DB API will take care of parsing it to table names with the configured prefix.

So, this would be the right way:

$DB->delete_records('video');

And same for inserting.


For future ocassions, providing information about the error you're getting, or other useful information about the problem, would be helpful for us at the time of proving guidelines or possible solutions. wink


Best regards,

Julen