PHP Classes

File: example1.php

Recommend this page to a friend!
  Classes of Gilton Guma   MySQL Multi Query   example1.php   Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example 1
Class: MySQL Multi Query
Execute multiple MySQL queries at a time
Author: By
Last change: Adjusted for better understanding!
Date: 12 years ago
Size: 692 bytes
 

Contents

Class file image Download
<?php
require_once("MysqlMQ.class.php");

/* Sucessful Sample - Begin */
$db = new MysqlMQ();
$db-> setSrv("localhost"); //Just one example, enter the your host address
$db-> setUsr("root"); //Just one example, enter the your database user
$db-> setPwd(""); //Just one example, enter the your database password
$db-> setDtb("test"); //Just one example, enter the your database name
$db-> setSQL("INSERT INTO `table` (`name`) VALUES ('name 1')");
$db-> setSQL("INSERT INTO `table` (`name`) VALUES ('name 2')");
$db-> setSQL("INSERT INTO `table` (`name`) VALUES ('name 3')");
echo
$db-> mQuery() ? "Ok <br />" : $db-> getErr();
/* Sucessful Sample - End */

?>