utilizzo il framework pear
ho il seguente codice:
dove xxx è la password,root è l'user e nestedset è il nome del db.codice:if (!isset($cfg['db']['dsn'])) { $cfg['db']['dsn'] = 'mysql://root:xxx@localhost/nestedset'; } $this->db = DB::connect($dsn, true); if (DB::isError($this->db)) { return $this->raiseError ('DB connection failed', 0); } else { $this->db->setFetchMode(DB_FETCHMODE_ASSOC); return true; }
Dove sbaglio?
grazie.