Hyluss

[PHP] LoadBlock

Jan 16th, 2018
275
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. function LoadBlock($id)
  2.     {
  3.         if($query = $this->si->database->prepare("SELECT content FROM content WHERE id= ?"))
  4.         {
  5.             $query->bind_param('s',$id);
  6.             $query->execute();
  7.             $query->store_result();
  8.            
  9.             //echo $query->num_rows;
  10.            
  11.             if($query->num_rows != FALSE)
  12.             {
  13.                 echo 'aaaa';
  14.                 $query->bind_result($content);
  15.                 echo $content.'asas';
  16.                 $query->fetch();
  17.                 $query->close();
  18.                 return $content;
  19.             }
  20.             else
  21.             {
  22.                 $query->close();
  23.                 return FALSE;  
  24.             }
  25.            
  26.         }
  27.     }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment