sql server , mysql , sqlite 的时间字段的默认值

在sql server里面字段类型是 datetime , 默认值可以用 getdate()   ,  或者 CURRENT_TIMESTAMP.  注意不能给timestamp类型的字段设置default 值、

mysql 里面是  只能给timestamp类型的字段设置default值.CURRENT_TIMESTAMP。  注意datatime 类型的字段不能设置成 CURRENT_TIMESTAMP.    (不同于php的时间戳)
 

这样插入的时候就可以得到当前的时间。sqlite  下面,请看官方文档
http://www.sqlite.org/lang_createtable.html
The DEFAULT constraint specifies a default value to use when doing an INSERT. The value may be NULL, a string constant or a number. Starting with version 3.1.0, the default value may also be one of the special case-independant keywords CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP. If the value is NULL, a string constant or number, it is literally inserted into the column whenever an INSERT statement that does not specify a value for the column is executed. If the value is CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP, then the current UTC date and/or time is inserted into the columns. For CURRENT_TIME, the format is HH:MM:SS. For CURRENT_DATE, YYYY-MM-DD. The format for CURRENT_TIMESTAMP is "YYYY-MM-DD HH:MM:SS".

腾讯的财付通简直就是丢脸!

我用的windows 2003 系统,ie安全级别比较高 ,结果才发现了财付通的菜鸟做法!!
用firefox打开居然显示源文件
看看财付通首页返回的http头发现

HTTP/1.x 200 OK
Date: Wed, 09 Jul 2008 08:26:30 GMT
Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.8d DAV/2
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain

apache 配置文件缺少这句哦。
AddType text/html .shtml

利用System.Reflection实现php下的可变变量(Variable variables)

<?php
$a 
'hello';
$$a 'world';
echo "$a ${$a}";
echo "$a $hello";
?>

    public static string mystr = "this is mystr";

    public static void Main()
    {

        string readstr = Console.ReadLine();
        Type type = typeof(SamplesEncoding);
        FieldInfo fi = type.GetField(readstr);
        if (fi != null)
            Console.WriteLine(fi.GetValue(null));
        else
            Console.WriteLine("donnot had this property: " + readstr);
        Console.Read();

php的报表(图表)工具

是否觉得用php的gd画图表很困难。
推荐个好东西
http://code.google.com/apis/chart/
说明文件的中文翻译 :http://labs.cloudream.name/google/chart/api.html

自然比不上.net 的水晶报表了。但是也比自己画图表方便多了!!!http://www.advsofteng.com/
http://www.aditus.nu/jpgraph/index.php
http://sourceforge.net/projects/phplot/

http://www.infosoftglobal.com/FusionCharts/
http://www.gerd-tentler.de/tools/phpgraphs/