select max(字段名) from tableName limit 0,1 最大
select min(字段名) from tableName limit 0,1 最小
select * from tableName order by 字段名 DESC limit 0,1 最大
select * from tableName order by 字段名 ASC limit 0,1 最小
去芜存菁
select max(字段名) from tableName limit 0,1 最大
select min(字段名) from tableName limit 0,1 最小
select * from tableName order by 字段名 DESC limit 0,1 最大
select * from tableName order by 字段名 ASC limit 0,1 最小
JP retuen 设计到的表
1 2 3 4 5 6 7 8 9 | select group_concat(voucher_id) from voucher where prefix= 'JP50' AND voucher_no BETWEEN 2146 AND 2160 select * from voucher_action where voucher_id in (16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160) and action_id = 30 select * from voucher_campaign_issue where voucher_id in (16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160) select * from voucher_request_approve where request_id = 23070 select * from voucher_batch where batch_id = 46366 select * from voucher_batch_no_section where batch_id = 46366 UPDATE voucher SET type_id =0,status_id=1,stock_id=35, expiry_date= NULL WHERE voucher_id IN (16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160,16161,16162,16163,16164,16165,16166,16167) DELETE FROM voucher_actionWHERE voucher_id IN (16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160,16161,16162,16163,16164,16165,16166,16167) AND action_id = 30DELETE FROM voucher_campaign_issueWHERE voucher_id IN (16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160,16161,16162,16163,16164,16165,16166,16167) DELETE FROM voucher_request_approveWHERE request_id = 23070 |
你看到的这个文章来自于http://www.cnblogs.com/ayanmw
基本的安装包有: subversion httpd/ svn的httpd的mod_dav_svn mod_authz_svn 两个模块.(yum install mod_dav_svn subversion httpd )
svn的服务形式应该是有两种: 1 通过svnserve建立的 通过svn://ip:port 端口默认是3690,这种形式; 2 通过apache httpd或者其他的web服务器的扩展模块,进行svn管理
对于svnserve,通过svnserve var/www/svn 这种形式建立 daemon的后台进程,但是结束要 kill `pgrep svnserve` 这种形式 来kill掉,不知道有没有直接的比如 stop的方式.
通过http服务器来管理svn也很不错,可以很方便的浏览.其配置过程如下(首先几个软件都安装,这就不用说了.):
1.在 /etc/httpd/module下面 有两个 mod 关于 svn的.
2.在/etc/httpd/config.d/下有一个subversion.conf(没有就建立一个),其内容是:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | LoadModule dav_module modules /mod_dav .so LoadModule dav_svn_module modules /mod_dav_svn .so <Location /svn > DAV svn SVNPath /var/www/svn/ AuthType Basic AuthName "Subversion repos" AuthUserFile /var/www/svn/repos1/conf/passwd Require valid-user < /Location > # To create a new repository "http://localhost/repos/stuff" using # this configuration, run as root: # # # cd /var/www/svn # # svnadmin create stuff # # chown -R apache.apache stuff # # chcon -R -t httpd_sys_content_t stuff #<Location /repos> # DAV svn # SVNParentPath /var/www/svn # # # Limit write permission to list of valid users. # <LimitExcept GET PROPFIND OPTIONS REPORT> # # Require SSL connection for password protection. # # SSLRequireSSL # # AuthType Basic # AuthName "Authorization Realm" # AuthUserFile /path/to/passwdfile # Require valid-user # </LimitExcept> #</Location> |
其中/var/www/svn是准备放仓库的目录,这个目录可以放置多个代码仓库,AuthUserFile就是用户和密码的文件,也可以移动到其他地方单独管理.
/var/www/svn 下面可以通过 svnadmin createa /var/www/svn/repos1 来建立一个空的仓库.还可以建立多个仓库;这个目录貌似最好 给apche用户所有权限:chown -R apache.apache /var/www/svn ;在repos1/conf目录下可以进行一些账号密码 配置,就不多说了.建立的其他仓库 可以拷贝这些conf文件
其中AuthUserFile 是如何制作的呢?
其中ar/www/svn是准备放仓库的目录,这个目录可以放置多个代码仓库,AuthUserFile就是用户和密码的文件,也可以移动到其他地方单独管理.
ar/www/svn 下面可以通过 svnadmin createa ar/www/svn/repos1 来建立一个空的仓库.还可以建立多个仓库;这个目录貌似最好 给apche用户所有权限:chown -R apache.apache ar/www/svn ;在repos1/conf目录下可以进行一些账号密码 配置,就不多说了.建立的其他仓库 可以拷贝这些conf文件
其中AuthUserFile 是如何制作的呢?
下面就是一个示例,创建两个用户 a b,密码 aaa,bbb,再删除。查看密码文件内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | [root@src-server websvn] # htpasswd accesspwd a htpasswd: cannot modify file accesspwd; use '-c' to create it [root@src-server websvn] # htpasswd -c accesspwd a New password: Re- type new password: Adding password for user a [root@src-server websvn] # ll accesspwd -rw-r--r-- 1 root root 16 Jun 23 02:03 accesspwd [root@src-server websvn] # htpasswd accesspwd b New password: Re- type new password: Adding password for user b [root@src-server websvn] # cat accesspwd a:wpEqdKjINQsvM b:JEpHUbhZZP3fc [root@src-server websvn] # htpasswd -D accesspwd b Deleting password for user b [root@src-server websvn] # cat accesspwd a:wpEqdKjINQsvM [root@src-server websvn] # |
3. sudo service httpd restart 重启httpd apache 服务. 貌似很简单呢..回来再整理下svn的命令 补充.
然后通过 http://IP/svn/repos1可以访问这个仓库,可以建立多个仓库同时访问.不过直接访问 IP/svn 无法列出仓库的列表,apache显示 "forbidden \n You don't have permission to access /svn on this server"
对于一些svn的web管理程序也有,比如ViewVC 还有一些其他的管理svn的web程序,最好可以在web端创建仓库、权限管理就好了。目前寻找这样的svn web管理程序中。
CentOS 安装websvn直接yum即可,不需要配置mysql,只需要php的支持即可。
查看websvn的包文件
1 | <br> |
下面就是vim /etc/websvn/config.php,其实这个文件就是/usr/websvn/include/config.php,只是做了一个链接到etc目录,这种方法对于这种需要配置的web程序来说,还真是方便。
这里需要修改的配置选项有:
$config->parentPath('/srv/svn/');
$config->useMultiViews();
############ $config->useAuthenticationFile('/srv/svn/passwd');#这里是因为我 不知道如何在websvn上登录我的账号
$config->setBlockRobots();#防止搜索程序收录
$config->expandTabsBy(4);#默认的8 似乎并不适合我的习惯
$config->useEnscript();##语法高亮 建议安装GNU Enscript高亮显示程序包,官方下载:http://www.iki.fi/~mtr/genscript/
# 关于编码 我不知道如何设置,SetInputEncoding 对于我的websvn-2.3.3不起作用,反而websvn出现500错误。
修改/etc/httpd/conf.d/websvn.conf 添加基本权限认证
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 这里需要修改的配置选项有: $config->parentPath( '/srv/svn/' ); $config->useMultiViews(); ############ $config->useAuthenticationFile('/srv/svn/passwd');#这里是因为我 不知道如何在websvn上登录我的账号 $config->setBlockRobots(); #防止搜索程序收录 $config->expandTabsBy(4); #默认的8 似乎并不适合我的习惯 $config->useEnscript(); ##语法高亮 建议安装GNU Enscript高亮显示程序包,官方下载:http://www.iki.fi/~mtr/genscript/ # 关于编码 我不知道如何设置,SetInputEncoding 对于我的websvn-2.3.3不起作用,反而websvn出现500错误。 修改 /etctpd/conf .d /websvn .conf 添加基本权限认证 |
1 2 3 4 5 | svnserve -d -r /home/svn_rep ps -A | grep svn killall svnserve |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | < div class = "feedback" > < div class = "fb-item fb-qq" > < span class = "fb-text" style = "top: 0px; overflow: hidden; left: 0px; width: 36px;" >联系客服</ span > < span class = "fb-ico" ></ span > </ div > < div class = "fb-item fb-phone" > < span class = "fb-text" style = "overflow: hidden; left: 0px; width: 36px;" >联系电话</ span > < span class = "fb-ico" ></ span > </ div > < div class = "fb-item fb-suggestion" > < span class = "fb-text" style = "overflow: hidden; left: 0px; width: 36px;" >意见建议</ span > < span class = "fb-ico" ></ span > </ div > </ div > < style > .feedback { position: fixed; _position: absolute; z-index: 9999; top: 50%; left: 50%; right: -106px; width: 36px; height: 111px; margin: -48px 0 0 480px } .feedback .fb-item { position: absolute; width: 36px; height: 36px; font-size: 14px; line-height: 36px; color: #fff } .feedback .fb-item .fb-text { display: block; position: absolute; left: 0; top: 1px; overflow: hidden; width: 36px; height: 36px; background: #74b3fb; text-align: center; cursor: pointer } .feedback .fb-item .fb-ico { display: block; position: absolute; top: 0; right: 0; width: 36px; height: 36px; background: #74b3fb url(/img/feedback-sprite.png?_t_=1415611922375) no-repeat; _background-image: url(/img/feedback-sprite.gif?_t_=1415611922375); cursor: pointer } .feedback .fb-item a { text-decoration: none; color: #fff } .feedback .fb-qq { top: 0 } .feedback .fb-qq .fb-ico { border-bottom: 1px solid #55a4ff; background-position: center 7px } .feedback .fb-phone { top: 37px } .feedback .fb-phone .fb-text { cursor: default } .feedback .fb-phone .fb-ico { border-top: 1px solid #74b3fb; border-bottom: 1px solid #55a4ff; background-position: center -28px; cursor: default } .feedback .fb-suggestion { top: 75px } .feedback .fb-suggestion .fb-ico { border-top: 1px solid #74b3fb; background-position: center -62px } html { *overflow-x: hidden } </ style > |
安装了phpstorm之后,想配置svn,结果在file->settings->Version Contorl->subversion->with conmand line client配置成
已经安装的路径地址之后,一直提示
然后google search一下,才发现这个tortoisePro.exe是guide操作程序,不支持conmand line操作,需要重新下载一个
然后我选择了这个下载slikSVN下载
下载完了之后就一直按下一步安装即可,作者安装在了
所以呢,在with conmand line client设置成你的D:\Program Files\SlikSvn\bin\svn.exe即可使用svn了。
(原文地址:http://js250.com/home/?p=35)