[ic] Import THEN Data or Query Insert failure
Paul Jordan
interchange-users@icdevgroup.org
Thu May 1 02:05:01 2003
Hello fellas
I ran into something weird. I have an [import ....].....[/import] on a page,
I also have another insert on the same page, for the same table. The Import
works. However for some reason if I try an insert BELOW it, the insert will
fail. I tried both with a [query] and [data] type inserts. Both failed with
error log saying...
Attempt to write read-only table.....
The weird part, upon investigating, either the [data] or [query] insert WILL
work just above the [import].
It seems to me that maybe the [import]... after it is done, puts some sort
of permanent lock on said table, for the rest of the page.
I have tried all different ways with varying usages of mv_data_enable and
[flag type="write"...] tags. It always comes down to working above, but not
below. I ofcourse am just gonna do the write above it, but it was bothering
me... Has anyone else experienced this before? To be clear, the [import]
never fails throughout this...
4.9.7
[tmp tmp][import table=messages type=LINE continue=NOTES]
parent_id: 0
call_id: [cgi call_id]
status: 5
..[snip]..
to_email: [cgi lto]
subject: [cgi subject]
content_type: text/plain
original_type: text/plain
body: [cgi name=my_message filter="mac" keep=1]
[/import][/tmp]
DATA Version:
[set mv_data_enable]1[/set]
[tag flag write]messages[/tag]
[data table="messages" key="[scratch m_read]" column="status" value="3"]
QUERY Version:
[set mv_data_enable]1[/set]
[flag type="write" table="messages"]
[query table="messages" sql=|
UPDATE messages
SET status = '3'
WHERE message_id = '[scratch m_read]'
|][/query]
Any clues?
Paul