Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Victor Mendonša  >  New MySQL  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Index file
Class: New MySQL
Retrieve, update and delete MySQL table records
Author: By
Last change: Index file
Date: 3 years ago
Size: 1,241 bytes
 

Contents

Class file image Download
<?php
error_reporting
(false);

header("Content-Type: text/html; charset=UTF-8");
@
define(SomeThingTRUE);

require_once(
'inc/function.php');
foreach (
glob('classes/class_*.php') as $file) {
    require_once(
$file);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>mend3 &bull; MySQL Class</title>
        <link rel="stylesheet" type="text/css" href="./css/newStyle.css" media="all" />
        <noscript><meta http-equiv="Refresh" content="1;url=http://www.google.com.br" /></noscript>
    </head>
    <body>
        <?php
        $MySQL 
= new NewMySQL('HOST'3306'USER''PASS''DATABASE'true);
        
$MySQL->Query("SELECT * FROM cliente ORDER by id ASC LIMIT 10", array(0123));
        
$MySQL->DescribeTable("cliente");
        
$MySQL->UpdateQuery("cliente", array("senha" => "maary"), array("login" => "Mary""id" => 10), 1);
        
$MySQL->DeleteQuery("cliente", array("login" => "Mary"), 1);
        unset(
$MySQL);
        echo 
"\n";
        
?>
    </body>
</html>