$sql_pending_item_expiry="select a.*,b.item_name,a.expiry_date,trim(concat(ifnull(f.form_name,''),' ',b.item_name)) itemwithformname from item_stock_miscellaneous a inner join tbl_items b on a.item_id=b.item_id left join medicine_form f on b.item_form_id=f.form_id where a.id='".$item_stock_id."'";