daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. include 'config/mysql.php';
  4.  
  5. class myClass
  6. {
  7.         private static $PDO = NULL;
  8.         private static $tbl = 'questions';
  9.  
  10.         public function selectNum()
  11.         {
  12.                 $sql = 'SELECT * FROM ' . self::$tbl . 'WHERE used = 0';
  13.                 echo $sql;
  14.                
  15.         }
  16.  
  17.         private function _select( $sql )
  18.         {
  19.                 if ( !self::$PDO ) die( mysql_error(). 'No database connection.' );
  20.                 $stmt = self::$PDO->query( $sql );
  21.  
  22.                 if ( $stmt && $stmt->rowCount() < 4 )
  23.                 {
  24.                         echo "your row count is less than 4";
  25.                 }
  26.                 else
  27.                 {
  28.                         echo "your row count is not less than 4";
  29.                 }
  30.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top