Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php\mysql] Błąd - nieznana kolumna w 'nazwa' where clause
-Gość-
post
Post #1





Goście







  1. <?php
  2. $con_kat = mysql_connect(_HOST, _login, _passwd);
  3. if($_GET["menu"] == "sklep_uzupelnienia")
  4. {
  5.  
  6. <table style="width: 100%; font-weight: 400; font-size: 11px; color: #EBEDF3;">
  7. <tr style="background= white">
  8. <td></td>
  9. <td></td>
  10. <td></td>
  11. <td></td>
  12. </tr>
  13. <tr
  14. <tr style="background= #515864">
  15. <td>id_produktu</td>
  16. <td>klient</td>
  17. <td>max_stan</td>
  18. <td>min_stan</td>
  19. </tr>
  20. ";
  21. $pyt= "SELECT * FROM "._dbOrders. "."._dbtRegularOrders. " WHERE login = ".$_SESSION["login"];
  22. $rezult = mysql_query($pyt) or die(mysql_error());
  23. echo"$pyt ==> $rezult";
  24. if(mysql_num_rows($rezult)==0)
  25. {
  26. echo"nic nie ma";
  27. }
  28. else
  29. {
  30. while($rekord = mysql_fetch_array($rezult))
  31. {
  32. echo "
  33. <tr style="background= #515864">
  34. <td>".$rekord["id_produktu"]."</td>
  35. <td>".$rekord["login"]."</td>
  36. <td>".$rekord["max_stan"]."</td>
  37. <td>".$rekord["min_stan"]."</td>
  38. </tr>
  39. ";
  40. }
  41. }
  42. echo"
  43. </table>
  44. ";
  45.  
  46. }
  47. ?>

Mam problem - wyświetla mi się błąd: Nieznana kolumna 'niki' w where clause.
Chodzi tu o linijke 22 i 23 , co tam jest źle? Bo nie mogę doszukać się żadnego błedu.
Czemu kolumna 'niki' (taka jest wartość session[login] ) skoro ja szukam rekordów a nie kolumny.

Pozdrawiam i z góry dzieki za pomoc
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: 15.09.2025 - 16:30