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 Kostas Aitsidis  >  TMSSQLDatabase  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample usage class TMSSQLDatabase
Class: TMSSQLDatabase
MS SQL Server Database connection
Author: By
Last change: 1
Date: 11 years ago
Size: 719 bytes
 

Contents

Class file image Download
<?php
    
require 'TMSSQLDatabase.php';
    require 
'TNavigator.php';
    
$mis = new  TMSSQLDatabase("ITSRV","quest","asdas0902edsas022","ITS");
    
$mis->db_connect();
    
$mis->run_query("Select * from EliteUser.INI");
    
$i=0;
    
$rowsPerPage=15;

    if (
$mis->RecordCount== 0)  {
    print 
"Table is Empty ";    
    }
    elseif (
$mis->RecordCount0)  {
        
$rowsPerPage=25;
        
$fPage 0;
        
$pages = ($mis->RecordCount/$rowsPerPage);
        
$nav= new TNavigator$pages,$rowsPerPage,'/its/itm/itms.php');
        
$nav->ViewNavigator($_GET['page']);
        
# Fields to view 
            
$catalogFields = array (ABBREVIATION =>"Item Code"NAME =>"Item Description");
        
$mis->ViewPage("Item Catalog",$catalogFields,$_GET['page'],$rowsPerPage);
        }
?>