Welcome to GuardiansWorlds.com
 
 

  User Info Box

Anonymous
18.117.107.190
Nickname:

Password:

Security Code:
Security Code
Type Security Code:


User Stats:
Today: 0
Yesterday: 0
This Month: 0
This Year: 0
Total Users: 117
New Members:
Online Now:
  Guests: 27
18.117.xxx.xxx
85.208.xx.xxx
143.110.xxx.xxx
66.249.xx.xx
40.77.xxx.xx

  Total Online: 27
Server Time:
Apr 04, 2025
04:22 pm UTC
 

  Modules/Site Links

· Home
· Bible-MM
· Birds-MM
· Car_Show-MM
· Christmas-MM
· Content
· Domaining-MM
· Downloads
· Drugs-MM
· Event Calendar
· FAQ
· Feedback
· Fish-MM
· Gambling_Guide-MM
· Guardians Worlds Chat
· HTML_Manual
· Internet_Traffic_Report
· IP_Tracking Tool
· Journal
· Members List
· Movies-MM
· Music_Sound-MM
· NukeSentinel
· PHP-Nuke_Tools
· PHP_Manual-MM
· PING Tool
· Private Messages
· Recommend Us
· Reptiles-MM
· Search
· SEO_Tools
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top 30
· Topics
· Visitor Mapping System
· Web Links
· Webcams
· Web_Development-MM
· YahooNews
· YahooPool
· Your Account
 

  Categories Menu

· All Categories
· Camaro and Firebird
· FTP Server
· New Camaro
· News
· Online Gaming
 

  Survey

Which is your favorite generation Camaro or Firebird?

1st Gen. 67-69 Camaro
2nd Gen. 70-81 Camaro
3rd Gen. 82-92 Camaro
4th Gen. A 93-97 Camaro
4th Gen. B 98-2002 Camaro
1st Gen. 67-69 Firebird
2nd Gen. 70-81 Firebird
3rd Gen. 82-92 Firebird
4th Gen. A 93-97 Firebird
4th Gen. B 98-2002 Firebird



Results
Polls

Votes: 66
Comments: 0
 

  Cluster Maps

Locations of visitors to this page
 

  Languages

Select Interface Language:

 

 
  maxdb_rollback

maxdb_rollback

(PECL)

maxdb_rollback

(no version information, might be only in CVS)

maxdb->rollback -- Rolls back current transaction

Description

bool maxdb_rollback ( resource link )

class maxdb {

bool rollback ( void )

}

Rollbacks the current transaction for the database specified by the link parameter.

Return values

Returns TRUE on success or FALSE on failure.

Example

Example 1. Object oriented style

<?php
$maxdb
= new maxdb("localhost", "MONA", "RED", "DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n", maxdb_connect_error());
   exit();
}

/* disable autocommit */
$maxdb->autocommit(FALSE);

$maxdb->query("CREATE TABLE temp.mycity LIKE hotel.city");
$maxdb->query("INSERT INTO temp.mycity SELECT * FROM hotel.city");

/* commit insert */
$maxdb->commit();

/* delete all rows */
$maxdb->query("DELETE FROM temp.mycity");

if (
$result = $maxdb->query("SELECT COUNT(*) FROM temp.mycity")) {
   
$row = $result->fetch_row();
   
printf("%d rows in table mycity.\n", $row[0]);
   
/* Free result */
   
$result->close();
}

/* Rollback */
$maxdb->rollback();

if (
$result = $maxdb->query("SELECT COUNT(*) FROM temp.mycity")) {
   
$row = $result->fetch_row();
   
printf("%d rows in table mycity (after rollback).\n", $row[0]);
   
/* Free result */
   
$result->close();
}

/* Drop table myCity */
$maxdb->query("DROP TABLE temp.mycity");

$maxdb->close();
?>

Example 2. Procedural style

<?php
$link
= maxdb_connect("localhost", "MONA", "RED", "DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n", maxdb_connect_error());
   exit();
}

/* disable autocommit */
maxdb_autocommit($link, FALSE);

maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city");
maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city");

/* commit insert */
maxdb_commit($link);

/* delete all rows */
maxdb_query($link, "DELETE FROM temp.mycity");

if (
$result = maxdb_query($link, "SELECT COUNT(*) FROM temp.mycity")) {
   
$row = maxdb_fetch_row($result);
   
printf("%d rows in table mycity.\n", $row[0]);
   
/* Free result */
   
maxdb_free_result($result);
}

/* Rollback */
maxdb_rollback($link);

if (
$result = maxdb_query($link, "SELECT COUNT(*) FROM temp.mycity")) {
   
$row = maxdb_fetch_row($result);
   
printf("%d rows in table mycity (after rollback).\n", $row[0]);
   
/* Free result */
   
maxdb_free_result($result);
}

/* Drop table myCity */
maxdb_query($link, "DROP TABLE temp.mycity");

maxdb_close($link);
?>

The above examples would produce the following output:

0 rows in table mycity.
25 rows in table mycity (after rollback).
 
 


 
  Disipal DesignsAnti-Spam
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me.
You can syndicate our news using the file backend.php or ultramode.txt This site contains info,links,chat,message board/forum for online games,gaming,other features.Check out my servers and stats for Killing Floor, Quake3 Rocket Arenas & Deathmatch,Trade Wars 2002 & FTP server.Camaro/Firebirds, car info.