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

    php errore update che non trovo

    ragazzi ma voi trovate qualche errore in questa riga di codice?

    Codice PHP:
    $query "update PHPAUCTIONXL_auctions set current_bid=$next_bid, starts=$auctiondate,ends=$auctionends where id=\"$id\"";
            if (!
    mysql_query($query))
            {
                
    MySQLError($query);
                exit;
            } 
    non riesco a capire se mi sfugge qualcosa ma il problema che mi restituisce questo errore quando lo eseguo

    codice:
    update PHPAUCTIONXL_auctions set current_bid=01000, starts=2010-07-02 16:14:29,ends=2010-07-03 16:14:29 where id="e84a69c8db58fcfe7edc20912e738acb"
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '16:14:29,ends=2010-07-03 16:14:29 where id="e84a69c8db58fcfe7edc20912e738acb"' at line 1

  2. #2
    Utente di HTML.it
    Registrato dal
    Nov 2008
    Messaggi
    209
    Si, non hai racchiuso le stringhe tra virgolette (o apici) e quindi lo spazio in 2010-07-02 16:14:29 viene interpretato come interruzione

  3. #3
    quali apici scusami ma sono un principiante in php.
    Grazie per l'aiuto

  4. #4
    Utente di HTML.it
    Registrato dal
    Nov 2008
    Messaggi
    209
    Codice PHP:
    $query "update PHPAUCTIONXL_auctions set current_bid='$next_bid', starts='$auctiondate',ends='$auctionends' where id='$id'"

  5. #5
    grazie di cuore

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.