PHP Classes

File: index.php

Recommend this page to a friend!
  Packages of Waqas Ahmed   SQLite and MySQL   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: MySQL test file
Class: SQLite and MySQL
Access MySQL and SQLite databases
Author: By
Last change:
Date: 16 years ago
Size: 707 bytes
 

 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252">
<title>Insert title here</title>
</head>

    <body>
    <p>MySQL Test</p>
    <?php
    
    require_once ('MySQL.php');
    require_once ('config.php');
    
    $connection = new Database($host, $database, $user, $password);
    
    $dataTable = $connection->Execute('SELECT * FROM EMP');
    $content = null;
   
    while ($dataTable->MoveNext()) {
        
        $content .= "$dataTable->E_ID<br>";
        // or use:
        //$content .= $dt->Field(0) . "<br>";
        
    }
    
    echo $content;

    ?>
    </body>
    
</html>