×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Apr 10, 2018 3:40 PM
Views: 2
  1. $column = '';
  2. $table_name = '';
  3. $limit = '';
  4. $query = $this->db->query("SELECT DISTINCT($column) AS $column
  5.                                         FROM $table_name
  6.                                         WHERE `availability_instock` = 1
  7.                                         ORDER BY '$column' DESC
  8.                                         LIMIT $limit");
  9. $return =  $query->result_array();