码迷,mamicode.com
首页 >  
搜索关键字:__user    ( 38326个结果)
ThinkPHP 多表查询-如果字段A相同,则把字段B相加
在一个项目中,需要查询表tr_product中的user_id字段,如果user_id相同,则把其对应的money字段相加,数据库截图如下:实现代码:$Model = D('Model');$res =$Model->query("SELECT user_id,sum(money) from tr_...
分类:Web程序   时间:2014-07-12 13:11:17    阅读次数:287
php模块参考
1 dbtype=$dbtype; 14 $this->host=$host; 15 $this->user=$user; 16 $this->pwd=$pwd; 17 $this->dbname=$dbname; 18 }...
分类:Web程序   时间:2014-07-12 00:19:40    阅读次数:246
linux根目录下各文件夹的作用
linux下的文件结构,看看每个文件夹都是干吗用的/bin二进制可执行命令/dev设备特殊文件/etc系统管理和配置文件/etc/rc.d启动的配置文件和脚本/home用户主目录的基点,比如用户user的主目录就是/home/user,可以用~user表示/lib标准程序设计库,又叫动态链接共享库,...
分类:系统相关   时间:2014-07-11 23:39:24    阅读次数:385
Java工程得到文件路径
System.out.println(System.getProperty("user.dir"));//得到工程所在磁盘路径String mailFilePath = new File("WebRoot").getAbsolutePath()+"\\file\\maiList.txt";//得到w...
分类:编程语言   时间:2014-07-11 22:39:36    阅读次数:243
使用annotation配置hibernate(1)
Hibernate3.0后新增了annotation的配置方式,比起xml有着更加简洁的配置1:修改hibernate.cfg.xml之前标签中配置了hbm资源文件由于现在使用了注解方式代替了hbm文件,所以需要修改mapping标签的内容2:User.java 1 @Entity 2 @Table...
分类:系统相关   时间:2014-07-11 22:38:19    阅读次数:300
MySql查询优化limit 1避免全表扫描(转)
在某些情况下,如果明知道查询结果只有一个,SQL语句中使用LIMIT 1会提高查询效率。例如下面的用户表(主键id,邮箱,密码):create table t_user(id int primary key auto_increment,email varchar(255),password var...
分类:数据库   时间:2014-07-11 22:15:52    阅读次数:321
Error prompt:“xxx is not in the sudoers file”----Solution
//SituationSystem prompts"xxx is not in the sudoers file"(xxx equals the user name)while executing command "sudo":sudo-iPassword:xxx isnotinthe sudoer...
分类:其他好文   时间:2014-07-11 22:09:28    阅读次数:216
创建表空间
CREATE TABLESPACE dna36 DATAFILE 'D:\oracle\oradata\orcl\dna36.dbf' SIZE 100M AUTOEXTEND ON NEXT 10M maxsize unlimited;CREATE USER dna36 IDENTIFIED BY...
分类:其他好文   时间:2014-07-11 22:07:18    阅读次数:273
python学习记录第四篇--数据库
只要用到MySQLdb,使用时请先安装MySQLdb,百度上可以下载!#coding=utf-8'''@author:使用python操作MySQL数据库'''import MySQLdb#import MySQLdb.cursorsconn=MySQLdb.connect(user='root',...
分类:数据库   时间:2014-07-11 21:12:45    阅读次数:265
MySQL 出现 Access denied for user 'root'@'localhost' (using password: YES) 错误
登录某台服务器的mysql时候总报错:mysql2/client.rb:58:in `connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql2::Error)解决方法: 在windows 下的解...
分类:数据库   时间:2014-07-11 21:04:14    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!