Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database class object

I've seen people use this piece of code and I'm trying to understand what it does because I don't see it in any of the codeigniter documenation or in the source code for the database class.

$this->db->ar_orderby
like image 780
Kevin Smith Avatar asked Jan 30 '13 20:01

Kevin Smith


People also ask

What is a database class?

Classes define the structure of the database and the tables within it. Each class consists of a collection of Fields, Aggregates, and Methods. The structure of a Tables is defined by the classes that form the table. There are two types of class: Creatable Class—An object of this class can be created in the database.

What is SQL object class?

A class is an entity that determines how an object will behave and what the object will contain. In other words, it is a blueprint or a set of instruction to build a specific type of object. It provides initial values for member variables and member functions or methods.

What is database class methods in Salesforce?

Database class methods return the results of the data operation. These result objects contain useful information about the data operation for each record, such as whether the operation was successful or not, and any error information.

What is the use of database SaveResult?

SaveResult objects. It inserts two accounts using Database. insert with a false second parameter to allow partial processing of records on failure. One of the accounts is missing the Name required field, which causes a failure.


1 Answers

This is an array that holds order by columns..

There should be no reason to use this property directly. Instead call $this->db->order_by('column') which appends to the array automatically.

  • defined in system/database/DB_active_rec.php Line 42
  • appended to in method CI_DB_active_record::order_by Line 856
  • used to generate SQL in CI_DB_active_record::_compile_select Line 1781
like image 136
user20232359723568423357842364 Avatar answered Sep 18 '22 12:09

user20232359723568423357842364