Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z metodą __construct
rychu123
post
Post #1





Grupa: Zarejestrowani
Postów: 194
Pomógł: 1
Dołączył: 18.09.2008

Ostrzeżenie: (0%)
-----


Witam, mam problem z __construct zmienna $conn nie zwraca mi połaczenia do bazy

  1. class ModulDB extends ModulUser
  2. {
  3.  
  4. static private $conn;
  5.  
  6. public function __construct()
  7. {
  8. self::$conn = parent::getConnectDB($_SESSION['host'], $_SESSION['login'], $_SESSION['pass']);
  9. }
  10.  
  11. static public function showDatabases()
  12. {
  13.  
  14. $db_list = mysql_list_dbs(self::$conn);
  15.  
  16. while ($row = mysql_fetch_object($db_list))
  17. {
  18. echo '<li><a href="' . base64_encode($row->Database) . '">' . $row->Database .
  19. '</a></li>';
  20. }
  21. }
  22. }


--------------------
Zapraszam darmowy erds dla twojego radia
www.erds.pl
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 01:07