PHP Classes

File: scripts/dbFetch.php

Recommend this page to a friend!
  Classes of Johan Barbier   No Timeout   scripts/dbFetch.php   Download  
File: scripts/dbFetch.php
Role: Application script
Content type: text/plain
Description: script
Class: No Timeout
Split the execution of long tasks in small steps
Author: By
Last change: Changed the way it works a bit
Date: 17 years ago
Size: 648 bytes
 

Contents

Class file image Download
<?php
header
('Content-type: text/html; charset=iso-8859-1');
set_time_limit (2);
require_once
'../class/class.noTimeOut.php';
if (isset (
$_POST['iStart'])) {
   
$oNTM = new noTimeOut;
   
$oNTM -> TYPE = 'DB';
   
$oNTM -> HOST = 'localhost';
   
$oNTM -> LOGIN = 'root';
   
$oNTM -> PWD = 'pwd';
   
$oNTM -> DB = 'tests';
   
$oNTM -> DBSERVER = 'MYSQL';
   
$oNTM -> START = $_POST['iStart'];
   
$oNTM -> QUERY = $_POST['sQuery'];
   
$oNTM -> STEP = $_POST['iStep'];
   
$aRes = $oNTM -> flushMe ();
    if (!empty (
$aRes)) {
       
$sChaine = '';
        foreach (
$aRes as $iClef => $aVal) {
           
$sChaine .= $aVal['t_nom'].' <br /> ';
        }
        echo
$sChaine;
    }
}
?>