How to a vertical master detail query? I want product name to display blank field if same product came before . 

product_name    | colors_available | items_left
JUMPAN TSHIRT   | red              | 3
                | blue             | 2
                | black            | 9
B.BALL CUP      | red              | 10


can i get this ouput using mysql query?
You probably want to do this on the client side / in your application, not on the database server. This would give your application all information to still reference each row for further action. The unique identifier in your example would be the combination (product_name, colors_available) - this information is lost, when you change your output on the server side.



If you still want to do it in mysql...

Let's assume your_query returns data like this right now:

+---------------+------------------+------------+
| product_name  | colors_available | items_left |
+---------------+------------------+------------+
| JUMPAN TSHIRT | red              |          3 |
| JUMPAN TSHIRT | blue             |          2 |
| JUMPAN TSHIRT | black            |          9 |
| B.BALL CUP    | red              |         10 |
+---------------+------------------+------------+


The following query will suppress output of product_name whenever the current product_name doesn't change to the row before:

SELECT
        -- compare current row's product_name to local variable
    IF( yq.product_name = @last_product_name,
        -- if they match return NULL
        NULL,
        -- if they don't match update local variable to current product_name
        @last_product_name := yq.product_name
      ) AS product_name,
    yq.colors_available,
    yq.items_left
FROM (your_query) AS yq


This will result in the following output:

+---------------+------------------+------------+
| product_name  | colors_available | items_left |
+---------------+------------------+------------+
| JUMPAN TSHIRT | red              |          3 |
| NULL          | blue             |          2 |
| NULL          | black            |          9 |
| B.BALL CUP    | red              |         10 |
+---------------+------------------+------------+


You can change NULL to '' to return an empty string, of course.