Guest User

Untitled

a guest
Nov 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. if($data->edit_flag == 'ADDED')
  2. {
  3.  
  4. $rowdata[0] = $data->location_name;
  5. $rowdata[1] = 0;
  6. $rowdata[2] = $data->store_id;
  7.  
  8. $query = "INSERT IGNORE INTO store_locations (location_name,total_items, store_id) VALUES (?,?,?)";
  9.  
  10. $statement = $conn->prepare($query);
  11. $statement->execute($rowdata);
  12. $id = mysqli_stmt_insert_id($statement);
  13. echo "inserted id: " . $id;
  14. }
  15.  
  16. $id = $conn->lastInsertId();
  17. echo "insert id: " . $id;
  18.  
  19. $statement = $conn->prepare($query);
  20. $statement->execute($rowdata);
Add Comment
Please, Sign In to add comment