PDO.php

hi anybody can give solution for

include(PDO.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

why you need to include it?

I dont think yii has pdo.php file

When I Have up my website then occur such error!!!

Yii dont have PDO.php file, you trying to include it somewhere ?

no, When I browse my web site then occur this error

here is my code

/////////////////////////////

$connection=Yii::app()->db; // assuming you have configured a "db" connection

// If not, you may explicitly create a connection:

// $connection=new CDbConnection($dsn,$username,$password);

$sql=“SELECT concat( tendertypeid ,’(’ ,count(*),’)’) as tendertype,tendertypeid FROM tbl_bdtender_tender group by tendertypeid”;

$command=$connection->createCommand($sql);

$dataReader=$command->query();

// calling read() repeatedly until it returns false

echo "<table border=‘1’>

<tr>

</tr>";

echo "<tr>";

$res=0;

while(($row=$dataReader->read())!==false)

    {

$res++;

echo "<td>";

echo CHtml::link(CHtml::encode($row[‘tendertype’]), array(‘view’, ‘id’=>$row[‘tendertypeid’]));

echo "</td>";

if($res==2)

{

 echo &quot;&lt;tr&gt;&quot;;


 &#036;res=0;

}

}

echo "</table>";

?>

Did you check the Yii requirements ?

http://www.yiiframework.com/doc/guide/1.1/en/quickstart.installation#requirements

This is not yii code!

class PDO comes from PDO native extension. You do not have this extension loaded so php can’t see PDO class definition and autoloader looks for PDO.php file.

Anyway - you need to enable PDO extension for php (extension=pdo.so in php.ini or recompile php with PDO support)