Add /Edit missing some fields.

All ApPHP DataGrid script bugs discussion. Questions and requests here.
Please, use a $debug_mode = true; before you say "Why Nothing Works ?!" (solves 90% of all issues)

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

yudthaphon
Junior
Junior
Posts: 24
Joined: Nov 2nd, '09, 14:29

Add /Edit missing some fields.

Postby yudthaphon » Feb 16th, '14, 09:25

Dear ApPHP team

I use a paid version of datagrid 7.9.9. and found weird action.
When edit data, some db field is not updated..not sure why.
Here is the debug info taken from the page.

The field 'mhosp1' is included in the SQL statement and the POST.
However, in the update statement, it is not included. The the value is never been updated.

please suggest any solution.
Thank you very much.

yudthaphon

Code: Select all

Retrieve data for current mode #2:
select sql (total: 3 | time: 0.0004 sec.) SELECT mid,muname,mupass,misactive,mname,murole,mhosp1,mcellphone,memail,mgender,mcontact,mlastupdate FROM tblmember WHERE 1=1 ORDER BY mid ASC LIMIT 0, 100

Retrieve data for current mode #2:
select sql (ทั้งสิ้น: 3 | time: 0.0003 sec.) SELECT mid,muname,mupass,misactive,mname,murole,mhosp1,mcellphone,memail,mgender,mcontact,mlastupdate FROM tblmember WHERE 1=1 ORDER BY mid ASC LIMIT 0, 100

Retrieve data for filtering fields:
select sql (ทั้งสิ้น: 2 | time: 0.0003 sec.) SELECT DISTINCT misactive FROM tblmember WHERE 1=1 ORDER BY misactive ASC

Retrieve data for SELECT SQL:
select sql (ทั้งสิ้น: 1 | time: 0.0006 sec.) SELECT COUNT(*) as count FROM tblmember WHERE mid <> '1' AND mid = '1'

Retrieve data for SELECT SQL:
select sql (ทั้งสิ้น: 1 | time: 0.0005 sec.) SELECT COUNT(*) as count FROM tblmember WHERE mid <> '1' AND mlastupdate = '2014-01-16 14:02:15'

Updating requested record #1:
update sql (ทั้งสิ้น: 0 | time: 0.0005 sec.) UPDATE tblmember SET muname = 'admin' , misactive = 'N' , mname = 'admin' , murole = 'Admin' , memail = 'num@hotmail.com' , mgender = 'Female' , mcontact = '' WHERE mid = '1'

Retrieve data for current mode #2:
select sql (ทั้งสิ้น: 3 | time: 0.0003 sec.) SELECT mid,muname,mupass,misactive,mname,murole,mhosp1,mcellphone,memail,mgender,mcontact,mlastupdate FROM tblmember WHERE 1=1 ORDER BY mid ASC LIMIT 0, 100

POST:
[_operation_randomize_code] => kza0in6ix8my5oxh3ore
[mode] => update
[rid] => 1
[page_size] => 100
[p] => 1
[rtymid] => 1
[rtymuname] => admin
[rtymupass] => thailand2014
[rtymisactive] => N
[syymname] => admin
[rtymurole] => Admin
[ryymhosp1]=> teleimaging1
[stymemail] => num@hotmail.com
[rtymgender] => Female
[syymcontact] =>
[stymlastupdate] => 2014-01-16 14:02:15

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: Add /Edit missing some fields.

Postby administrator » Feb 17th, '14, 07:26

Hi!

Do you speak about this action?

Code: Select all

Updating requested record #1:
update sql (ทั้งสิ้น: 0 | time: 0.0005 sec.) UPDATE tblmember SET muname = 'admin' , misactive = 'N' , mname = 'admin' , murole = 'Admin' , memail = 'num@hotmail.com' , mgender = 'Female' , mcontact = '' WHERE mid = '1'


Try to run this SQL statement directly via phpMyAdmin.
Do you see any error message?


Return to “ApPHP DataGrid {bugs}”