Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function bookingHolidaysDelete($hotelid){
  2. $result = "error";
  3. try {
  4. $cn = dbConnect();
  5. if($hotelid > 0)
  6. {
  7. mysql_query("DELETE FROM timages WHERE timages.id IN (
  8. SELECT tholidaysimages.imageid FROM tholidaysimages
  9. WHERE tholidaysimages.hotelid=".$hotelid);
  10. //mysql_query("UPDATE tholidays set status=0 where id=".$hotelid);
  11.  
  12. if (mysql_affected_rows() > 0)
  13. $result="done";
  14. else
  15. $result="Ошибка sql";
  16. }
  17. else
  18. $result="Не выбрано помещение";
  19. mysql_close($cn);
  20. }
  21. catch (Exception $e) {
  22. $result = $e->getMessage();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement