删除软件表中多余的重复记录,重复记录是根据单个字段(s_downloadurl)来判断,只留有sid最小的记录
create table `temp` select s_downloadurl,min(sid) as sid from `software` group by 's_downloadurl' having count('s_downloadurl') > 1;
delete from `software` where 's_downloadurl' in (select 's_downloadurl' from `temp`) and 'sid' not in(select 'sid' from `temp`);
select s_downloadurl from `nsoftware` group by s_downloadurl having count(s_downloadurl)>1
ALTER TABLE `keyword` ADD UNIQUE (`k_id`)
$a='/<td width="310" rowspan="2">([sS]*)<a href="([^>]*)">/iU';//正则匹配回车
preg_match($a,$page1,$view4);
print_r($view4);
exit;
www.yardvps.com 买空间的网站
www.vpszz.net
delete FROM `nkeyword` WHERE `nkeyword`='' and `id`<188034
SELECT * FROM `nkeyword` WHERE `nkeyword`='opera mini kb' and `nkeyword`!=''
select s_name,count(*) as con FROM `nsoftware` group by s_name order by con DESC
SELECT `sid` , count( * ) FROM `nsoftware` GROUP BY `s_sname` HAVING count( `s_sname` ) =1
//.htaccess里写的正则
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
RewriteRule ^(.*)/[content|download]/software/(.*).html$ $1/Index/[content|download]/software/$2 [QSA,PT]
RewriteRule ^(.*)/windows/(.*)/(.*).html$ $1/Index/windows/bg/$2/sm/$3 [QSA,PT]
今天工作中居然把for循环写错了。事实证明,不经意的错误。带来的可能是灾难性的后果。
RewriteRule ^(.*)/software/(.*)/(.*).html$ $1/Index/keyword/software/$2/downloads/$3 [QSA,PT]
</IfModule>