Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- class DB {
- function DB( $sql_config ) {
- $sql = mysql_connect( $sql_config['host'], $sql_config['username'], $sql_config['password'] );
- mysql_select_db( $sql_config['database'] );
- return $sql;
- }
- static function query( $query ) {
- $result = mysql_query( $query );
- if ( !$result ) {
- die( mysql_error().'<br />query: '.$query );
- }
- return $result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement