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
#31
I've almost mastered this...almost is keyword. I am trying to bind LIMIT variable. I'm testing this prior to using it for my pagnation. However, when I use the following statement, it returns an empty array:
Code:
$q = $db->query("SELECT * FROM dates WHERE dateclosed = ? AND user_id = ? LIMIT ?", array(0,$uid,1));

But when I run:
Code:
$q = $db->query("SELECT * FROM dates WHERE dateclosed = ? AND user_id = ? LIMIT 1", array(0,$uid));

It runs fine and returns a good array, but the point of PDO is to bind variable, I'm eliminating this purpose of I end up putting
Code:
LIMIT $start,$finish
right into the statement.

Thoughts? Thanks in advance!
  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: 2 Guest(s)