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
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.
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.
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.
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.
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.
system/database/DB_active_rec.php
Line 42CI_DB_active_record::order_by
Line 856 CI_DB_active_record::_compile_select
Line 1781If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With