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).
Php maxdb rollback Function syntax tag
maxdb rollback php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php maxdb rollback syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.