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

    eliminazione particolare

    dovrei eliminare tutti i record registrati prima di un record ke carico.

    Codice PHP:
    $queryd "DELETE FROM note WHERE (('giorno' < '$row['giorno']') && ('mese' <= '$row['mese']') && ('anno' <= '$row['anno']'))";

    if (
    mysql_query($queryd$db) or die(mysql_error())); 
    ho fatto qsta query..ma mi dà

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\programmi\easyphp1-7\www\negozio\leggiprome.php on line 39
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  2. #2
    mi scuso se ho creato un nuovo post...kredevo di aver fatto rispondi e invece...sarà l'ora tarda??
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  3. #3
    ho fatto csì e l'errore della query nn me lo dà..però nn mi elimina niente!

    Codice PHP:
    $g=$row['giorno'];
    $m=$row['mese'];
    $a=$row['anno'];
    $queryd "DELETE FROM note WHERE ((giorno < '$g') && ('mese' <= '$m') && ('anno' <= '$a'))"
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  4. #4
    se stampo la query mi esce bene..

    DELETE FROM note WHERE ((giorno < '12') && ('mese' <= '06') && ('anno' <= '04'))

    eppure nella tabelle ho due record con giorno < 12, mese <= 06 e anno <=04 !

    sn campi di testo...è per quello??
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  5. #5
    Originariamente inviato da alex86
    ho fatto csì e l'errore della query nn me lo dà..però nn mi elimina niente!

    Codice PHP:
    $g=$row['giorno'];
    $m=$row['mese'];
    $a=$row['anno'];
    $queryd "DELETE FROM note WHERE ((giorno < '$g') && ('mese' <= '$m') && ('anno' <= '$a'))"
    devi avere la apicillomatosi....

    "NON ci vogliono gli apici nei nomi dei campi"

    per il resto della query non mi pronuncio.... mi rifiuto di usare le date su db a quel modo.


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

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.