PHP Classes

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 4 years ago
Size: 674 bytes


Class file image Download

/* 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')");
$db-> mQuery() ? "Ok" : $db-> getErr();
/* Fail Sample - End */