我们有一个Excel电子表格,其中包含从客户端导入到MySQL的数据。有些列名中有空格,所以当我们使用数据转储函数构建模式时,它将空格添加到字段名中;因此,BaseModels也有它。
'Client Field': { type: string, peerName: client_field }想知道是否有一个属性要添加到模式中的字段中,以向字段名添加空格?例如,有peerName和phpName:是否有从字段中删除空格的属性?
发布于 2010-11-09 12:35:23
不能100%确定您的意思(字段名中有空格是一个糟糕的设计),但这可能是您想要的:
class YourModel extends BaseYourModel
{
public function setClientField($value)
{
return parent::_set('Client Field', $value);
}
public function getClientField()
{
return parent::_get('Client Field');
}
}https://stackoverflow.com/questions/4133024
复制相似问题