Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [sql] zapytanie
Raffal
post
Post #1





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 19.06.2006

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


nie moge sobie poradzic ze zlozeniem zapytania do pobierania danych zaleznych (where) od danych zawartych w innej tabeli pobralem obydwie i zlozylem tak ale cos jest nie tak


  1. $id_koment=mysql_query('select * from komentarze order by data_koment where id_news='".$w[0]") ;




Parse error: syntax error, unexpected '"' in
?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Raffal
post
Post #2





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 19.06.2006

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


a jezeli chcialbym zeby otwieral sie tylko jeden wskazany news to musze zamienic pierwsze zapytanie

na

  1. <?php
  2. $id=mysql_query('select * from news where id=$nr') ;
  3. ?>


tak zmienilem dodalem tylko testowo
na gorze zmiena $nr=1 i wyskoczyl mi taki blad


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/accounts_r/raffal/public_html/php/system_news/load_news.php on line 6

Ten post edytował Raffal 18.07.2007, 17:10:59
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: 12.10.2025 - 01:28