I'm having the table
- sales_orders
In this table having column names
- order_no
- order_status
- order_type
SQL query:
SELECT order_no FROM sales_orders where order_status='Pending' and order_type='1'
In the above query if the order_type=1 value doesn't exists in the database column that means instead of value 1 there is a value '0' , I want to display an error.
How to modify the above query for that?