5.4.3 The inventory_in_stock Function

The inventory_function function returns a boolean value indicating whether the inventory item specified is in stock.

Parameters
  • p_inventory_id: The ID of the inventory item to be checked.

Return Values

This function returns TRUE or FALSE to indicate whether the item specified is in stock.

Sample Usage
mysql> SELECT inventory_in_stock(9);
+-----------------------+
| inventory_in_stock(9) |
+-----------------------+
|                     0 |
+-----------------------+
1 row in set (0.00 sec)

mysql> SELECT inventory_in_stock(8);
+-----------------------+
| inventory_in_stock(8) |
+-----------------------+
|                     1 |
+-----------------------+
1 row in set (0.00 sec)