Question: I am developing an Ionic Framework app. Also, I am using `$cookieStore` to store some array data. My array data gets stored in the `$cookieStore` unless the route changes.

Whenever I go back to the previous page the cookies get cleared.

This is what I have tried:

```
$scope.invoice = {
    items: [{
        id: 1,
        qty: 10,
        description: 'sample',
        cost: 99 
    }]
};

$scope.addItem = function() {
    $scope.invoice.items.push({
        id: $stateParams.foodId,
        qty: $scope.count,
        description:  $scope.ar_name,
        cost: $scope.total
    });

    $cookieStore.put("invoices",$scope.invoice.items);
    console.log(  $cookieStore.get("invoices",$scope.invoices));
    //var favoriteCookie = $cookies.get('invoices');
    $scope.lastVal = $cookieStore.get('invoices');
};

```

Answer: 
You don't need a `FROM` clause at all. Just `SELECT 1` will do it.
don't forget to insert a row in your "dual" table, thus in order for the "SELECT 1 FROM DUAL" to work!