Question: I get some problem with my ANGULAR 5 application.

I use some component that need JQUERY it was functional before the migration I didn t change anything.

I add in my component
declare var jQuery: any;

In package. json

```
    "jquery": "^3.2.1",
    "jquery-slimscroll": "^1.3.8",
    "jquery-sparkline": "^2.4.0",
    "jstree": "^3.3.4",

```

dev

```
    "@types/jquery": "^3.2.16",

```

angular cli

```
      "scripts": [
      "../node_modules/jquery/dist/jquery.js",
      "../node_modules/metismenu/dist/metisMenu.js",
      "../node_modules/jquery-sparkline/jquery.sparkline.js",
      "../vendor/pace/pace.min.js",
      "../node_modules/jstree/dist/jstree.min.js",
      "../node_modules/simplebar/dist/simplebar.js"
  ],

```

Someone have an idea ?

Answer: 
It's better to use built-in Codeigniter Query-builder:

```
$this->db->select('*');
$this->db->where([
    'status'    => 1,
    'country'   => 5,
    'product_price >' => 50,
    'product_price <=' => 100,
]);
$this->db->order_by('product_id', 'DESC');
$this->db->get('products');
$product = $this->db->result();

```
Can you "describe" type the table? If the field "product\_id" is text (Example: **VARCHAR**), then it will never follow the order asc/desc.. 

Sorry My English.. **Good work**!