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: 
Try this:

```
$sql = "SELECT * FROM `products` WHERE `status`=1 AND `country`=5 AND `product_price` > 50 AND `product_price` <= 100 ORDER BY `product_id` DESC";
        $product = $this->db->query($sql)->result_array();

```
Try this

```
$this->db->from('products');
$this->db->where("status='1' AND country='5' AND product_price > '50' AND product_price <= '100'", null, false);
$this->db->order_by("product_id", "desc");
$query = $this->db->get(); 
return $query->result_array();

```