Mostrando Codigo - Php
<?PHP
class database {
var $HOST = "localhost" ; // Servidor
var $USER = "" ; // nombre de usuario
var $PASS = "" ; // Clave de usuario
var $BDD = "" ; // Nombre de la base de datos
var $id_connect ;
var $select_db ;
var $result ;
var $error ;
function connect ( )
{
$this -> id_connect = mysql_connect ( $this -> HOST , $this -> USER , $this -> PASS ) ;
if ( ! $this -> id_connect ) {
$this -> error_mysql ( "Imposible de conectar a la base de datos" ) ;
return 0 ;
}
if ( ! $this -> select_db ) {
$this -> error_mysql ( "Imposible de conectar a la base de datos" ) ;
return 0 ;
}
}
function query( $QUERY )
{
$this -> result = mysql_query ( $QUERY , $this -> id_connect ) ;
if ( ! $this -> result ) {
$this -> error_mysql ( "Se ha detectado un problema en la conexion" ) ;
return 0 ;
}
}
function close_mysql( )
{
}
function error_mysql( $MSG )
{
echo "<B>Error :</B><BR><I>" . $msg . "<BR> " . $this -> error . "</I><BR>" ;
}
function fetch_array( )
{
}
function num_rows( )
{
}
}
?>
ENLACE AL CODIGO
Si quieres enlazar desde tu pagina a este codigo
COMENTARIOS
Aun no existe ningun comentario para este Codigo.