??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品一二,久久精品国产免费观看,色综合久久中文综合久久牛http://www.aygfsteel.com/ginew/archive/2006/11/17/81734.html无风之雨无风之雨Fri, 17 Nov 2006 04:15:00 GMThttp://www.aygfsteel.com/ginew/archive/2006/11/17/81734.htmlhttp://www.aygfsteel.com/ginew/comments/81734.htmlhttp://www.aygfsteel.com/ginew/archive/2006/11/17/81734.html#Feedback2http://www.aygfsteel.com/ginew/comments/commentRss/81734.htmlhttp://www.aygfsteel.com/ginew/services/trackbacks/81734.htmlhref="#" vs. href="javascript:void(0)"开发的时候有旉要用link(<a>)来触发一些javascript事gQ所以常常可以看到如下的代码Q?

<a href="javascript:void(0)" onclick="doSomething();returnfalse;">Link</a>

q是一个曾l被多次讨论q的问题Q长期以来,我也一直是q样写的。读?>>a href=”javascript:void(0);??avoid the void 之后Q我认同?jin)作者的意见。下面的写法实更合理:(x)

<a href="#" onclick="doSomething();returnfalse;">Link</a>

或?

<script type="javascript">
function doSomething() {
  //doSomething
  returnfalse;
}
</script>
<a href="#" onclick="return doSomething();">Link</a>

以往大家不?#"的问题是Q这导致点击链接时面跛_面剙Q但通过 return false 语句得浏览器忽略链接的默认动作,从而避免了(jin)此问题?

youngpup 更有意思,他在>>How to Create Pop-Up Windows 中言辞激烈的倡导大家永远永远永远不要使用 javascript: 伪协议:(x)

Never, ever, ever use the javascript: pseudo-protocol for anything, ever ever ever ever again. Please. Pretty please.

他的解决Ҏ(gu)是:(x)

<a 
  href="http://google.com/" 
  onclick="window.open(this.href, 'popupwindow', 
  'width=400,height=300,scrollbars,resizable'); 
  returnfalse;">

q样的好处就是可以保存到书签或者收藏夹Q可以左键单击,也可以右键用!



