Google app engine - Issue with class to wrap database access PHP GAE

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

   This question already has an answer here:
    * /questions/17498216/can-i-mix-mysql-apis-in-php /questions/17498216/can-i-mix-mysql-apis-in-php 5 answers

Answers

your DbConnect::connect() function doesn t return the pdo object created. So basically when you do:

$this->conn = $db->connect();

you re doing:

$this->conn = null;

To fix the issue add a return statement at the end of your connect function:

return $db;

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/36627412/issue-with-class-to-wrap-database-access-php-gae

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils