Join will not update

QuestionsJoin will not update
Tim Moore asked 2 years ago

Abu,

I have, for a while, been having issues with updating information in a joined query. I went around this by using an event and adding the information using my own query. Now i am having a problem with that.

https://gist.github.com/tmoore88/0baf1adb1eefa44fb0db3f39e90a6ab1

As an example on attached code, line 772 returns: Internal Server Error – no value to the ID. However, if  i change line 722: phpgrid_error($data[‘params’][‘jp_date’]); It will return the date of the selected line to edit on save.

If rem out line 772. I get no errors on edit, but the jd_date will not update. this column array is located on line 554-564.

if you un-rem line 778, the change will happen, but not if i replace the job_id=4860 with a variable job_id = ‘$fkid’.

I have the same issue with phpgrid_error($data[‘params’][‘job_id’]); too:  Internal Server Error

This should be a simple thing, but it is turning into a headache. I don’t know why my ID’s are not getting passed to the event. Any help would be greatly appreciated.

Thanks in advance,

Tim

1 Answers
Abu Ghufran Staff answered 2 years ago

Hello,

My analysis is you need to set job_id to editable as non-editable columns are not posted back to the server.

Line 335

$col["editable"] = true;

Rest code seems ok.

To debug what you are getting inside callback function, set on line 664

phpgrid_error($data);
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

16 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?