Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function bookingHolidaysDelete($hotelid){
- $result = "error";
- try {
- $cn = dbConnect();
- if($hotelid > 0)
- {
- mysql_query("DELETE FROM timages WHERE timages.id IN (
- SELECT tholidaysimages.imageid FROM tholidaysimages
- WHERE tholidaysimages.hotelid=".$hotelid);
- //mysql_query("UPDATE tholidays set status=0 where id=".$hotelid);
- if (mysql_affected_rows() > 0)
- $result="done";
- else
- $result="Ошибка sql";
- }
- else
- $result="Не выбрано помещение";
- mysql_close($cn);
- }
- catch (Exception $e) {
- $result = $e->getMessage();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement