Python论坛  - 讨论区

标题:[python-chinese] python连接mysql的问题

2008年01月28日 星期一 11:30

赵威 zhaowei在pythonid.com
星期一 一月 28 11:30:59 HKT 2008

realfun£¬ÄúºÃ£¡ 

¡¡¡¡Ã²ËÆÕâ¸öÒ²ÓÐÏÞÖÆ£¿

======== 2008-01-28 10:56:19 ÄúÔÚÀ´ÐÅÖÐдµÀ£º ========

ÎÒÊÔ¹ýÁË£¬ÔÚbluehost.comµÄ¿ØÖÆ̨ÉÏ£¬Òª°ÑĬÈÏÖµÉè³ÉCURRENT_TIMESTAMP²ÅÐÐ


ÔÚ08-1-28£¬Ð¡³¿ <lichengiggs在gmail.com> дµÀ£º
timestampµÄĬÈÏÖµÊDzåÈëÊý¾Ý¿âµÄʱ¼ä°É£¬²»ÓÃÖ¸¶¨¶¼¿ÉÒԵġ£

A TIMESTAMP column is useful for recording the date and time of an INSERT or UPDATE operation. By default, the first TIMESTAMP column in a table is automatically set to the date and time of the most recent operation if you do not assign it a value yourself. You can also set any TIMESTAMP column to the current date and time by assigning it a NULL value.




ÔÚ08-1-27£¬realfun <realfun在gmail.com> дµÀ£º
1. ÎÒÓõÄÊÇhttp://mysql-python.sourceforge.net/MySQLdb.html, ´ó¼Ò¶¼ÓÃÕâ¸öÂð£¿
2. ÎÒ¿´mysqlÊéÉÏÌᵽĬÈÏÖµºÍauto_incrementµÄÖµ£¬µ«ÊÇÎÒÓÃmysqldbµÄexecuteÈ¥insertÒ»ÐеÄʱºò£¬×ܳö´í£¬ËùÒÔÓÐÁ½¸öСÎÊÌ⣺
²»ÖªµÀÔõô²ÅÄÜ´«¸öNULL¸ømysql£¿
Ôõô²ÅÄÜÈÃtimestampµÄÊôÐÔ×Ô¶¯´æ´¢Îªµ±Ç°Ê±¼ä?ÎÒÊÔ¹ý"NOW()", "NULL", 0£¬ ¶¼²»ÐС£
mysql-python×Ô´øµÄÎĵµÌ«¼òÂÔÁË£¬É¶Ò²Ã»²éµ½

ÓÐûÓÐÊìϤµÄ°ï°ïæ¹þ¡£

-- 
http://www.2maomao.com/blog 

_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese



_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese




-- 
http://www.2maomao.com/blog 

= = = = = = = = = = = = = = = = = = = = = = 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÕÔÍþ
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡zhaowei在pythonid.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2008-01-28
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080128/25d58012/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月28日 星期一 12:47

realfun realfun在gmail.com
星期一 一月 28 12:47:51 HKT 2008

²»ÖªµÀÄã˵µÄ"Õâ¸öÒ²ÓÐÏÞÖÆ"Ö¸µÄÊÇʲô¡£

ÔÚ08-1-28£¬ÕÔÍþ <zhaowei在pythonid.com> дµÀ£º
>
> realfun£¬ÄúºÃ£¡
>  òËÆÕâ¸öÒ²ÓÐÏÞÖÆ£¿
>
> ======== 2008-01-28 10:56:19 ÄúÔÚÀ´ÐÅÖÐдµÀ£º ========
>
>
> ÎÒÊÔ¹ýÁË£¬ÔÚbluehost.comµÄ¿ØÖÆ̨ÉÏ£¬Òª°ÑĬÈÏÖµÉè³ÉCURRENT_TIMESTAMP²ÅÐÐ
>
> ÔÚ08-1-28£¬Ð¡³¿ <lichengiggs在gmail.com> дµÀ£º
> >
> > timestampµÄĬÈÏÖµÊDzåÈëÊý¾Ý¿âµÄʱ¼ä°É£¬²»ÓÃÖ¸¶¨¶¼¿ÉÒԵġ£
> >
> > A TIMESTAMP column is useful for recording the date and time of an
> > INSERT or UPDATE operation. By default, the first TIMESTAMP column in a
> > table is automatically set to the date and time of the most recent operation
> > if you do not assign it a value yourself. You can also set any TIMESTAMPcolumn to the current date and time by assigning it a
> > NULL value.
> >
> >
> >
> > ÔÚ08-1-27£¬realfun <realfun在gmail.com> дµÀ£º
> > >
> > > 1. ÎÒÓõÄÊÇhttp://mysql-python.sourceforge.net/MySQLdb.html, ´ó¼Ò¶¼ÓÃÕâ¸öÂð£¿
> > > 2.
> > > ÎÒ¿´mysqlÊéÉÏÌᵽĬÈÏÖµºÍauto_incrementµÄÖµ£¬µ«ÊÇÎÒÓÃmysqldbµÄexecuteÈ¥insertÒ»ÐеÄʱºò£¬×ܳö´í£¬ËùÒÔÓÐÁ½¸öСÎÊÌ⣺
> > > ²»ÖªµÀÔõô²ÅÄÜ´«¸öNULL¸ømysql£¿
> > > Ôõô²ÅÄÜÈÃtimestampµÄÊôÐÔ×Ô¶¯´æ´¢Îªµ±Ç°Ê±¼ä?ÎÒÊÔ¹ý"NOW()", "NULL", 0£¬ ¶¼²»ÐС£
> > > mysql-python×Ô´øµÄÎĵµÌ«¼òÂÔÁË£¬É¶Ò²Ã»²éµ½
> > >
> > > ÓÐûÓÐÊìϤµÄ°ï°ïæ¹þ¡£
> > >
> > > --
> > > http://www.2maomao.com/blog
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > > python-chinese-request在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
>
> --
> http://www.2maomao.com/blog
>
>  = = = = = = = = = = = = = = = = = = = = = =
>
> ÖÂ
> Àñ£¡
>
>  ÕÔÍþ
>  zhaowei在pythonid.com
>  2008-01-28
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
http://www.2maomao.com/blog
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080128/5dfb9d98/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号