Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 15

Discussione: [MySQL]Sintax: UPDATE

  1. #1

    [MySQL]Sintax: UPDATE

    UPDATE utenti,utenti_online SET ecc.

    Mi da errore "near utenti_online"...

    versione mysql 3.23.58 =_=
    prima non mi dava errore con mysql4
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  2. #2
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    867
    Codice PHP:
    update tabella set attributo='valore'attributo2='valore2' 
    tu hai messo 2 valori dove ci va il nome della tabella....

    Ciao Ciao

  3. #3
    ma se devo utilizzare dei dati che ho nella tabella utenti_online...perché con mysql4 nn dava errore?

    UPDATE utenti, utenti_online SET sold=sold-$aprice WHERE utenti_online.id_utente = idutente AND utenti_online.ip = '$ip'
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  4. #4
    da mysql.net:

    UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
    SET col_name1=expr1 [, col_name2=expr2 ...]
    [WHERE where_definition]
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  5. #5
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    867
    Si la conosco la sintassi..... ma il tuo post non era molto chiaro..... pensavo ti riferissi ad una query che utilizza una sola tabella e ti fossi confuso sulla sintassi.....

    Come faccio io a sapere come e' fatto il database ?????

    Sicuro che esistano entrambe le tabelle che hai richiamato nella query?

  6. #6
    Scusami, non era per trattarti male^___^
    esistono entrambe, abbiamo cambiato server ed esportato con un dump tutti i dati.


    www.lenar.it
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  7. #7
    [supersaibal]Originariamente inviato da Vre
    da mysql.net:

    UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
    SET col_name1=expr1 [, col_name2=expr2 ...]
    [WHERE where_definition] [/supersaibal]
    sempre nello stesso manuale...

    Starting with MySQL 4.0.4, you can also perform UPDATE operations that cover multiple tables:

    UPDATE items,month SET items.price=month.price
    WHERE items.id=month.id;


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

  8. #8
    Dovrei rimodificare tutte le query con UPDATE--- VVoVe:
    una soluzione?
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  9. #9
    [supersaibal]Originariamente inviato da Vre
    Dovrei rimodificare tutte le query con UPDATE--- VVoVe:
    una soluzione? [/supersaibal]
    E' scritta nel mio post precedente... cambia la versione di mysql oppure fai tutte le query che servono..


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

  10. #10
    cambia la versione di mysql sarebbe ovviamente la cosa migliore ma non credo che l'hoster possa accettare...
    dovrei fare prima una select per selezionare i campi e poi riutilizzarli per l'update succesivo---

    register

    p.s.ma possono giustificare con il fatto di voler mantenere una certa sicurezza il non aggiornate a mysql4?
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

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.