daily pastebin goal
70%
SHARE
TWEET

[MySQL]: Função para criar Data Bases

garfield Feb 2nd, 2012 149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.                         @Função: Criar DataBase em MySQL
  3.                         @Créditos: SuYaNw Dácio
  4.  
  5.  
  6.                         http://suyanwdacio.blogspot.com/
  7. */
  8.  
  9.  
  10. function CreateDataBaseInMySql($host, $user, $pas, $db)
  11. {
  12.         $c = mysql_connect($host, $user, $pas);
  13.         $crate = "CREATE DATABASE ".$db."";
  14.         if(mysql_query($crate, $c))
  15.         {
  16.                 return 1;
  17.         }
  18.         else
  19.         {
  20.                 return 0;
  21.         }
  22.         return mysql_error();
  23. }
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