Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    Warning mysql_fetch_array

    ciao

    Codice PHP:
    $query "SELECT * FROM pgu WHERE Polis = '$row[Polis]'";
    $result mysql_query($query$db); 
    while(
    $wer mysql_fetch_array($result)) {
    //
    $_POST['Testo'] = &htmlspecialchars$_POST['Testo'] );
    $_POST['Testo'] = nl2br$_POST['Testo'] );
    //
    $query "INSERT INTO posta (Nick,Testo,Mittente,Polis,Data) VALUES ( '$wer[Nick]', '[i]Messaggio alla Polis:[/i]

    $_POST[Testo]', '$row[Nick]', '$row[Polis]', NOW())";
    $result mysql_query($query$db);

    mi da il warning: mysql_fetch_array alla terza riga. Ma non c'è nessun errore tra i nomi dei campi e della tabella!!

    grazie
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  2. #2
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    usa mysql_error quando esegui la query:
    codice:
    $result = mysql_query($query, $db) or die(mysql_error());
    think simple think ringo

  3. #3
    mah..non cambia nulla..

    codice:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ....
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  4. #4
    L'errore e' prima.

    Fai la modifica a mysql_query come suggerito da marketto.

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  5. #5
    mmm tu lo devi aggiungere al primo mysql_query


    mysql_fetch_* e tutti gli altri comandi che richiedono una risorsa query restituiscono quell'errore se la risorsa query non + valida...è questo può verificarsi solo se:
    - la query è errata (e restituisce true se riesce e false se fallisce)
    - la query è di tipo update, insert, delete (in questi casi restituisce true o false)

    mi sembra corretta anche a me...cmq...dovresti verificare che i campi si chiamano esattamente cosi...in ogni cosa metti il
    or die(mysql_error()); nel primo mysql_query

  6. #6
    l'ho fatta..

    Codice PHP:
    $query "SELECT * FROM pgu WHERE Polis='$row[Polis]'"
    $result mysql_query($query$db) or die(mysql_error()); 
    while(
    $wer mysql_fetch_array($result)) { 
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  7. #7
    [supersaibal]Originariamente inviato da Manuelandro
    l'ho fatta..
    [/supersaibal]
    ???? dura??? :master: (l'errore???)

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  8. #8
    problema risolto...che sciocco!!

    grazie lo stesso!!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  9. #9
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    [supersaibal]Originariamente inviato da Manuelandro
    problema risolto...che sciocco!!

    grazie lo stesso!! [/supersaibal]
    qual'era l'errore??
    think simple think ringo

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.