basicdb icon indicating copy to clipboard operation
basicdb copied to clipboard

Fatal error

Open edursun opened this issue 7 years ago • 2 comments

Merhaba, aşağıdaki kullanım ve aldığım hata mevcuttur.Çift where kullanıyorum, `ob_start();
require 'BasicDB.php'; $db = new BasicDB('localhost', 'pdo', 'root', '');

if (isset($_POST['giris'])) { $kadi=$_POST['kadi']; $sifre=md5($_POST['sifre']);

$query = $db->from('users')
        ->where('kadi', $kadi)
        ->where('sifre', $sifre)
        ->run();  

if ( $query ){ foreach ( $query as $row ){ print_r($row); } } } ` Fatal error: Call to a member function fetchAll() on boolean in D:\wamp64\www\pdo\BasicDB.php on line 242

Ayrıca ->where('kadi', $kadi, '=') ->where('sifre', $sifre, '=') bu şekilde de denedim sonuç yine aynı.

edursun avatar May 07 '17 07:05 edursun

Merhaba, düzenlemeyi yaptım yeni dosyayı kullanarak tekrar dener misiniz. kullanım tek eleman için first() metodunu hepsi için all() metodunu kullanın.

tayfunerbilen avatar May 30 '17 15:05 tayfunerbilen

Call to undefined method Erbilen\Database\BasicDB::all()

tanerincode avatar Jun 06 '17 07:06 tanerincode