1、建两个表publish:pub_id 和 images:pub_id,image_path;
2、使用gii的crud生成代码
3、在models内Publish.php内写关联函数public function getImage()
{
return $this->hasOne(Images::className(),['pub_id'=>'pub_id']);...
分类:
其他好文 时间:
2015-07-13 22:30:37
阅读次数:
186
mousing System;using System.Collections.Generic;using System.Linq;using System.Web;namespace MvcApplication8.Models{ public class BrandDA { ...
分类:
Web程序 时间:
2015-07-11 14:52:51
阅读次数:
146
Model里的代码using System;using System.Collections.Generic;using System.Linq;using System.Web;namespace Mvcshengshiqu.Models{ public class ChinaBF {...
分类:
Web程序 时间:
2015-07-11 14:47:05
阅读次数:
182
继续《C++ premier plus 》 先来解释一下scope和linkage,所谓scope,是指变量的作用范围,所谓linkage,是指变量能否在不同文件中共享 1,自动变量(automatic variable),local scope, no linkage 函数的参数,函数内定义的变量...
分类:
其他好文 时间:
2015-07-10 23:35:54
阅读次数:
168
(一)controllersusing System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using 下拉主外键_关系.Models;namespace 下拉...
分类:
Web程序 时间:
2015-07-10 22:05:59
阅读次数:
106
databases.py
app.config[‘SQLALCHEMY_DATABASE_URI‘]=globalsSet[‘dblink‘]#默认数据库链接
app.config[‘SQLALCHEMY_BINDS‘]={‘one‘:globalsSet[‘dblink_one‘],
‘two‘:globalsSet[‘dblink_two‘]}
models.py
__tablename__=‘tname‘
__bind_key__=‘one‘问题:去重使用groupby..
分类:
数据库 时间:
2015-07-10 16:55:24
阅读次数:
326
先上图使用TFS,之前遇到文件被删除直接获取最新版本就行了,今天遇到这个异常:【TF14446: 无法签出“$/****/****/**/Models.pdb”以进行编辑。您的客户端或团队项目配置为使用“签出时获取最新版本”,而该项的最新状态为“已删除”。要从您的工作区中移除此文件,请执行 get。...
分类:
Web程序 时间:
2015-07-10 12:41:33
阅读次数:
166
转自:http://www.letiantian.me/2014-10-12-three-models-of-naive-nayes/朴素贝叶斯是一个很不错的分类器,在使用朴素贝叶斯分类器划分邮件有关于朴素贝叶斯的简单介绍。若一个样本有n个特征,分别用[latex]x_{1},x_{2},...,x...
分类:
编程语言 时间:
2015-07-10 11:10:43
阅读次数:
158
Models结构ProductorBF public class ProductorBF { private MyDbDataContext Context = new MyDbDataContext(); public List Select() {...
分类:
Web程序 时间:
2015-07-10 00:07:46
阅读次数:
204
分页样式插件http://www.jq22.com/plugin/2705前台引用:1 2 3 模糊搜索框:1 2 3 4 数据: @Html.Raw(ViewData["list"].ToString())js代码: 1 View Code控制器: 1 Models.Vid...
分类:
Web程序 时间:
2015-07-09 21:16:30
阅读次数:
157