Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.     $host = "localhost";
  3.     $user = "";
  4.     $pass = "";
  5.     $db = "portal";
  6.    
  7.     mysql_connect( $host, $user, $pass ) or die( "SQL Module error: unable to access host!" );
  8.     mysql_select_db( $db ) or die( "SQL Module error: unable to select database!" );
  9.    
  10.     function Query( $query ) {
  11.         if ( $query.strlen > 0 ) {
  12.             return mysql_query( $query );
  13.         } else {
  14.             die( "SQL Module error: unable to parse query or query erroneous" );
  15.         }
  16.     }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement