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
v.5 -- Didn't know where else to post this so...
#20
I see a few things. I don't do a lot of do while loops, but the first line should be
$query = $db->query("SELECT * FROM pages WHERE id = ?",array($parent_page_id));

The problem with your do while loop is that you have an object instead of an array.
Just for the heck of it, after the results, do
dump($results);
and you can see how that data is formatted.

I know I screwed up some of your concatenation at the end and you'll have to fix that, but I'm guessing you're going to want something like

$query = $db->query("SELECT * FROM pages WHERE id = ?",array($parent_page_id));
$results = $query->results();
foreach($result as $result){
$parent_page_path = $result->page;
$parent_page_title = $result->page_title;
$breadcrumb .= ' ยป <i class="fa fa-home"></i> ' . $parent_page_title;
$new_parent_page_id = $result->parent_page_id;
}
  Reply


Messages In This Thread
v.5 -- Didn't know where else to post this so... - by mudmin - 11-03-2016, 01:37 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)