私は2つのテーブルtbl_expenseとを持っていtbl_miscellaneous_categoryます。tbl_expense私にはいくつかのフィールドがあります。主にidとcategory。 tbl_miscellaneous_category id and name名前はに他なりませcategoryんtbl_expense table。私はこのようなo/pが必要です:id name
SELECT te.id,te.category
FROM tbl_expense te
inner join tbl_miscellaneous_category tmc
on te.category=tmc.id
WHERE te.id= '1'