PHP Classes

File: rhc_test_run.php

Recommend this page to a friend!
  Classes of Rick Hopkins  >  rhc  >  rhc_test_run.php  >  Download  
File: rhc_test_run.php
Role: Example script
Content type: text/plain
Description: ::Test All Files
Class: rhc
Error handling, debugger, database abstraction
Author: By
Last change: changed name, added $DIE variable, updated file
Date: 14 years ago
Size: 1,380 bytes


Class file image Download
$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();
<title>Test Out rh_baseclass.php & rh_db_object.php</title>
    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;}
<table cellspacing=\"0\">
<td><b>Testing Out Classes</b></td>
= $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)){
printf("<td>%s - %s - %s</td>", $row["field_1"], $row["field_2"], $row["field_3"]);
$row = $obj->db_fetch($result);
<td><b>Number of Results: <?php echo $num?></b></td>