fetch some data from two tables

Posted by user1753971 on Stack Overflow See other posts from Stack Overflow or by user1753971
Published on 2012-11-23T17:02:22Z Indexed on 2012/11/23 17:04 UTC
Read the original article Hit count: 176

Filed under:

i have site like imdb and we provide movie information sin site..and our website have option to rate all movies for every users.

I have two tables 1 . imdb (its for store movie details) id,name,actors,vote 2. ratings (its for store users rating details) id,rating_id(its same as id from first table),rating_num,IP

now what am doing is..when anyone rating a movie take the avg of that movie rating by using rating tables (total ratings/number of ratings) and insert that value into "vote" column in first table..my demands this..thats why done like this..

Now my problem is..i want to fetch top rated movies..i mean in vote column which movie have top rating which want to list and one more condition is that that movie should rated by 10 users(use ratings table for that)

thanks in advance

© Stack Overflow or respective owner

Related posts about mysql