[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Mysql - autoincrement primary number
Hi guys;
Thank you very much for your great resonse. You are such a great people.
For the refrence I did following:
I created mydb.mysql fiel as follow:
Database mydb mydb.txt __SQLDSN__
ifdef SQLUSER
Database mydb USER __SQLUSER__
endif
ifdef SQLPASS
Database mydb PASS __SQLPASS__
endif
Database mydb KEY my_id
Database mydb COLUMN_DEF "my_id=INT(9) UNSIGNED AUTO_INCREMENT
PRIMARY KEY"
some other fileds etc here ...........
And then in my form I refer to thsi my_id as follow:
[set mv_data_enable]1[/set]
[tag flag write]mydb[/tag]
<FORM ACTION="[process]" METHOD="POST">
<INPUT TYPE=HIDDEN NAME="mv_data_table" VALUE="mydb">
<INPUT TYPE=HIDDEN NAME="mv_data_key" VALUE="my_id">
<INPUT TYPE=HIDDEN NAME="mv_data_function" VALUE="insert">
<INPUT TYPE=HIDDEN NAME="mv_nextpage" VALUE=@@MV_PAGE@@>
<INPUT TYPE=hidden NAME=mv_check VALUE=NewWeb>
<INPUT TYPE="HIDDEN" NAME="mv_data_fields" VALUE="my_id, ............">
<Note that you do not have to refer to my_id from for as suggested
by Jonathan - thank you so much)
<<<<<<Other fileds go in here >>>>>>>>>>
<INPUT TYPE=hidden NAME="mv_todo" VALUE="set">
<INPUT TYPE="SUBMIT" VALUE="Send Info">
And then do not forget to add (as Racke nicely pointed out - thanks a
lot)
Database mydb AUTO_SEQUENCE 1 in your catalog.cfg file.
Also do not forget to add mydb.txt file in your yourcatalog/products/
And then restart your interchange.
Thank you guys very much for all your help.
Alma