Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example transaction in phpDB
- // Copyright 2015 Kumar Vivek Namprambhar. All rights reserve
- include 'phpDB::DB';
- $db_Connection = DB::createInstance(true, true, null);
- $db_Connection->init('vivek', 'vivek123', 'localhost:5601/db');
- $statement = 'INSERT ' . $_POST['data'] . ' INTO customers ON CONFLICT IGNORE CONSTRAINTS';
- $query_Executor = $db_Connection->get_exec();
- $result = '';
- try {
- $result = $query_Executor->execute($statement);
- } catch($ex) {
- try {
- $result = $query_Executor->force_execute($statement);
- } catch($ex) {
- print_r('u have bad Data...');
- }
- }
- $new_result = DB::Util_parse_result2string($result);
- print_r($new_result);
- print_r('goodbye thank U...');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement