PHP Error
Undefined index: id
/var/www/yii/framework/web/CSqlDataProvider.php(116)
104
105 return $command->queryAll();
106 }
107
108 /**
109 * Fetches the data item keys from the persistent data storage.
110 * @return array list of data item keys.
111 */
112 protected function fetchKeys()
113 {
114 $keys=array();
115 foreach($this->getData() as $i=>$data)
116 $keys[$i]=$data[$this->keyField];
117 return $keys;
118 }
119
120 /**
121 * Calculates the total number of data items.
122 * This method is invoked when {@link getTotalItemCount()} is invoked
123 * and {@link totalItemCount} is not set previously.
124 * The default implementation simply returns 0.
125 * You may override this method to return accurate total number of data items.
126 * @return integer the total number of data items.
127 */
128 protected function calculateTotalItemCount()
$sql ='SELECT * FROM tb_user u LEFT JOIN (tb_image i,tb_comment c) ON (u.idUser = i.idUser AND i.idImage = c.idImage) WHERE u.idUser = 1 AND c.idWriter !=1';