Hi sql'ers though am dealing with SQL from past 4 years. I encountered little complex situation today.
I have a mysql table with columns, id,movieid,Lang,comment, and timestamp so i want to render comment for a particular movie in which user can decide a range that from where to where he wants a comment for that particular movie but when i try the following query will not working out. So help me guys I'm stucked.
SELECT comment from aaa where movieid=2 and language='en' between6 to 10
As far I understand you need to fetch 4 comments in total (between 6th and 10th) so you want to use
LIMIT for that, starting from 6th record:
SELECT `comment` FROM aaa WHERE movieid = 2 AND `language` = 'en' LIMIT 6,4