[ic] strange database update behavior
DB at M-and-D.com
Sun Sep 13 14:22:17 UTC 2009
> On 09/12/2009 07:32 PM, DB wrote:
>>> On 09/12/2009 05:43 PM, DB wrote:
>>>> I just noticed a strange (at least to me) behavior in a form that I've
>>>> been using to update a mysql database table.
>>>> The update of a text-type column fails if I attempt to submit an empty
>>>> entry. I see no error in the IC logs. If I instead submit a single space
>>>> (or any other non-empty string) then the update works.
>>>> The column definition is
>>>> Database transactions COLUMN_DEF "notes=text"
>>> Fails with what error message?
>> That's what's odd - as I said above I see no error in the IC logs, nor
>> is any error displayed on the page.
> What is the code that you're using to update the table?
I'm using a form like this which runs from within a [query]... it always
works fine unless I try to update the table with an empty string.
============= BEGIN CODE ===============
[tag flag write]transactions[/tag]
<FORM METHOD=GET ACTION="[process]">
<input type=hidden name=mv_session_id value="[data session id]">
<INPUT TYPE=HIDDEN NAME="mv_data_table" VALUE="transactions">
<INPUT TYPE=HIDDEN NAME="mv_data_key" VALUE="order_number">
<INPUT TYPE=HIDDEN NAME="mv_data_function" VALUE="update">
<INPUT TYPE=HIDDEN NAME="mv_nextpage" VALUE="order_updated">
<INPUT TYPE=HIDDEN NAME="mv_data_fields" VALUE="notes">
[data table=transactions col=notes key=[loop-code]]
<INPUT TYPE=submit VALUE="Update & Unlock">
============= END CODE =================
I'll check the mysql logs as Racke wisely advised as well.
More information about the interchange-users