You are here: sql query « PHP SQL « IT news, forums, messages
sql query

Posted by Jure on 10/08/10 11:38

This code works perfecty on mysql 4.1 bun my hosting is on mysql4.0.
silly me

Problem is on NOT IN

SELECT hotel.hotel, hotel.hotelid, hotel.price, hotel.star, place.place
FROM hotel left join region on hotel.idregion = region.idregion left
join place on hotel.idplace = place.idplace WHERE hotel.hotelid NOT IN
(select review_item_id from review where review.approve='y') AND
place.idplace = '$idplace' ORDER BY star DESC

How to get it work on mysql 4.0?

What I want.
Give me all hotels from some place (idplace) which are not in table
review or if they are in table review they have "n" in approve field

hotel.hotelid = review.review_item_id

Is it possible and how?

I don't know much about sql and I did this query with lot of help from
forums, documentations and some logic.

txh for your answers

jure

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация