[Phpmyadmin-devel] Inline edit and where_clause
marc at infomarc.info
Mon Mar 28 12:34:08 CEST 2011
Le 2011-03-27 09:12, rohit sharma a écrit :
> On Sat, Mar 26, 2011 at 7:14 PM, Marc Delisle <marc at infomarc.info> wrote:
>> Le 2011-03-26 09:21, rohit sharma a écrit :
>>> On Sat, Mar 26, 2011 at 5:32 PM, Marc Delisle <marc at infomarc.info>
>>>> Le 2011-03-20 10:12, rohit sharma a écrit :
>>>>>> In case of an error, it would be better to display the query
>>>>> so to bring uniformity (either success or failure), the inline_edit
>>>>> should be displayed permanently like in case of normal query with
>>>>> $cfg['ShowSQL'] set to true.
>>>> In case of success, query is now displayed; please try it.
>>> Consider this scenario, I have a table with no index defined, and two
>>> columns, when I click "inline_edit" for any row, the row gets updated,
>>> the message is shown properly. Now when I click "inline_edit" again for
>>> same row, but changing the other column, the message shown is "0 Rows
>>> affected", although the row being displayed gets updated without any
>>> However a look at the query reveals that the query was in-fact incorrect,
>>> was using the old value for the column that had been previously edited.
>>> Thus the row displayed is incorrect, because it never got updated.
>>> I am sending some screenshots to depict the same.
>>> [ initial_setup ]
>>> [ updating row 2, col 2 ]
>>> [ updating row 2, col 1 ]
>>> For  it outputs, "0 Rows updated", although it should update that row,
>>> because nothing is incorrect with the query. A look at sql.js reveals,
>>> the column value in the new query does not get updated.
>>> Although while iterating over the elements "this_field_params[field_name]
>>> contains the correct value, however the problem is the "where_clause" as
>>> does not get updated. So the issue boils down to simply the " <input
>>> where_clause"..> being incorrect. Which means as soon as we find a
>>> successful sql query, we must update the "where_clause".
>>> Should I file this as a bug ?
>> Please do.
> Bug reported, updated diff uploaded, please test it.
More information about the Developers