[Phpmyadmin-devel] Inline edit and where_clause

Marc Delisle 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 :
>>> Hi,
>>>
>>> On Sat, Mar 26, 2011 at 5:32 PM, Marc Delisle <marc at infomarc.info>
>> wrote:
>>>
>>>> Le 2011-03-20 10:12, rohit sharma a écrit :
>>>>
>>>>>> In case of an error, it would be better to display the query
>>>> permanently,
>>>>> so to  bring uniformity (either success or failure), the inline_edit
>>>> query
>>>>> 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,
>> and
>>> the message is shown properly. Now when I click "inline_edit" again for
>> the
>>> same row, but changing the other column, the message shown is "0 Rows
>>> affected", although the row being displayed gets updated without any
>> error.
>>> However a look at the query reveals that the query was in-fact incorrect,
>> it
>>> 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.
>>>
>>> [0]
>>>
>> http://web.iiit.ac.in/~rohit.sharmaug08/phpmyadmin/inline_edit/inline-edit_1.jpeg
>>> [ initial_setup ]
>>> [1]
>>>
>> http://web.iiit.ac.in/~rohit.sharmaug08/phpmyadmin/inline_edit/inline-edit_2.jpeg
>>> [ updating row 2, col 2 ]
>>> [2]
>>>
>> http://web.iiit.ac.in/~rohit.sharmaug08/phpmyadmin/inline_edit/inline-edit_3.jpeg
>>> [ updating row 2, col 1 ]
>>>
>>> For [2] it outputs, "0 Rows updated", although it should update that row,
>>> because nothing is incorrect with the query. A look at sql.js reveals,
>> that
>>> 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
>> it
>>> does not get updated. So the issue boils down to simply the " <input
>> class="
>>> where_clause"..>  being incorrect. Which means as soon as we find a
>>> successful sql query, we must update the "where_clause".
>>
> 
> Hi,
> 
> 
>>> Should I file this as a bug ?
>>
>> Please do.
>>
>>
> Bug reported, updated diff uploaded, please test it.
> 
> https://sourceforge.net/tracker/?func=detail&aid=3249406&group_id=23067&atid=377408

Moved to
https://sourceforge.net/tracker/?func=detail&atid=377410&aid=3249406&group_id=23067


-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list