SQL query to get imdb_id column and watched column (1 Viewer)

Dragy

Portal Pro
April 27, 2009
778
333
32
Home Country
Netherlands Netherlands
Hello,

I want to keep track of my watched movies in IMDB. A first start to get the list filled in IMDB, is to get the movie info from my Moving Pictures database. After that, I am gonna use PHP to add the info to IMDB (with cURL probably)

Now I have the following query:
Code:
SELECT movie_info.imdb_id,user_movie_settings.watched FROM movie_info LEFT JOIN user_movie_settings ON user_movie_settings.id=movie_info.id

Unfortunately, it's not right.. the id's of the watched column in the user_movie_settings table, do not match the id's of the movie_info table. I was not able to find how it works then.

Can you help me?

Thanks!

EDIT:
I think I have a better idea.. I don't know why I wanted to do it with IMDB.. Why not use the Trakt integration? Well, that is what I'm going to do now!

You may still answer my question for if I change my mind again :)
 

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
43
Texas
Home Country
United States of America United States of America
There is a third table that bridges the two called movie_info__user_movie_settings. I know it's a bit silly, has to do with how our ORM is built. The database schema is generated from the code so sometimes there are some weird setups like this.
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    You may still answer my question for if I change my mind again :)

    You can also use the Follw.it integration to keep track of it. I would try out both trakt.tv and follw.it and see which one you prefer. They each have their pros and cons and by trying both it is easier to find out which one you prefer.

    For the coding question, you could perhaps just look at how the Follw.it integration, the Trakt.tv plugin or even for example how the aMPdroid project does it.
     

    Users who are viewing this thread

    Top Bottom