Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Grund  >  Mysql record set  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Documentation and Test file
Class: Mysql record set
MySQL Recordset handling
Author: By
Last change:
Date: 10 years ago
Size: 899 bytes
 

Contents

Class file image Download
<?php

    
include("./mysql_recordset.class.php");
    
    
$rec = new recordset();
    
    
//These Options are available too in the class file
    #######################
    
$rec->server "server";
    
$rec->dbname "db";
    
$rec->user "user";
    
$rec->pass "pass";
    
#######################
    
    //Open Recordset
    
$rec->open("Select * from table");

    
//Set Filter

    
$rec->filter("id=9");
    
    
/*Thes functions can be used to navigate and manipulate the recordset
    $rec->move_next()
    $rec->move_prev()
    $rec->move_last()
    $rec->move_first()
    
    $rec->update()
    $rec->delete()
    $rec->add_new()
    
    $rec->res_length()
    
    These are variables, that give true/false if you reached the beginning or end of the recordset
    $rec->EOF
    $rec->BOF
    
    To manipulate content just make it like this
    
    $rec->resultarray["column"] = value
    
    
    */
    
    
    //At the end ...
    
    
$rec->close_cnn();
?>