认证高级PHP讲师
What database are you using? You replace the parameter (long id) with (Integer id). The reason why this error is reported is that the type conversion failed. The long type cannot be converted to the Integer type.
You can convert the id to Integer in the method and then put it into the dc,
String str = id.toString();Integer id1 = Integer.valueOf(str);or Integer id1 = new Integer(str);
If you really want to force transfer, first long转成string,然后string转integer
long
string
integer
What database are you using?
You replace the parameter (long id) with (Integer id).
The reason why this error is reported is that the type conversion failed.
The long type cannot be converted to the Integer type.
You can convert the id to Integer in the method and then put it into the dc,
String str = id.toString();
Integer id1 = Integer.valueOf(str);
or Integer id1 = new Integer(str);
If you really want to force transfer, first
long
转成string
,然后string
转integer