<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>not selecting the right record</title>
        <link>https://interactivetools.com/forum/forum-posts.php?not-selecting-the-right-record-70524</link>
        <description></description>
        <pubDate>Tue, 12 May 2026 02:06:35 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;not-selecting-the-right-record-70524" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [craighodges] not selecting the right record</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2200070#post2200070</link>
          <description><![CDATA[Hi Craig,<br /><br />This was a little tricky, but I think I figured it out.  It's because on viewres_stu.php these lines are commented out:<br /><br /><code>  list($stu_resourcesRecords, $stu_resourcesMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'stu_resources',<br /><span style="color:red">   </span><br />    'limit'       =&gt; '1',<br />  ));</code><br /><br />The where line would get the number from the url, so that code is always just loading the first record.<br /><br />So this line shows the title from the first record: <br />&lt;title&gt;&lt;?php echo $stu_resourcesRecord['title'] ?&gt; <br /><br />And then lower this line shows the same value but it's different then:<br />&lt;h1 class=&quot;pg_hdr&quot;&gt;&lt;?php echo $stu_resourcesRecord['title'] ?&gt;&lt;/h1&gt;<br /><br />Which means one of these includes must have some viewer code that is overwriting $stu_resourcesRecord['title'] or $stu_resourcesRecord<br /><br />&lt;?php include(&quot;../headercode.php&quot;);?&gt;<br />&lt;?php include(&quot;../home_link.php&quot;); ?&gt;<br />&lt;?php include(&quot;../nav_top.php&quot;);?&gt;<br />&lt;?php include(&quot;substu.php&quot;);?&gt;<br />&lt;?php include(&quot;../content_subnavtop.php&quot;);?&gt;<br /><br />What you can try is print &lt;?php echo $stu_resourcesRecord['title'] ?&gt; after each to quickly figure out what file it's being changed in.<br /><br />Hope that helps!<br />]]></description>
          <pubDate>Mon, 02 Nov 2009 15:25:36 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2200070#post2200070</guid>
        </item>
                <item>
          <title>Re: [Dave] not selecting the right record</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2200034#post2200034</link>
          <description><![CDATA[thanks Dave -<br /><br />There are three primary files.<br /><br />1 - overview.php is the main page<br />2 - viewres_stu.php is the viewer page<br />3 - substu.php creates a subnav menu<br /><br />You will see the page title is pulled from the title in CMSB.  but it always pulls the first record - even when you change records.<br /><br />Thanks<br /><br />Craig<br />]]></description>
          <pubDate>Thu, 29 Oct 2009 19:59:33 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2200034#post2200034</guid>
        </item>
                <item>
          <title>Re: [craighodges] not selecting the right record</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2200030#post2200030</link>
          <description><![CDATA[Hi Craig, <br /><br />Can you attach both files to this thread?  If I can see how the code is outputting the title value that will help me figure out what the issue is.<br /><br />Thanks!<br />]]></description>
          <pubDate>Thu, 29 Oct 2009 19:01:34 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2200030#post2200030</guid>
        </item>
                <item>
          <title>not selecting the right record</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2200009#post2200009</link>
          <description><![CDATA[my multi-record section is not pulling the right source record (for some parts but others it works fine.<br /><br />this is the source page: <br />http://www.tpschool.org/stu/overview.php<br /><br />It loads the multi-record sub-sections onto the page.  When you load one of the subsections a subnav menu of all the other options also loads on the page.  <br /><br />The &quot;title&quot; of the record is pulled to use in the page title.  However, when you change to one of the other subsections the data on the page changes correctly but the page title does not change. <br /><br />Here is the code on the list page:<br /><br />&lt;?php<br />  <br />  require_once &quot;/usr/www/users/thephila/cmsAdmin/lib/viewer_functions.php&quot;;<br /><br />  list($stu_resourcesRecords, $stu_resourcesMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'stu_resources',<br />    'where'       =&gt; whereRecordNumberInUrl(1),<br />    'loadUploads' =&gt; '0',<br />	'orderBy'     =&gt; 'box ASC',<br />  ));<br />  $stu_resourcesRecord = @$stu_resourcesRecords[0]; // get first record<br /><br />  // show error message if no matching record is found<br />  if (!$stu_resourcesRecord) {<br />    print &quot;Record not found!&quot;;<br />    exit;<br />  }<br />  list($stu_overviewRecords, $stu_overviewMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'stu_overview',<br />    'where'       =&gt; whereRecordNumberInUrl(1),<br />    'loadUploads' =&gt; '0',<br />    'limit'       =&gt; '1',<br />  ));<br />  $stu_overviewRecord = @$stu_overviewRecords[0]; // get first record<br /><br />  // show error message if no matching record is found<br />  if (!$stu_overviewRecord) {<br />    print &quot;Record not found!&quot;;<br />    exit;<br />  }<br /><br />?&gt;<br /><br /><br />here is the code for the viewer page - I am pretty sure the problem occurs because of the get first record code but I am drawing a blank on how to get around it. <br /><br />&lt;?php<br />  <br />  require_once &quot;/usr/www/users/thephila/cmsAdmin/lib/viewer_functions.php&quot;;<br /><br />  list($stu_resourcesRecords, $stu_resourcesMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'stu_resources',<br />    'limit'       =&gt; '1',<br />  ));<br /> <br />$stu_resourcesRecord = @$stu_resourcesRecords[0]; // get first record<br />  <br /> <br />  // show error message if no matching record is found<br />  if (!$stu_resourcesRecord) {<br />    print &quot;Record not found!&quot;;<br />    exit;<br />  }<br />  <br />?&gt;<br /><br />Any help is appreciated  - thanks.<br />]]></description>
          <pubDate>Wed, 28 Oct 2009 18:22:35 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2200009#post2200009</guid>
        </item>
              </channel>
    </rss>
  