Fatal error: Call to a member function rowCount() on a non-object in C:\Inetpub\vhosts\palresidence.com\httpdocs\reside nce.php on line 93
$dsn = 'mysql:host=localhost;dbname=****;charset=utf8';
$user = '****';
$password = '****';
try {
$db = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
echo 'Hata Olustu ! <br> <br> Sebebi : <br> <br> ' . $e->getMessage();
}
$db->exec("SET NAMES 'utf8'; SET CHARSET 'utf8'");hata aldıgım satırın kodları asagıdadır bu butun sayfalarda hata farklı satırlarda ornek olarak bu satırı koyuyorum
$select = $db->query("SELECT * FROM araclar where durum='2' order by sira asc",PDO::FETCH_ASSOC);
if ($select->rowCount()) {
foreach ($select as $sonuc) {