Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- class mysql{
- global $host, $user, $pass, $conn, $db;
- /* mySQL connection information */
- $host = "";
- $user = "";
- $pass = "";
- $db = "";
- $conn = mysql_connect($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass']);
- function openconnection(){
- if($GLOBALS['conn'])){
- return "SQL Connection Established";
- selectdatabase();
- }else{
- return "SQL Connection Failed: ".mysql_error());
- }
- function selectdatabase(){
- if((mysql_select_db($GLOBALS['conn'], $GLOBALS['db']))){
- return "Database ";
- }
- function closeconnection(){
- if(mysql_close($GLOBALS['conn'])){
- return "Database Connection Sucessfully Closed";
- }else{
- return "Database Connection Failed To Close: ".mysql_error();
- }
- function checktables(){
- }
- function query($database, $query){
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement