Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在moodle中编写select查询_Php_Mysql_Moodle - Fatal编程技术网

Php 如何在moodle中编写select查询

Php 如何在moodle中编写select查询,php,mysql,moodle,Php,Mysql,Moodle,这是我的sql查询: select * from user_tb; 如何将其转换为Moodle查询格式 请帮帮我 $users = $DB->get_records_sql('SELECT * FROM {user}'); 或 请参阅此处的数据库文档 $users = $DB->get_records('user');

这是我的sql查询:

select * from user_tb;
如何将其转换为Moodle查询格式

请帮帮我

$users = $DB->get_records_sql('SELECT * FROM {user}');

请参阅此处的数据库文档

$users = $DB->get_records('user');