[ic] No key 'id' found for function='insert' table='pages'
Mike Heins
mike at perusion.com
Fri Aug 29 10:33:28 EDT 2003
Quoting Paul Vinciguerra (pvinci at vinciguerra.com):
> I am getting the following error and was wondering if someone could point me
> in the right direction.
>
> I cannot insert any records into a table names pages through the admin but can
> insert them via direct SQL inserts. The error I keep getting is No key 'id'
> found for function='insert' table='pages'. I am running version
> 4.9.8-200308200658 so that is pretty current.
>
> The pages.mysql is as follows:
> Database pages pages.txt __SQLDSN__
> Database pages KEY id
> Database pages COLUMN_DEF "id=VARCHAR(64) NOT NULL PRIMARY KEY"
> Database pages COLUMN_DEF "description=VARCHAR(128) NOT NULL"
> Database pages COLUMN_DEF "title=VARCHAR(128) DEFAULT '' NOT NULL"
> Database pages INDEX title
> Database pages COLUMN_DEF "author=VARCHAR(128) DEFAULT '' NOT NULL"
> Database pages COLUMN_DEF "template_page=VARCHAR(64)"
> Database pages COLUMN_DEF "content=TEXT"
> Database pages COLUMN_DEF "thumb=VARCHAR(128)"
> Database pages COLUMN_DEF "image=VARCHAR(64)"
> Database pages COLUMN_DEF "category=VARCHAR(64) NOT NULL DEFAULT ''"
> Database pages INDEX category
> Database pages COLUMN_DEF "subcategory=VARCHAR(64) NOT NULL DEFAULT ''"
> Database pages INDEX subcategory
> Database pages COLUMN_DEF "featured=VARCHAR(32)"
> Database pages COLUMN_DEF "start_date=timestamp"
> Database pages INDEX start_date
> Database pages COLUMN_DEF "end_date=timestamp"
> Database pages INDEX end_date
>
> and the admin displays id as a key on the dbinfo.html page:
>
> KEY
> id
>
> Can anyone suggest where I should focus my efforts trying to work through this?
"id" is a reserved variable name in IC, sort of. You can rename the column, and
all should be well. If you really, really want to use "id" you can remove
the line "id mv_session_id" from ICDIR/etc/varnames.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike at perusion.com>
How far can you open your mind before your brains fall out?
More information about the interchange-users
mailing list