[ic] not using autonumber when creating a new item in admin ui
racke at linuxia.de
Thu Jan 15 09:45:26 EST 2004
On Thu, 15 Jan 2004 14:30:24 +0000
John Allman <allmanj at houseofireland.com> wrote:
> Stefan Hornburg wrote:
> >On Thu, 15 Jan 2004 13:30:58 +0000
> >John Allman <allmanj at houseofireland.com> wrote:
> >>Hi - i'm writing an admin page to manage a table that is not part of the
> >>core interchange but is essential in our site. I'm using interchange
> >>4.8.3. I'm manually selecting numbers for primary keys in this table
> >>based on the current values in there. I have based this as much as
> >>possible on the item_edit page and have simply changed the block of code
> >>in the [if cgi ui_new_item] tag to set item_id to the particular value i
> >>want (i have made sure that ui_new_item is set when this page is
> >>accessed by modifying the values in icmenu to be like those for
> >>item_edit, i.e. the form value set to ui_new_item=1). I have removed all
> >>of the AUTO_SEQUENCE and AUTO_NUMBER code.
> >>Unfortunately, although everything looks good on the editing page and
> >>the number i want is appearing there, when i submit it, it chooses a
> >>completely different value which it appears to be getting from an
> >>autonumber file in the products directory of my catalog.
> >>How can i get it to use my number instead? Or will i just have to adapt
> >>my plan to take this autonumbering into account?
> >Why did you remove AUTO_SEQUENCE ? That tells IC to rely on the
> >auto_increment feature of MySQL.
> > Racke
> This table doesn't have auto_increment set...
Aha, sorry I got this wrong. Certainly you can select a key value in your
form like that
<input type="hidden" name="mv_data_key" value="idf">
<input type="hidden" name="idf" value="7778899">
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
More information about the interchange-users