Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $DB->query("SET AUTOCOMMIT=0");
- $DB->query("START TRANSACTION");
- // Check of exists
- $q = $DB->query("SELECT * FROM `test_overload` WHERE `code`='{$code}'");
- if( $q->num_rows == 0 )
- {
- $DB->query($DB->insert_string('test_overload', $data));
- $count_insert++;
- }
- else
- {
- $DB->query($DB->update_string('test_overload', $data, array('id'=>$q->row['id'])));
- $count_update++;
- }
- $DB->query("COMMIT");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement