Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MYSQL] pobieranie i wyswietlanie danych z tabeli
yeszie
post
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 14.09.2008

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


Strasznie proste - nie wiem czemu nie dziala - probowalem kilka razy na kilka sposobow

  1. <?php
  2. $sql=&#092;"select * from users\";
  3. $result=mysql_query($sql);
  4. $row = mysql_fetch_array($result);
  5. print(&#092;"$row\");
  6. ?>


mam komunikat bledu
Parse error: syntax error, unexpected T_VARIABLE in /sciezka/main.php on line 24

linijka 24 to ta print("$row");

Ten post edytował yeszie 15.09.2008, 20:22:48
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
yeszie
post
Post #2





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 14.09.2008

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


Poprawiłem, niestety kilka bledow ciagle mam.

  1. <?php
  2. $sql="select * from users";
  3. $result=mysql_query($sql);
  4.  
  5. while ($row = mysql_fetch_assoc($result))
  6.         {
  7.    print_r("$row");
  8.         }
  9. ?>


Warning: mysql_query() [function.mysql-query]: Access denied for user 'root'@'localhost' (using password: NO) in /_Rejestr/main.php on line 22

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /_Rejestr/main.php on line 22

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /_Rejestr/main.php on line 24
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: 4.10.2025 - 00:47