无风之雨 2006-11-17 12:15 发表评论
]]>
resin使用security-manager的问?/title><link>http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html</link><dc:creator>无风之雨</dc:creator><author>无风之雨</author><pubDate>Fri, 09 Jun 2006 03:00:00 GMT</pubDate><guid>http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html</guid><wfw:comment>http://www.aygfsteel.com/ginew/comments/51636.html</wfw:comment><comments>http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ginew/comments/commentRss/51636.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ginew/services/trackbacks/51636.html</trackback:ping><description><![CDATA[ <p> (tng) (tng) (tng) (tng) 我们打算为用h讑֍独的虚拟L服务器,可以让企业自M传jsp、htm、php{程序。其中resin用来做jsp的容器?br /> (tng) (tng) (tng) (tng) ׃是用戯主通过FTP上传E序Q我们必L制这些程序可以执行的权限Q不能让用户随便览盘?sh)的文gQ但又要能让resin可以正常q行。比如:(x)/data/user_a目录中的E序Q只能在/data/user_a目录?qing)其子目录中dQ如果想要访问其他目录,没有权限?br /> (tng) (tng) (tng) (tng) 通过研究resin的文以?qing)JAVA的机Ӟ我认实现以上构想Q可以通过使用java权限理器来构徏一个resin的沙来对java的具体操作进行授权?br />参考文:(x)<a >http://www.caucho.com/resin-3.0/security/securitymanager.xtp</a> Q?a >http://www.jscud.com/srun/news/viewhtml/3_2005_10/148.htm</a></p> <p> (tng) (tng) (tng) (tng) 当我认ؓ(f)胜利在望的时候,发现resin好像不支持grant codeBase "file:xxxx ?br /><br />grant codeBase "file:/data/ftpdata/user01.test.com/-" {<br /> (tng)permission java.io.FilePermission "/data/ftpdata/user01.test.com/-", "read,write,delete";<br />};<br /> (tng) (tng) (tng) (tng) 上面的语句,语法上没有问题,但就是不起作用。那个codebase目录下的文gQ对本目录没有Q何权限?br /><br /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) resin的官方论坛里面,有h?001q_(d)针对resin1.2.5提Z(jin)和我一怸L(fng)疑问Q?a >http://www.caucho.com/support/resin-interest/0105/0106.html</a>Q,作者发现问题是׃resin的classloader是非安全的,因此改了(jin)resin原文件后解决?jin)问题?a >http://www.caucho.com/support/resin-interest/0105/0112.html</a>Q,但是我看resin3的源代码Q里面已l基于java.security.SecureClassLoaderQ因此应该不是这个原因了(jin)?br /> (tng) (tng) (tng) (tng) 以下是我的resin.policy文gQ?/p> <p>grant codeBase "file:${java.home}/lib/-" {<br /> (tng)permission java.security.AllPermission;<br />};</p> <p>grant codeBase "file:${java.home}/jre/lib/-" {<br /> (tng)permission java.security.AllPermission;<br />};</p> <p>grant codeBase "file:${resin.home}/lib/-" {<br /> (tng)permission java.security.AllPermission;<br />};</p> <p>grant {<br /> (tng)permission java.util.PropertyPermission "*", "read";<br /> (tng)permission java.io.SerializablePermission "enableSubstitution";<br /> (tng)permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; (tng) <br /> (tng)permission java.lang.RuntimePermission "accessClassInPackage.*";<br /> (tng)permission java.lang.RuntimePermission "getClassLoader";<br /> (tng)permission java.lang.RuntimePermission "accessDeclaredMembers";<br /> (tng)permission java.lang.RuntimePermission "modifyThreadGroup";<br /> (tng)permission java.lang.RuntimePermission "setContextClassLoader"; <br /> (tng)permission java.lang.RuntimePermission "setIO";<br /> (tng)permission java.lang.RuntimePermission "stopThread";<br /> (tng)permission java.lang.RuntimePermission "createClassLoader";<br /> (tng)permission java.lang.RuntimePermission "getProtectionDomain";<br /> (tng)permission java.lang.RuntimePermission "defineClassInPackage";<br /> (tng)permission java.security.SecurityPermission "putProviderProperty.SunJCE";<br /> (tng)permission java.security.SecurityPermission "insertProvider.SunJCE";<br /> (tng)permission java.util.logging.LoggingPermission "control";<br /> (tng)permission java.lang.RuntimePermission "getAttribute";<br /> (tng)permission java.util.PropertyPermission "jaxp.debug", "read";<br /> (tng)permission ognl.OgnlInvokePermission "invoke.*";<br /> (tng)permission java.net.SocketPermission "localhost:3306","connect";<br /> (tng)permission java.io.FilePermission "${resin.home}/-", "read";<br /> (tng)permission java.io.FilePermission "${java.home}/-", "read";<br /> (tng)permission java.io.FilePermission "/tmp/-","read,write,delete";<br /> (tng)permission java.io.FilePermission "/tmp","read,write,delete";<br /> (tng)permission java.io.FilePermission ".","read";<br /> (tng)permission java.io.FilePermission "/home/apps/java/jdk/lib/tools.jar","read";<br /> (tng)permission java.io.FilePermission "/bin/sh", "read,execute";<br />};</p> <p>//以下语句没有M作用Q?data/ftpdata/user01.test.com/下的jsp对这个目录没有读的权?br />grant codeBase "file:/data/ftpdata/user01.test.com/-" {<br /> (tng)permission java.io.FilePermission "/data/ftpdata/user01.test.com/-", "read,write,delete";<br />};<br /></p> <img src ="http://www.aygfsteel.com/ginew/aggbug/51636.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ginew/" target="_blank">无风之雨</a> 2006-06-09 11:00 <a href="http://www.aygfsteel.com/ginew/archive/2006/06/09/51636.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GPL协议q?/title><link>http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html</link><dc:creator>无风之雨</dc:creator><author>无风之雨</author><pubDate>Tue, 16 May 2006 08:50:00 GMT</pubDate><guid>http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html</guid><wfw:comment>http://www.aygfsteel.com/ginew/comments/46436.html</wfw:comment><comments>http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ginew/comments/commentRss/46436.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ginew/services/trackbacks/46436.html</trackback:ping><description><![CDATA[要了(jin)解GPLQ一般地Q?zhn)没有必要耐心(j)阅读<a >原版的GPL协议</a>Q因?GPL 无非交待?jin)几个原则?x)<br /><ul><br /><li>保软g自始至终都以开放源代码形式发布Q保护开发成果不被窃取用作商业发售。Q何一套YӞ只要其中使用?jin)?GPL 协议保护的第三方软g的源E序Qƈ向非开发h员发布时QY件本w也p动成为受 GPL 保护q且U束的实体。也是_(d)此时它必d放源代码?<br /><br /></li><li>GPL 大致是一个左侧版权(CopyleftQ或译ؓ(f)“反版权”、“版权属左”、“版权所无”、“版责”等Q的体现。你可以L所有原作的版权 信息Q只要你保持开源,q且随源代码、二q制版附?GPL 的许可证pQ让后h可以很明地得知此Y件的授权信息。GPL _N是Q只要软g在完整开?的情况下Q尽可能使用者得到自由发挥的I间Q软g得到更快更好的发展?<br /><br /></li><li>无论软g以何UŞ式发布,都必d旉上源代码。例如在 Web 上提供下载,必d二进制版本(如果有的话)(j)下蝲的同一个页面,清楚地提供源代码下蝲的链接。如果以光盘形式发布Q就必须同时附上源文件的光盘?<br /><br /></li><li>开发或l护遵@ GPL 协议开发的软g的公司或个hQ可以对使用者收取一定的服务费用。但q是一句老话——必L偿提供Y件的完整源代码,不得源代码与服务做捆绑或Q何变相捆l销售?<br /></li></ul><img src ="http://www.aygfsteel.com/ginew/aggbug/46436.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ginew/" target="_blank">无风之雨</a> 2006-05-16 16:50 <a href="http://www.aygfsteel.com/ginew/archive/2006/05/16/46436.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>最惌的Rhttp://www.aygfsteel.com/ginew/archive/2006/05/14/46059.html无风之雨无风之雨Sun, 14 May 2006 03:28:00 GMThttp://www.aygfsteel.com/ginew/archive/2006/05/14/46059.htmlhttp://www.aygfsteel.com/ginew/comments/46059.htmlhttp://www.aygfsteel.com/ginew/archive/2006/05/14/46059.html#Feedback0http://www.aygfsteel.com/ginew/comments/commentRss/46059.htmlhttp://www.aygfsteel.com/ginew/services/trackbacks/46059.html (tng)



