<?php
 
    require_once("rhc_db_object.php");
 
    
 
    $DEBUG=1;        //Debug Text - 0=no text 1=debug text
 
    $BETA=1;        //Error Handling - 0=public error(custom) 1=private error(regular)
 
    $DIE=0;            //Kill Script After Error - 0=no kill script 1=kill script (dependant upon BETA=0)
 
    
 
    $obj=new db_object();
 
?>
 
<html>
 
<head>
 
<title>Test Out rh_baseclass.php & rh_db_object.php</title>
 
<style>
 
    table {padding:0px; width:75%; background-color:#EEEEEE; border-top: 1px dotted #333333; border-left: 1px dotted #333333;  border-right: 1px dotted #333333;}
 
    td {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; font-size:10px; color: #333333; margin: 0px; padding: 0px; border-bottom: 1px dotted #333333;}
 
</style>
 
</head>
 
<body>
 
<table cellspacing=\"0\">
 
<tr>
 
<td><b>Testing Out Classes</b></td>
 
</tr>
 
<?php
 
    $conn = $obj->db_connect();
 
    $sql = "SELECT * FROM table ORDER BY field_1 ASC";
 
    $result = $obj->db_exec($sql, $conn);
 
    $row = $obj->db_fetch($result);
 
    
 
    $num = 0;
 
    while ((is_array($row)) AND ($num < 15)){
 
        print("<tr>\n");
 
        printf("<td>%s - %s - %s</td>", $row["field_1"], $row["field_2"], $row["field_3"]);
 
        print("</tr>\n");
 
        $num++;
 
        $row = $obj->db_fetch($result);
 
        }
 
    
 
    $obj->db_free($result);
 
    $obj->db_close($conn);
 
?>
 
<tr>
 
<td><b>Number of Results: <?php echo $num?></b></td>
 
</tr>
 
</table>
 
</body>
 
</html>
 
 |