上一页 1 ··· 4 5 6 7 8
摘要: 1、添加模型 ./yii dev gii/model tableName=tableName generateLabelsFromComments ns='app\models\base' modelClass=BaseXXXX overwrite 2、添加控制器 ./yii dev gii/cru 阅读全文
posted @ 2016-04-09 16:49 Thomas_188 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1、添加表comment ALTER TABLE tablename COMMENT '修改表注释' 2、添加字段的comment ALTER table MODIFY column datetime DEFAULT NULL COMMENT '这是字段的注释' 2、添加索引 ALTER TABLE 阅读全文
posted @ 2016-04-09 14:22 Thomas_188 阅读(318) 评论(0) 推荐(0) 编辑
摘要: MongoDB地理位置索引常用的有两种。 db.places.ensureIndex({'coordinate':'2d'}) db.places.ensureIndex({'coordinate':'2dsphere'}) 2d 平面坐标索引,适用于基于平面的坐标计算。也支持球面距离计算,不过官方 阅读全文
posted @ 2016-04-03 15:00 Thomas_188 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.1、connect mongodb $conn = new Mongo('192.168.63.179'); 连接远程主机,默认端口27017 $db = $conn test; 选择一个数据库 $collection = $db abc; 选择一个集合 1.2、 select $where = 阅读全文
posted @ 2016-04-03 14:09 Thomas_188 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8