mysql查询将字符串转整型
文章描述:
MySQL把字符串转为整数
class_id字段在数据库varchar类型,需要转为int类型
$info = $model->field('*,CAST(class_id AS SIGNED INTEGER) as class_id')->where($where)->find();
发布时间:2023/11/10
文章描述:
MySQL把字符串转为整数
class_id字段在数据库varchar类型,需要转为int类型
$info = $model->field('*,CAST(class_id AS SIGNED INTEGER) as class_id')->where($where)->find();
发表评论