Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tiago Serafim  >  cDB  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample file
Class: cDB
Class for easy access MySQL databases
Author: By
Last change:
Date: 11 years ago
Size: 460 bytes
 

Contents

Class file image Download
<?

    
require "cDB.php";

        
$host "HOST";
        
$user "USERNAME";
        
$pass "PASSWORD";

    
$db = new clsDB();
        
$db->setHost($host);
        
$db->setUsername($user);
        
$db->setPassword($pass);
        
$db->setDatabase("DBNAME");
        
        
$db->setDebugmode(true);

        
$db->openDB();


        
$strSQL "SELECT * FROM TABLE_NAME WHERE ID = 1;";
        
        
$query $db->ExecuteSQL($strSQL);
            
$row mysql_fetch_array($query);
            
        
$theValue $row['rowNAME'];

?>