Closed saeedvir closed 3 years ago
what's ex?
//for get function in medoo <?php public function get($table, $join = null, $column = null, $where = null) { $query = $this->query($this->select_context($table, $join, $column, $where) . ' LIMIT 1'); if ($query) { $data = $query->fetchAll(PDO::FETCH_ASSOC); if (isset($data[ 0 ])) { $column = $where == null ? $join : $column; if (is_string($column) && $column != '*') {
if($this->return_type==='json')
return json_encode(array($data[ 0 ][ $column ]));
else
return $data[ 0 ][ $column ];
}
if($this->return_type==='json')
return json_encode(array($data[ 0 ]));
else
return $data[ 0 ];
}
else
{
return false;
}
}
else
{
return false;
}
}
?>
hi,please add return type for ex. 'json' or ...