Re: The usual problem

From: Date: Mon, 03 May 2004 05:04:09 +0000
Subject: Re: The usual problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-34256@lists.php.net to get a copy of this message
If your ID is an autoincremented field, try not including it in your insert statement. I.E.: $sql = "INSERT INTO underskrifter (type, navn, epost, tid, ip, domain, sted) " . " VALUES ('$_POST[type]', '$_POST[navn]', '$_POST[epost]', '$tid', '$ip', '$host', '$_POST[sted]' );" -Mike Forbes Mathias hunskår furevik wrote:
Whats worng with this? $sql = "INSERT INTO underskrifter (id, type, navn, epost, tid, ip, domain, sted) "
        . " VALUES ( '', '$_POST[type]', '$_POST[navn]', '$_POST[epost]', '$tid', '$ip', '$host', '$_POST[sted]' );"
        . " ";
mysql_query($sql); ??? First I tryed the usual INSERT syntax, then the one that phpMyAdmin suggests. None of them works. - Mathias Norway


« previous php.db (#34256) next »