Insert with wrong id

Hi,
i’m having problems when in dhtmlxGrid i insert a new row:

in my database the row insered has id equal to 0 instead last id+1.

here is my code:

Aggiungi Voce
Rimuovi Voce

and connector:

<?php require_once("../../includes/config.php"); require_once("../../includes/dhtmlxSuite/dhtmlxConnector/php/codebase/grid_connector.php"); $db_selected = mysql_select_db($mysql_db_1, $link); $phone_grid = new GridConnector($link); $phone_grid->set_encoding("ISO-8859-1"); $phone_grid->enable_log("log/1.log",true); $phone_grid->dynamic_loading(5); $phone_grid->render_table("DBGroup_Phonebook","id","fname,lname,phone,interno,Filiale,Reparto"); require_once("../../includes/close.php"); ?>

and this is my log:

====================================
Log started, 19/01/2011 05:01:22

DataProcessor object initialized
0_gr_id => 0
0_c0 => CIO
0_c1 =>
0_c2 =>
0_c3 =>
0_c4 =>
0_c5 =>
0_!nativeeditor_status => updated
ids => 0

Row data [0]
id => 0
fname => CIO
lname =>
phone =>
interno =>
Filiale =>
Reparto =>
!nativeeditor_status => updated

UPDATE DBGroup_Phonebook SET fname=‘CIO’,lname=‘’,phone=‘’,interno=‘’,Filiale=‘’,Reparto=‘’ WHERE id=‘0’

Edit operation finished
0 => action:updated; sid:0; tid:0;

Done in 0.000713109970093s

====================================
Log started, 19/01/2011 05:01:24

DataProcessor object initialized
0_gr_id => 0
0_c0 => CIO
0_c1 => HGHG
0_c2 =>
0_c3 =>
0_c4 =>
0_c5 =>
0_!nativeeditor_status => updated
ids => 0

Row data [0]
id => 0
fname => CIO
lname => HGHG
phone =>
interno =>
Filiale =>
Reparto =>
!nativeeditor_status => updated

UPDATE DBGroup_Phonebook SET fname=‘CIO’,lname=‘HGHG’,phone=‘’,interno=‘’,Filiale=‘’,Reparto=‘’ WHERE id=‘0’

Edit operation finished
0 => action:updated; sid:0; tid:0;

Done in 0.000748872756958s

what i’m doing wrong?

dhtmlxgrid ver.2.6, connector ver.1.0

Thank u for answer

Hi,
just my 2 cents : Is you keyfield autoincrement in the database ?

Steven

no, my id field isn’t autoincrement

That is it , id update mechanic is based on auto-increment ( identity ) field in DB.