title: How to output column data
body: <p>I've been trying to output column data for a specific user, but it always seems to not work and it doesn't give me any type of error.</p>
  
  <p>What it should do is get the <code>UserId</code> then output that column's data, but in my situation it's actually outputting the user's ID instead of the column data.</p>
  
  <pre class="lang-none prettyprint-override"><code>[08:21:12[PM]][DEBUG] =&gt;&gt; Packet Sent: %xt%up%-1%1%1%
  </code></pre>
  
  <p>The last number 1 is what the method below sends back which is wrong.</p>
  
  <pre class="lang-perl prettyprint-override"><code>method getColumnsById( $intID, $columns ) {
  
      my $resQuery = $self-&gt;{connection}-&gt;prepare( "SELECT $columns FROM `users` WHERE `ID` = ?" );
  
      $resQuery-&gt;execute( $intID );
  
      my $arrResult = $resQuery-&gt;fetchrow_arrayref( 0 );
  
      if ( $arrResult ) {
          return $arrResult;
      }
  }
  </code></pre>
  
  <h3>Example:</h3>
  
  <p>Username is <code>Test</code>, and it selects column <code>nameglow</code> then it should display the column data as like `0xFF000... or whatever the user has their column set to.</p>