无风之雨 2006-05-14 11:28 发表评论
]]>
关于IE无法打开INTERNET站点的错http://www.aygfsteel.com/ginew/archive/2006/04/19/41975.html无风之雨无风之雨Wed, 19 Apr 2006 10:14:00 GMThttp://www.aygfsteel.com/ginew/archive/2006/04/19/41975.htmlhttp://www.aygfsteel.com/ginew/comments/41975.htmlhttp://www.aygfsteel.com/ginew/archive/2006/04/19/41975.html#Feedback6http://www.aygfsteel.com/ginew/comments/commentRss/41975.htmlhttp://www.aygfsteel.com/ginew/services/trackbacks/41975.html
 (tng) (tng) (tng) (tng) (tng) notload.jpg
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) q个问题我以前遇到过Q一直没有详l的LI原因,只是以ؓ(f)是服务器关闭q接太快的原因。今天发现这个问题出的很频繁Q服务器斚w没有改什么,只是上传?jin)新的页面程序而已Q应该不?x)和服务器有兟뀂在寚w面进行分析,q搜索了(jin)一下网上,发现原来是js在documentq没完全load完的时候就试图改变其值导致?br />
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) 因此对js做如下改变:(x)

原jsQ?br />
 (tng) (tng) (tng) (tng) window.settimeout("go()",500);
 (tng) (tng) (tng) (tng) function go(){
 (tng) (tng) (tng) .......
 (tng) (tng) (tng) (tng) }

