* @param string $return the field we are intered in
* @param string $select A fragment of SQL to be used in a where clause in the SQL call.
* @param array $params array of sql parameters
- * @return mixed array of values
+ * @return array of values
* @throws dml_exception if error
*/
public function get_fieldset_select($table, $return, $select, array $params=null) {
*
* @param string $sql The SQL query
* @param array $params array of sql parameters
- * @return mixed array of values
+ * @return array of values
* @throws dml_exception if error
*/
public abstract function get_fieldset_sql($sql, array $params=null);
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return mixed true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public abstract function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false);
* @param string $table The database table to be inserted into
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
- * @return mixed true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public abstract function insert_record($table, $dataobject, $returnid=true, $bulk=false);
* @param array $params array of sql parameters
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
- * @return mixed an array of objects, or empty array if no records were found
+ * @return array of objects, or empty array if no records were found
* @throws dml_exception if error
*/
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
*
* @param string $sql The SQL query
* @param array $params array of sql parameters
- * @return mixed array of values
+ * @return array of values
* @throws dml_exception if error
*/
public function get_fieldset_sql($sql, array $params=null) {
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
* @param string $table The database table to be inserted into
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
* @param array $params array of sql parameters
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
- * @return mixed an array of objects, or empty array if no records were found
+ * @return array of objects, or empty array if no records were found
* @throws dml_exception if error
*/
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
*
* @param string $sql The SQL query
* @param array $params array of sql parameters
- * @return mixed array of values
+ * @return array of values
* @throws dml_exception if error
*/
public function get_fieldset_sql($sql, array $params=null) {
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
* @param string $table The database table to be inserted into
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
* @param array $params array of sql parameters
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
- * @return mixed an array of objects, or empty array if no records were found
+ * @return array of objects, or empty array if no records were found
* @throws dml_exception if error
*/
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
* @param string $table The database table to be inserted into
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
*
* @param string $sql The SQL query
* @param array $params array of sql parameters
- * @return mixed array of values or false if an error occurred
+ * @return array of values
*/
public function get_fieldset_sql($sql, array $params=null) {
if(!$rs = $this->get_recordset_sql($sql, $params)) {
* @param array $params array of sql parameters
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
- * @return mixed an array of objects, or empty array if no records were found, or false if an error occurred.
+ * @return array of objects, or empty array if no records were found, or false if an error occurred.
*/
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
if(!$rs = $this->get_recordset_sql($sql, $params, $limitfrom, $limitnum)) {
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return true or new id
+ * @return bool|int true or new id
*/
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
if (!is_array($params)) {
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
* @param bool $bulk true means repeated inserts expected
- * @return true or new id
+ * @return bool|int true or new id
*/
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
$dataobject = (array)$dataobject;
* @param array $params array of sql parameters
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
- * @return mixed an array of objects, or empty array if no records were found
+ * @return array of objects, or empty array if no records were found
* @throws dml_exception if error
*/
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
*
* @param string $sql The SQL query
* @param array $params array of sql parameters
- * @return mixed array of values
+ * @return array of values
* @throws dml_exception if error
*/
public function get_fieldset_sql($sql, array $params=null) {
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
* @param string $table The database table to be inserted into
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
* @param array $params array of sql parameters
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
- * @return mixed an array of objects, or empty array if no records were found
+ * @return array of objects, or empty array if no records were found
* @throws dml_exception if error
*/
public function get_records_sql($sql, array $params = null, $limitfrom = 0, $limitnum = 0) {
*
* @param string $sql The SQL query
* @param array $params array of sql parameters
- * @return mixed array of values
+ * @return array of values
* @throws dml_exception if error
*/
public function get_fieldset_sql($sql, array $params = null) {
* @param bool $returnit return it of inserted record
* @param bool $bulk true means repeated inserts expected
* @param bool $customsequence true if 'id' included in $params, disables $returnid
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
* @param string $table The database table to be inserted into
* @param object $data A data object with values for one or more fields in the record
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
- * @return true or new id
+ * @return bool|int true or new id
* @throws dml_exception if error
*/
public function insert_record($table, $dataobject, $returnid = true, $bulk = false) {