Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MySQL] function.mysql-result - błąd
kacpereczek
post
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 15.08.2008
Skąd: Tetaumatawhakatangihangak
oauaotamateaurehaeaturipu
kapihimaungahoronukupokai
whenuaakitanarahu

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


Witam, mam problem z moim kodem i nie wiem co jest źle.

To jest błąd:

  1. Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in subscribe.php on line 54


Kod:

  1. if($mail == NULL){
  2.  
  3. }
  4. else{
  5. $token = sha1(time());
  6. $result1 = @mysql_query("INSERT INTO newsletter (Address,Token) VALUES (\"".$mail."\", \"".$token."\") ");
  7. if ($result1) {
  8. sendmail($mail);
  9. }
  10. else{ /*This else */
  11. $result2 = mysql_query("SELECT Confirmed FROM newsletter where Address = \"".$mail."\" ");
  12. $confirm = mysql_result($result2,0); /* tu jest błąd */
  13. if($confirm == "y"){
  14. }
  15. else if($confirm == "n"){
  16. }
  17. }
  18. }
  19. ?>


Proszę o pomoc

Ten post edytował kacpereczek 25.07.2014, 21:42:48
Go to the top of the page
+Quote Post

Posty w temacie


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: 20.08.2025 - 12:40