Ҏ(gu)Q?br />
var go_i=window.setInterval("go()",500);
function go(){
 (tng) (tng) (tng)if(document.readyState=="complete"){
 (tng) (tng) (tng) (tng) (tng) window.clearInterval(go2_i);
 (tng) (tng) (tng) }
 (tng) (tng) (tng) (tng)else return;
 (tng) (tng) (tng) ........
}
目的是让他一定要在document完成后才执行那个操作

无风之雨 2006-04-19 18:14 发表评论
]]>
document.domain与域名的问题http://www.aygfsteel.com/ginew/archive/2006/04/13/40850.html无风之雨无风之雨Thu, 13 Apr 2006 03:54:00 GMThttp://www.aygfsteel.com/ginew/archive/2006/04/13/40850.htmlhttp://www.aygfsteel.com/ginew/comments/40850.htmlhttp://www.aygfsteel.com/ginew/archive/2006/04/13/40850.html#Feedback3http://www.aygfsteel.com/ginew/comments/commentRss/40850.htmlhttp://www.aygfsteel.com/ginew/services/trackbacks/40850.html以前如果要iframe里面的脚本能讉Kparent的内容,但iframe和parent的二U域名相同,那一般都?x)在两者都写上document.domain="xxx.com" 以放宽访问权限?br />
今天发现Q如果iframe和parent在同一个三U域名下Q比如都是aa.bb.comQ那设了(jin)document.domain反而会(x)造成讉K拒绝?br />
查了(jin)下MSDNQ有如下解释Q?br />

Remarks

The property initially returns the host name of the server from which the page is served. The property can be assigned the domain suffix to allow sharing of pages across frames. For example, a page in one frame from home.microsoft.com and a page from www.microsoft.com initially would not be able to communicate with each other. However, by setting the domain property of both pages to the suffix "microsoft.com", you ensure that both pages are considered secure and access is available between the pages.

When you set the domain property, use the domain name determined by the server rather than by the client browser.

All the pages on different hosts must have the domain property explicitly set to the same value to communicate successfully with each other. For example, the value of the domain property of a page on the host microsoft.com would be "microsoft.com" by default. It might seem logical that if you set the domain property of a page on another host named msdn.microsoft.com to "microsoft.com," that the two pages could communicate with each other. However, this is not the case unless you have also explicitly set the domain property of the page on microsoft.com to "microsoft.com".

Furthermore, this property cannot be used to allow cross-frame communication among frames with different domain suffixes. For example, a page in one frame from www.microsoft.com and a page in another frame from www.msn.com would not be able to communicate with each other even if the domain property of both pages was set to the suffix "microsoft.com".

security note Security Alert (tng) (tng)Using this property incorrectly can compromise the security of your Web site. Set the domain property only if you must allow cross-domain scripting. Use a value determined on the server. Setting this property to a value determined on the client (like through the location object) could expose your site to attack from another site through Domain Name System (DNS) manipulation. For more information, see Security Considerations: Dynamic HTML.

For more information on domain security, see About Cross-Frame Scripting and Security.



