2009年2月5日

摘要: Ubuntu已经安装了好久了, 一直没有整理过笔记, 当初因为不熟悉所以装的时候痛苦不勘, 现在已经过去了倒没有太多的感觉了, 当时的情景现在想起来还是觉得蛮搞笑的. 装Ubuntu一定要刻盘, 当时因为没有刻录光驱才想着用硬盘安装的方法来装, 在网上找了一堆资料, 试了整一天都没成功, 第2天实在没办法就去刻了. 装的时候还是装不起来, 一问才知道要用镜像刻录, 实在是自己无知. 镜像刻... 阅读全文
posted @ 2009-02-05 15:41 mustardpeanut 阅读(295) 评论(0) 推荐(0)
 
摘要: 前阵子参加一个面试的时候被问了一个问题, mysql数据库里如何统计一年中每个月的多个指标的总访问量. 我一听觉得不是很简单吗? 那人给我看了一个简单的数据表结构, 三个字段, 主键id, 访问量数num, 访问时间vtime. 然后开始写sql语句, 想想以月来计算所有的访问量就可以了. 写了一半的时候我问那个人vtime是什么类型的,他说是timestamp, 然后我就拼命地想怎么取出他... 阅读全文
posted @ 2009-02-05 15:38 mustardpeanut 阅读(238) 评论(0) 推荐(0)
 
摘要: 以前从来没注意过echo和print还有区别,今天查了下原文在http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 上 1. Speed. There is a difference between the two, but speed-wise it should be irrelevant which one you use... 阅读全文
posted @ 2009-02-05 15:36 mustardpeanut 阅读(302) 评论(0) 推荐(1)
 
摘要: 3. Zend_Db_Select using query to fetch rowset. // Create the Zend_Db_Select object $select = $db->select(); //if inside the table class $db is $this->_db; $this->_db is setted in the Initializer.php ... 阅读全文
posted @ 2009-02-05 15:07 mustardpeanut 阅读(388) 评论(0) 推荐(0)
 
摘要: 1. Before use database we must configurate database information first. We can use config.ini file containing the DB info. And use function Zend_Config_Ini() to get the file content. config.ini file: ... 阅读全文
posted @ 2009-02-05 11:56 mustardpeanut 阅读(500) 评论(0) 推荐(0)