Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Gilton Guma  >  MySQL Multi Query  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example 2
Class: MySQL Multi Query
Execute multiple MySQL queries at a time
Author: By
Last change: Adjusted for better understanding!
Date: 3 years ago
Size: 674 bytes
 

Contents

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

/* Fail 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` (`namec`) VALUES ('name 3')");
echo 
$db-> mQuery() ? "Ok" $db-> getErr();
/* Fail Sample - End */
?>