php-db | 2001051
Date: 05/02/01
- Next message: Ron Patterson: "[PHP-DB] Re: [[PHP-DB] Variable Assignment]"
- Previous message: Larry Rivera: "RE: [PHP-DB] How to autoincrement an autoincrementing field (MySQL)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Insert with a value of zero (0) or don't specify the column at all (uses the
default increment).
Hope this helps,
Ron Patterson
USA.NET
Alan Hale <adhale <email protected>> wrote:
> OK, I give up - I can't find out how to do this. I thought I'd tracked
> it down in my copy of O'Reilly's 2MySQL and mSQL which says that you put
> NULL as the value for an autoincrementing, NOT NULL field in an INSERT
> statement:
>
> e.g. INSERT INTO records (record_id, name, etc.....) VALUES (NULL,
> 'Alan', etc.)
>
> which is wierd enough. But it doesn't work (not via PHP mysql_query()
> anyhow) - predictably, I get an error 1048 Column 'record_id' cannot be
> null.
>
> Help please!
>
> TIA
>
> Alan Hale
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Ron Patterson: "[PHP-DB] Re: [[PHP-DB] Variable Assignment]"
- Previous message: Larry Rivera: "RE: [PHP-DB] How to autoincrement an autoincrementing field (MySQL)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

