Hi,

On Sat, Apr 28, 2001 at 05:12:42PM +0200, Antonino Chirco wrote:
> Mysql : 3.23.33
> server : NT 4.0  S.P.3
> Client : Win98
> 
> This is the table structure:
> CREATE TABLE `ordinit` (
>   `ID_Ordine` int(11) NOT NULL auto_increment,
>   `Cod_Cliente` int(11) default NULL,
> 
> .. OMISSIS ..
> 
>   PRIMARY KEY (`ID_Ordine`)
> ) TYPE=MyISAM
> 
> the query 'select last_insert_id()' after an
> 'insert' query return always zero.
> I have tried also with MySQLGUI Client.
> 

What does your INSERT query look like? It should specify NULL
for ID_ordine, e.g.:

INSERT INTO ordinit(ID_ordine, Cod_Cliente) VALUES (NULL, 10);

Any other value for ID_ordine will not assign an auto_increment
value.


> ( excuse me for my English, it's under construction)
> 

;-)

Your English is fine.


Regards,

Fred.

-- 
Fred van Engen                              XO Communications B.V.
email: [EMAIL PROTECTED]             Televisieweg 2
tel: +31 36 5462400                         1322 AC  Almere
fax: +31 36 5462424                         The Netherlands

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to