<?php
 
// Make sre the varaiable settings are correct in dbConn.data.inc.php
 
require_once ('dbConn.class.php');        // Gimme the Class
 
$objConn= new dbConn;                                    // New Instance
 
$objConn->setpersistent(false);                // Defaults to false
 
$objConn->openConn();                                    // Open connection
 
 
/* ***************************************************************************** */
 
$query = 'SELECT 1';                                        // Create the query
 
//$objConn->openQuery($query);                        // 
 
$result = $objConn->openQuery($query);    // Run the query & Assign the result to your local variable
 
//echo mysql_num_fields($result );                // now you are free to use it as a regular result set
 
 
$row_RecordsetMain = mysql_fetch_array($result);
 
echo '1st:'.$row_RecordsetMain[1].'<br/>';
 
/* ***************************************************************************** */
 
$objConn->freeReuslt();                                    // you can free the result and still use the recordset (but why would you?
 
$query = 'SELECT 2';                                        // Create the query
 
$result2 = $objConn->openQuery($query);
 
$row_RecordsetMain2 = mysql_fetch_array($result2);
 
 
echo '1st again:'.$row_RecordsetMain[0].'<br/>';
 
echo '2nd:'.$row_RecordsetMain2[0].'<br/>';
 
 
//$objConn->freeReuslt(); // Close the result set
 
$objConn->closeConn();     // This will do nothing if the connection is persistent
 
?>
 
 |