星期四, 11月 20, 2008

[CSS] a:link,a:visited,a:hover,a:active order


a:link {color: #FF0000}     /* unvisited link */
a:visited {color: #00FF00}  /* visited link */
a:hover {color: #FF00FF}   /* mouse over link */
a:active {color: #0000FF}   /* selected link */


Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!

Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!

星期三, 10月 29, 2008

PHP Shell Script

We can use php as a shell script by adding the line below at the top of the php script file.

#!/usr/local/bin/php -Cq

C means do not change working directory to that of the script.
q means do not send HTTP header.

There is a reference manual "Using PHP from the command line" in php.net

星期四, 10月 16, 2008

PHP中include和require的差異

PHP中include和require的差異在於找不到引入的檔案時,require會停止解譯php程式,include則不會。

星期二, 5月 06, 2008

在Oracle中找出重複的紀錄的方法

在Oracle中找出重複的紀錄的方法
SELECT aid FROM atable GROUP BY aid HAVING COUNT(*) >1;

刪除重複的記錄
DELETE FROM atable a where a.ROWID!=(SELECT MAX(ROWID) FROM atable b WHERE a.aid=b.aid;