Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> klay i obiekty :/
-Gość_kafar-
post
Post #1





Goście







Zrobiłem coś takiego korzystając z manuala. Co jest nie tak.
  1. <?php
  2. class connect_db {
  3. var $user;
  4. var $host;
  5. var $pw;
  6. var $dbname;
  7. var $sql_query;
  8. function connect_db_mysql (){
  9.  $this -> user = root;
  10.  $this -> host = localhost;
  11.  $this -> pw = krasnal;
  12.  $this -> dbname = php;
  13.  $db = mysql_connect(&#092;"$this -> host\", \"$this -> root\", $this -> pw);
  14.  mysql_select_db(&#092;"$this -> dbname\", $db);
  15.  }
  16. function sql_query($sql_query){
  17. connect_db_mysql ();
  18. mysql_query($sql_query);
  19. }
  20. }
  21.  
  22. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 23.08.2025 - 22:26