无风之雨 2006-04-13 11:54 发表评论
]]>
域名和COOKIE的问?/title><link>http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html</link><dc:creator>无风之雨</dc:creator><author>无风之雨</author><pubDate>Tue, 11 Apr 2006 09:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html</guid><wfw:comment>http://www.aygfsteel.com/ginew/comments/40505.html</wfw:comment><comments>http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ginew/comments/commentRss/40505.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ginew/services/trackbacks/40505.html</trackback:ping><description><![CDATA[今天发现Q在IE里面Q当一个域名包含_的时候,IE不会(x)l这个网站发送COOKIEQ真变态。同事调试了(jin)半天Q才发现q有q个问题<img src ="http://www.aygfsteel.com/ginew/aggbug/40505.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ginew/" target="_blank">无风之雨</a> 2006-04-11 17:54 <a href="http://www.aygfsteel.com/ginew/archive/2006/04/11/40505.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我认为最好的MYSQL备䆾方式http://www.aygfsteel.com/ginew/archive/2006/04/11/40439.html无风之雨无风之雨Tue, 11 Apr 2006 04:47:00 GMThttp://www.aygfsteel.com/ginew/archive/2006/04/11/40439.htmlhttp://www.aygfsteel.com/ginew/comments/40439.htmlhttp://www.aygfsteel.com/ginew/archive/2006/04/11/40439.html#Feedback0http://www.aygfsteel.com/ginew/comments/commentRss/40439.htmlhttp://www.aygfsteel.com/ginew/services/trackbacks/40439.html (tng) (tng) (tng) 我主张,另外找一台比较空闲的机器Q来做数据库的备份。这台机器作以下用途:(x)

 (tng) (tng) 它是L据库带的slave数据库群里面的一収ͼ每天凌晨定时启动同步数据Q等q上bin-logq全部执行后Q停止同步,q用select * into outfile数据全部导出成文gQƈ且在每周的某一天,清除掉主数据库上已经同步好的bin-logQ以保盘I间不被log占满?br />
 (tng) (tng) 为此Q我写了(jin)3个脚本,分别执行1、启动mysqlQ追logQ然后停止slaveQ?、导出全部数据库全部文g到文Ӟ3、删除主数据库的log

---------------------------------------------------------------------------------------
#!/bin/bash
#readMasterMysql.sh
CHECK_MYSQL=0
/home/mysql/bin/mysqld_safe &
until [ "$CHECK_MYSQL" = "1" ]
do
 (tng) sleep 10
 (tng) CHECK_MYSQL=`/home/mysql/bin/mysql -uroot -e"show slave status"|awk '{if($14==$21)print "1"}'|tail -n1`
done
/home/mysql/bin/mysql -uroot -e"slave stop"
/home/script/backupMysql.sh
/home/mysql/bin/mysqladmin shutdown
WEEK=`date "+%w"`
if [ $WEEK = "5" ]
then
 (tng) (tng) (tng) /home/script/purgeLog.sh
fi

------------------------------------------------------------------------------
#!/bin/bash
#purgeLog.sh
LOG_FILE=/home/mysql/data/master.info
DB_SERVER=`sed -n '4p' $LOG_FILE`
DB_USER=`sed -n '5p' $LOG_FILE`
DB_PASS=`sed -n '6p' $LOG_FILE`
DB_LOGFILE=`sed -n '2p' $LOG_FILE`
/home/mysql/bin/mysql -h$DB_SERVER -u$DB_USER -p"$DB_PASS" -e"purge master logs to '$DB_LOGFILE'"

------------------------------------------------------------------------------
#!/bin/bash
#backupMysql.sh
database=$1
table=$2
MYSQL_CLIENT="/home/mysql/bin/mysql -uroot --default-character-set=gbk"
MYSQL_DUMP="/home/mysql/bin/mysqldump -d -uroot --default-character-set=gbk"
OUTPUT_PATH=/date/backup
for databases in `$MYSQL_CLIENT -e "show databases"|grep -v Database`
do
if [ "$#" = "0" -o "$database" = "$databases" ] ; then
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) mkdir -p -m777 $OUTPUT_PATH/$databases/
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) $MYSQL_DUMP $databases > $OUTPUT_PATH/$databases/$databases.sql
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) for tables in `$MYSQL_CLIENT -e "show tables" $databases|grep -v Tables_in_`
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) do
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) if [ "$#" = "0" -o "$#" = "1" -o "$table" = "$tables" ] ; then
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) mv -f $OUTPUT_PATH/$databases/$tables $OUTPUT_PATH/$databases/$tables.old
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) $MYSQL_CLIENT -e "select * into outfile '$OUTPUT_PATH/$databases/$tables' from $tables" $databases
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) fi
 (tng) (tng) (tng) (tng) (tng) (tng) (tng) done
fi
done

