php - Codeigniter order_by name not working -


so pulling 10 records database @ time using ajax call.

below code:

public function get_next_10($offset = 0) {     $this->db->limit(15, $offset);     $query = $this->db->get("postovi");     return $query->num_rows() > 0 ? $query->result_array() : null; } 

i tried putting:

$this->db->order_by("name", "asc"); 

but it's throwing error.

its working fine

public function get_next_10($offset = 0) { $this->db->limit(15, $offset); $this->db->order_by('name', 'asc'); $query = $this->db->get("postovi"); return $query->num_rows() > 0 ? $query->result_array() : null; } 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -