Error In Pagination (Sql Server 2008)

Hello all,

i have problem in pagination at gridview.

i got this message when click page link:

this is php code:




$select = "select *	";

	

$from = " from	QWORKINGORDER ";


$order = "	order by QWORKINGORDER.StyleID"; 


$count = app()->db->createCommand('select COUNT(*) '. $from .'')->queryScalar();


$dprov = new CSqlDataProvider($sql,array(

	'totalItemCount'=>$count,

	'keyField'=>'customer_id',

	'pagination'=>array('pageSize'=>20),

	)

);