12-28-2016, 03:34 PM
Ahh. Ok. Well, if you could help me figure out which query is the problem, I can help.
If you move those functions to custom functions you will have to make a few little changes like put the DB:Get instance thing at the top of the function (you can look in us_helpers for an example) and then get rid of the $this and change it to $db. Again, looking in us_helpers will show you a difference between writing it as a method (in a class) and function (not in a class). But even before that, let's figure out where the problem is...
You don't just have to put die. You can give a description, so I would start at the top and change
to
If you make it that far and you see the die message but no error on line 50 error then you know there is no problem with that query so go to the next one...
Do that for each query (one at a time) and once you see the error pop up, you will know which one is causing you the problem and we can fix it.
If you move those functions to custom functions you will have to make a few little changes like put the DB:Get instance thing at the top of the function (you can look in us_helpers for an example) and then get rid of the $this and change it to $db. Again, looking in us_helpers will show you a difference between writing it as a method (in a class) and function (not in a class). But even before that, let's figure out where the problem is...
You don't just have to put die. You can give a description, so I would start at the top and change
Code:
if($validation->passed()){
Code:
$db->update('templates',$requestid,$fields);
Code:
$successes[] = "Long Name Updated";
Code:
if($validation->passed()){
Code:
$db->update('templates',$requestid,$fields);
Code:
die('made it to the long name update');
Code:
$successes[] = "Long Name Updated";
If you make it that far and you see the die message but no error on line 50 error then you know there is no problem with that query so go to the next one...
Code:
if($validation->passed()){
Code:
$db->update('templates',$requestid,$fields);
Code:
die('made it to the text update');
Code:
$successes[] = "Text Updated";
Do that for each query (one at a time) and once you see the error pop up, you will know which one is causing you the problem and we can fix it.