Movies show all years
Hello!
First I wanted to ask in chat but then I decided that this might be easier and faster. So I got this code in one part of my website: Code:
$current_year = '2013'; Code:
Edit Forgot to mention that it would be nice to see them sorted by year (2013 first, then 2012, 2011 etc.) when showing all. I added query below: Code:
$res = mysql_query("SELECT premieres.id, premieres.name, premieres.year, premieres.genre, premieres.descr, premieres.imdb, premieres.imdb_rating, premieres.uploaded, premieres.url, premieres.poster, premieres.owner, premieres.ori_name, users.username, users.class FROM premieres LEFT JOIN users ON premieres.owner = users.id WHERE year = '$where' ORDER BY id DESC $limit"); Code:
ORDER BY year |
that query you have well only show torrents for ONE Year
this well help your code a little PHP Code:
PHP Code:
|
1 Attachment(s)
I know it shows only one year. The thing is - I want to make it show one year but if user chooses - all years. Like where I have options for years I want an option "All" and then get all movies to show up when they choose it. I can make it show all years by just removing or commenting out all parts about year. I added full php file as an attachment so you can see what I have there. Problem isn't that it's showing only one year - problem is that I can't get it to show all years (and when I do that one year thingy isn't working).
P.S. Maybe I didn't understand your idea cuz sometimes I'm stupid like that. Sorry, if it's like talking to a brick wall (and I often feel it is).:D |
Here let me do it for you :drink:
PHP Code:
|
1 Attachment(s)
Yeah this gives me error.
|
try this
PHP Code:
|
Now it's showing that there isn't any movie added.
|
In the data base how dose it have the years listed?
|
Full year. 2012, 2013, 2000 etc.
|
sory missed the second query
PHP Code:
|
All times are GMT +2. The time now is 16:07. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.