I have this following query which works, but i need it to return only the cols. I am asking it to. But its returning all cols in the table. How to get only cols that i am renaming in the query i.e only 5 cols.
SELECT stocks.*, devbg_products.*,
stoc_id AS SKU,
ItemName as ItemTitle,
stoc_qty AS AvailableQuantity,
ItemPrice AS RetailPrice,
ItemDescription AS Description
FROM stocks
LEFT JOIN devbg_products ON stocks.stoc_item_id = devbg_products.ItemID;
Sorry my bad, I did the following and its working:
SELECT
stocks.stoc_id AS SKU,
devbg_products.ItemName as ItemTitle,
stocks.stoc_qty AS AvailableQuantity,
devbg_products.ItemPrice AS RetailPrice,
devbg_products.ItemDescription AS Description
FROM stocks
LEFT JOIN devbg_products ON stocks.stoc_item_id = devbg_products.ItemID