The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running Update Query
#16
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

Code:
if($validation->passed()){
Code:
$db->update('templates',$requestid,$fields);
Code:
$successes[] = "Long Name Updated";
to

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.
  Reply


Messages In This Thread
Running Update Query - by Brandin - 12-03-2016, 09:31 PM
Running Update Query - by Brandin - 12-03-2016, 09:31 PM
Running Update Query - by mudmin - 12-19-2016, 02:35 PM
Running Update Query - by Brandin - 12-19-2016, 02:37 PM
Running Update Query - by Brandin - 12-22-2016, 06:52 PM
Running Update Query - by mudmin - 12-22-2016, 06:56 PM
Running Update Query - by Brandin - 12-26-2016, 06:50 PM
Running Update Query - by mudmin - 12-28-2016, 02:54 PM
Running Update Query - by Brandin - 12-28-2016, 03:01 PM
Running Update Query - by mudmin - 12-28-2016, 03:03 PM
Running Update Query - by Brandin - 12-28-2016, 03:03 PM
Running Update Query - by mudmin - 12-28-2016, 03:05 PM
Running Update Query - by Brandin - 12-28-2016, 03:07 PM
Running Update Query - by mudmin - 12-28-2016, 03:08 PM
Running Update Query - by Brandin - 12-28-2016, 03:09 PM
Running Update Query - by mudmin - 12-28-2016, 03:34 PM
Running Update Query - by Brandin - 12-30-2016, 03:07 PM
Running Update Query - by mudmin - 12-30-2016, 05:09 PM
Running Update Query - by Brandin - 12-30-2016, 06:00 PM
Running Update Query - by dan - 12-31-2016, 02:30 PM
Running Update Query - by Brandin - 12-31-2016, 02:38 PM
Running Update Query - by Brandin - 01-03-2017, 04:10 PM
Running Update Query - by mudmin - 01-03-2017, 10:34 PM
Running Update Query - by Brandin - 01-04-2017, 12:08 AM
Running Update Query - by mudmin - 01-04-2017, 02:08 AM
Running Update Query - by Brandin - 01-04-2017, 02:21 AM
Running Update Query - by mudmin - 01-04-2017, 02:22 AM
Running Update Query - by Brandin - 01-04-2017, 02:24 AM
Running Update Query - by mudmin - 02-14-2017, 01:52 PM
Running Update Query - by Brandin - 03-17-2017, 04:55 PM
Running Update Query - by Brandin - 03-18-2017, 02:03 AM
Running Update Query - by mudmin - 03-19-2017, 10:52 PM
Running Update Query - by Brandin - 03-19-2017, 11:34 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)