str="select * from goods where owner="+user_id;
在数据库里owner是char型的。
而user_id是Session传过来的值。
自么把它们俩的类型搞成一样啊?