Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // your
- if (isset($data['invert'])) {
- $id = $data['invert'];
- $tmp = $this->getProduct($id);
- $flag = $tmp['status'];
- $flag =($flag + 1) % 2;
- $this->db->query("UPDATE " . DB_PREFIX . "product SET status='" . $flag . "' WHERE product_id = '" . (int)$id . "'");
- }
- // new one
- if (isset($data['invert'])) {
- $id = (int) $data['invert'];
- $tmp = $this->getProduct($id);
- $flag = ! (int) $tmp['status'];
- $this->db->query("UPDATE " . DB_PREFIX . "product SET status = {$flag} WHERE product_id = {$id}");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement