title: Trying to display news from mysql using jquery newsticker
body: <p>Hi I have created a table in my db </p>
  
  <pre><code>CREATE TABLE `newsticker` (
    `NID` bigint(20) NOT NULL AUTO_INCREMENT,
    `news` text CHARACTER SET utf8 NOT NULL,
    `status` char(1) CHARACTER SET utf8 NOT NULL DEFAULT '0',
    PRIMARY KEY (`NID`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  </code></pre>
  
  <p>I have these functions</p>
  
  <pre><code>function insert_get_newsticker($var)
  {
      global $conn;
      $query="SELECT * FROM newsticker WHERE status = '1' ORDER BY NID DESC";
      $results = $conn-&gt;execute($query);
      $ns = $results-&gt;getrows();
      return $ns;
  }
  </code></pre>
  
  <p>I am using this in my tpl file </p>
  
  <pre><code>{literal}
  &lt;script language="javascript" type="text/javascript" src="js/jquery.ticker.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $(function () {
          $('#js-news').ticker({
              speed: 0.10,
              pauseOnItems: 2000,
              controls: false,
              fadeInSpeed: 600,
              titleText: 'Our Latest News'
          });
      });
  &lt;/script&gt;
  {/literal}
  </code></pre>
  
  <p>I have the following where I want the news to be displayed </p>
  
  <pre><code>&lt;div id="tickerbg"&gt;
  &lt;div id="ticker-wrapper" class="has-js"&gt;
        &lt;ul id="js-news" class="js-hidden"&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I think I need some kind of for loop to be able to display the contents of the news table just having a mind blank any ideas </p>
  
  <p>thanks</p>