Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z wynikami
pilat
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 6.01.2006

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


Witam.
Mam problem z wyświetlaniem wyników.

Oto błąd:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\usr\krasnal\www\shop\browse_prints.php on line 25

A to mój skrypt:

  1. <?php
  2.  
  3. $page_title = 'Przeglądanie odbitek';
  4. include_once ('includes/header.html');
  5.  
  6. require_once ('mysql_connect.php');
  7.  
  8. if (isset($_GET['aid'])) {
  9. $query = "SELECT * FROM sklep, prints ASC";
  10. }
  11.  
  12. echo '<table border="1" width="100%" cellspacing="3" cellpadding="3" algin="center">
  13. <tr>
  14. <td algin="left" width="5%">Lp.</b></td>
  15. <td algin="left" width="20%">Nr. katalogowy</b></td>
  16. <td algin="left" width="20%">Produkt</b></td>
  17. <td algin="left" width="5%">Ilość</b></td>
  18. <td algin="left" width="20%">Cena (netto)</b></td>
  19. <td algin="left" width="20%">Wartość (netto)</b></td>
  20. <td algin="left" width="10%">VAT</b></td>
  21. <td algin="left" width="20%">Wartość (brutto)</b></td>
  22. </tr>';
  23.  
  24. $result = mysql_query ($query);
  25. while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
  26. echo "<tr>
  27. <td algin="left">{$row['print_id']}</td>
  28. <td algin="left">{$row['nr_k']}</td>
  29. <td algin="left">{$row['p_pr_id']}</td>
  30. <td algin="left">{$row['ilosc']}</td>
  31. <td algin="right">{$row['p_price_n']} zł</td>
  32. <td algin="right">{$row['p_war_n']} zł</td>
  33. <td algin="right">{$row['p_vat']} zł</td>
  34. <td algin="right">{$row['p_war_b']} zł</td>
  35.  
  36. </tr>n"; 
  37.  
  38. }
  39. echo '<table>' ;
  40. include_once ('includes/footer.html');
  41. ?>


Co może być tego przyczyną?
Go to the top of the page
+Quote Post

Posty w temacie
- pilat   Problem z wynikami   6.01.2006, 19:17:31
- - intol   if (isset($_GET['aid'])) {} jeżeli a...   6.01.2006, 21:03:01
- - tiraeth   [PHP] pobierz, plaintext <?php $page_title...   6.01.2006, 21:31:20
- - pilat   Dzięki za pomoc.   7.01.2006, 07:32:32


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: 22.08.2025 - 08:16