无风之雨 2006-04-11 12:47 发表评论
]]>
如何让referer和user-agent同时为空时记录日?/title><link>http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html</link><dc:creator>无风之雨</dc:creator><author>无风之雨</author><pubDate>Tue, 11 Apr 2006 04:25:00 GMT</pubDate><guid>http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html</guid><wfw:comment>http://www.aygfsteel.com/ginew/comments/40434.html</wfw:comment><comments>http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ginew/comments/commentRss/40434.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ginew/services/trackbacks/40434.html</trackback:ping><description><![CDATA[一般情况下QReferer和User-Agent同时为空的时候,可以认ؓ(f)是其他网站在扚w采集本站数据Q我打算deny掉这U请求。不qapache文里面没有提到有两个环境变量的与操作。最后chinaunix上有大侠回答?jin)我的问题?x)<br /><br />SetEnv (tng) (tng) log_flag=1<br />SetEnvIf Referer !"^$" (tng) log_flag=0<br />SetEnvIf user-agent !"^$" log_flag=0<br />...<br /><br />看字面上Q就是如果用两个非的或来代替?br />q样Q只要两个条件有一个不满Q就log_flag׃(x)变掉Q只要它变掉?jin),p明不W合我屏蔽的规则?br />高手是高手Qؓ(f)什么非要苛求一定要有“与”呢Q两个“非”的“或”,不一栯到要求?<br /><br />学习(fn)?jin)?br /><img src ="http://www.aygfsteel.com/ginew/aggbug/40434.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ginew/" target="_blank">无风之雨</a> 2006-04-11 12:25 <a href="http://www.aygfsteel.com/ginew/archive/2006/04/11/40434.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle到mysql的迁U,函数部分http://www.aygfsteel.com/ginew/archive/2006/04/11/40429.html无风之雨无风之雨Tue, 11 Apr 2006 04:16:00 GMThttp://www.aygfsteel.com/ginew/archive/2006/04/11/40429.htmlhttp://www.aygfsteel.com/ginew/comments/40429.htmlhttp://www.aygfsteel.com/ginew/archive/2006/04/11/40429.html#Feedback0http://www.aygfsteel.com/ginew/comments/commentRss/40429.htmlhttp://www.aygfsteel.com/ginew/services/trackbacks/40429.htmlto_date(?, 'YYYY-MM-DD HH24:MI:SS')"
STR_TO_DATE('2003-15-10 00:00:00','%Y-%m-%d %H:%i:%s'); (tng) (tng) (tng) (tng) //格式不对Q会(x)q回NULL

to_char(create_time,'yyyy-MM-dd')
DATE_FORMAT(create_time,'%Y-%m-%d')

sysdate
now()或者CURRENT_TIMESTAMP (tng)//'1997-12-15 23:50:26',的时候,timestampcd可以指定default CURRENT_TIMESTAMP

sysdate - 7 (tng) (tng) //7天前
now()-INTERVAL 7 DAY (tng) (tng)

select * from (select .... where rownum<end) where rownum>start
limit [start,] length

substr(productInfor,1,20)
SUBSTRING('Quadratically',5,6) (tng) (tng) (tng) (tng) //SUBSTRING(str,pos,len)

instr(str,substr,pos,index)
instr(str,substr) 或?locate(substr,str,pos)
// 没有相对应的语法Q但一般情况,q个是和substrl合h用的?br />//如果是str="2005-10-01"取中间的10q样的需要,oracle是substr(str,instr(str,'-',1,1)+1,instr(str,'-',1,2)-instr(str,'-',1,1)-1)
那在mysql里面Q可以试试这样SUBSTRING_INDEX(SUBSTRING_INDEX(str,'-',2),'-',-1),意思就是取W二?之前的str后(2005-10Q,再取倒数W一?之后的内?/p>

oracle的nvlQss,ddQ函数在mysql中怎么实现Q?
{:(x)ifnull(ss,dd)



无风之雨 2006-04-11 12:16 发表评论
]]>
վ֩ģ壺 | | | ˳ƽ| | ɳ| Ϫ| | | | | | | ˱| ɽ| | ͤ| ƽ| | | | ̨| | | ν| ¡| | ۷| ˫| | | | | ɽ| | | ʹ| Ͽ| ƽ| | ͨɽ|