下面我有我测试过的 SQL 查询工作正常Select data_info.user_id, data_info.type_id, data_info.specific_title, data_info.content, life_area.type_id, life_area.type_idFrom data_info Left Join life_area On data_info.type_id = life_area.idWhere data_info.user_id = '0001'现在我试图将工作 SQL 转换为 asp.net MySqlCommand,但它无法工作并显示语法错误MySqlCommand cmd = new MySqlCommand( "Select data_info.user_id,data_info.type_id,data_info.specific_title,data_info.content,"+ "life_area.type_id,life_area.type_id" + "FROM data_info LEFT JOIN life_area ON data_info.type_id = life_area.id" + "Where data_info.user_id='0001'" , conn);
1 回答
- 1 回答
- 0 关注
- 245 浏览
添加回答
举报
0/150
提交
取消