Code ในส่วของ girdview
29 มิ.ย. 2557
28 มิ.ย. 2557
Apacher Error : could not reliably determine
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
host ตัวอย่าง data.udonpit.ac.th
แก้ไขไฟล์ /etc/hosts
Open mod_rewrite บน CentOS
mod_rewrite
mod_rewrite is an Apache module used to manipulate URL's and is compiled into the base Apache HTTP Server in CentOS. See the mod_rewrite documenation for more information.
30 พ.ค. 2557
การหาผลรวมของ Column ใน CGridView
การหาผลรวมของ Column ใน CGridView
public function getSearchCriteria()
{
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('name',$this->name);
// ... more search conditions
return $criteria;
}
public function search()
{
return new CActiveDataProvider(get_class($this), array(
'criteria'=>$this->getSearchCriteria(),
));
}
public function totals()
{
$criteria=$this->getSearchCriteria();
$criteria->select='SUM(somecolumn)';
return $this->commandBuilder->createFindCommand($this->getTableSchema(),$criteria)->queryScalar();
}
17 มี.ค. 2557
7 Reasons Why You Will Never Do Anything Amazing With Your Life
7 Reasons Why You Will Never Do Anything Amazing With Your Life
A unique perspective on what it takes to succeed.
Yeah that’s right; you heard me… I’m talking to you… I’m calling you out.
25 ก.พ. 2557
5 เรื่องที่คนรวยคิดไม่เหมือนกับคนทั่วไป
มาดูกันว่า 5 เรื่องที่คนรวยคิดไม่เหมือนกับคนทั่วไป นั้นมีอะไรกันบ้าง
1. คนทั่วไปเน้นการออม คนรวยเน้นสร้างรายได้ -ในปี 2012 คนอเมริกันโดยเฉลี่ยมีรายได้ปีละ $38,000 ถ้าออมได้ 10% สิ้นปีเราก็จะมีเงินเหลือ $3,800 แต่เราจะไม่รวยขึ้นจริง ๆ จัง ๆ ขึ้นมาจากการทำแบบนั้น (เราต้องหารายได้ให้มากขึ้น) ... ความจริงแล้วคนรวยก็ออม แต่เขาเน้นที่การสร้างรายได้ให้เพิ่มขึ้นก่อน ซึ่งสัดส่วนของเงินออมจะสูงขึ้นมาก (โดยเฉพาะถ้าใช้จ่ายเพิ่มขึ้นเป็นสัดส่วนที่น้อยลง)
1. คนทั่วไปเน้นการออม คนรวยเน้นสร้างรายได้ -ในปี 2012 คนอเมริกันโดยเฉลี่ยมีรายได้ปีละ $38,000 ถ้าออมได้ 10% สิ้นปีเราก็จะมีเงินเหลือ $3,800 แต่เราจะไม่รวยขึ้นจริง ๆ จัง ๆ ขึ้นมาจากการทำแบบนั้น (เราต้องหารายได้ให้มากขึ้น) ... ความจริงแล้วคนรวยก็ออม แต่เขาเน้นที่การสร้างรายได้ให้เพิ่มขึ้นก่อน ซึ่งสัดส่วนของเงินออมจะสูงขึ้นมาก (โดยเฉพาะถ้าใช้จ่ายเพิ่มขึ้นเป็นสัดส่วนที่น้อยลง)
สมัครสมาชิก:
บทความ (Atom)