ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.29k stars 1.35k forks source link

Fatal error: Uncaught Error: Call to undefined method mysqli::GetOne() in #879

Open Gopi2626 opened 4 years ago

Gopi2626 commented 4 years ago

$cn1 = mysqli_connect('localhost', 'root','', 'demo'); if($cn1 === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } else{

echo "connection success";

}

$row = $cn1->GetOne("SELECT username FROM admin ");

its my code, please help me how to connect adodb

peixespnsc commented 4 years ago

Try with "getOne" $row = $cn1->getOne("SELECT username FROM admin ");

Gopi2626 commented 4 years ago

Try with "getOne" $row = $cn1->getOne("SELECT username FROM admin ");

I have tried already this type error is coming

Fatal error: Uncaught Error: Call to undefined method mysqli::getOne() in $cn1->getOne("SELECT username FROM admin ");

peixespnsc commented 4 years ago

Try this

require_once 'MysqliDb/MysqliDb.php'; $cn1 = new MysqliDb('localhost', 'root','', 'demo'); if($cn1 === false) { die("ERROR: Could not connect. " . mysqli_connect_error()); } else { echo "connection success"; } $row = $cn1->GetOne('admin', 'username');

peixespnsc commented 4 years ago

You did it?