我有两张桌子:items和orders
items
--------------
id (int) | type_1 (int) | type_2 (int)|
orders
--------------
id (int) | transaction_type enum ('type_1', 'type_2')
基本上,我想做以下事情:
select (select transaction_type from orders where id=1) from items;
所以,问题是 ,string返回的select transaction_type from orders where id=1不能转换成列名。