Re: Re: MYSQL 5 auto increment not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 21, 2009 at 9:34 AM, Nathan Rixham <nrixham@xxxxxxxxx> wrote:

> Leidago !Noabeb wrote:
>
>> Hi All
>>
>>
>> I know this is not strictly a PHP question, but i have a problem whenever
>> i
>> insert a record using PHP. Basically the auto increment field does not
>> work
>> at all. Here's the structure of the table that i'm using:
>>
>> CREATE TABLE `children` (
>>  `cid` int(4) NOT NULL auto_increment,
>>  `cname` char(50) default NULL,
>>  `csname` char(50) default NULL,
>>  PRIMARY KEY  (`cid`)
>> ) ENGINE=InnoDB
>>
>> I use PHP 5.1 and MYSQL 5
>>
>> I'm pretty sure the code i use to insert the data is sound since i've
>> tested
>> it with older versions of MYSQL.
>>
>> Has anyone else had similar problems?
>>
>>
> *works for me*
>
> check cid is empty in your insert statement
> check you haven't hit 9999 rows, seeing as you are using int 4
> drop and recreate the table (or truncate)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
openfire is something you may want to look at...it has a flash client in
there somewhere...also i believe you can find FLEX based IM chat code that
you can use

-- 

Bastien

Cat, the other other white meat

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux