Feature Request: Remote Database and/or Movie List Export (3 Viewers)

Status
Not open for further replies.

Rico

Portal Pro
December 23, 2008
188
12
Straelen
Home Country
Germany Germany
LRFalk01


can you please take a look at my page wich i created with rolls1400 output tool

how can i change the tool that it creates a link to the imdb id url like it has on your page
i dont know so much about coding :(

thanks in advance
 

shackrock

Portal Pro
December 27, 2008
291
12
Raleigh, NC
Home Country
United States of America United States of America
Code:
PDOStatement Object ( [queryString] => SELECT T1.id, T1.sortby, T1.year, T1.genres, T1.score, T1.imdb_id, T1.certification, T1.runtime, T2.user_rating FROM movie_info T1, user_movie_settings T2 WHERE T1.id = T2.id )
There's the results from that code I wrote in. I get "unable to connect to database" if the path is anything except "movingpictures.db3" or "./movingpictures.db3" ...

so still the same error now... ha. here's the updated code. This is so weird it works for you and not for me...
Code:
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
		<script type="text/javascript" src="javascript/mootools1.2.1.js"></script>
		<script type="text/javascript" src="javascript/movies.js"></script>
		<script type="text/javascript" src="javascript/sorttable.js"></script>
		<link rel="stylesheet" href="css/main.css" type="text/css" media="screen" charset="utf-8" />

		<title>HTPC Movies</title>

	</head>
	<body>

<center>The HTPC's Flicks...</center><p>


<?php

/* 
"SELECT T1.title FROM movie_info T1, user_movie_settings T2 WHERE T1.ID = T2.ID AND T2.watched > 0"

This select statement should give you a list of movies that have been watched. You could add an 'ORDER BY T2.watched DESC' at the end of that and it will also give you a top down from most watched to least watched movie.
*/

try {
    /*** connect to SQLite database ***/
    $dbh = new PDO("sqlite:./movingpictures.db3");
    }
catch(PDOException $e){
    echo $e->getMessage();
    }

$queryStatement = 'SELECT T1.id, T1.sortby, T1.year, T1.genres, T1.score, T1.imdb_id, T1.certification, T1.runtime, T2.user_rating FROM movie_info T1, user_movie_settings T2 WHERE T1.id = T2.id';


//Query results
$stmt = $dbh->query($queryStatement);

?>
        <table class="sortable" border='1'>
            <thead>
                <tr>
					<td>ID</td>
                    <td>Title</td>
                    <td>Year</td>
                    <td>Genres</td>
                    <td>IMDB Score</td>
					<td>My Score</td>
                    <td>Rating</td>
                    <td>Runtime</td>
                    <td>IMDB</td>
                </tr>
            </thead>
        <?php
        //loop through results to make table
while($next_row = $stmt->fetch(PDO::FETCH_ASSOC))
    {
        ?>
<tr class="movieRow">
				<td class="movieid"><?php print($next_row["id"]); ?></td>
                <td class="movieTitle"><?php print($next_row["sortby"]); ?></td>
                <td class="movieYear"><?php print($next_row["year"]); ?></td>
                <td class="movieGenres"><?php print(str_replace('|', ' | ', $next_row["genres"])); ?></td>
                <td class="movieScore"><?php print($next_row["score"]); ?></td>
				<td class="movieMyScore"><?php print($next_row["user_rating"]); ?></td>	
                <td class="movieRating"><?php print($next_row["certification"]); ?></td>
                <td class="movieLength"><?php print($next_row["runtime"]); ?></td>
                <td class="movieImdb"><a href="http://www.imdb.com/title/<?php print($next_row["imdb_id"]); ?>">IMDB</a></td>    
</tr>
        <?php
        }
        ?>
        </table>

<p>
	</body>

</html>


RICO:
If you can get that ouput to create http links instead of just the IMDb id....or if you're about to add <a href="https://forum.team-mediaportal.com/moving-pictures-284/feature-request-remote-database-movie-list-export-52622/http//www.imdb.com....."IMDBID</a> etc., it should create a link for you. It probably should be implemented in the program though, so you won't have to copy and paste it 100 times every time. That guy will implement it for you I'm sure, he said he's just gone for the weekend.
 

LRFalk01

Portal Pro
August 27, 2007
257
92
39
Home Country
United States of America United States of America
Now it should work LRFalk01
That page's source is disgusting. There is so much formatting in the page.

This page should give you all the information you need to make links:
HTML Links

I think your problem is going to be that this html page is made automatically, and there is no easy way to edit it.

shackrock:

http://echoes1.game-host.org/newmovies/movies.php

This is the same code as yours with the path to the db being different. The problem may be your php implimentation. or you have a different version of moving-pictures with a different db setup than my own. Did this work before we changed the SQL statement to grab info from the other table?


-LRFalk01
 

Rico

Portal Pro
December 23, 2008
188
12
Straelen
Home Country
Germany Germany
Now it should work LRFalk01
That page's source is disgusting. There is so much formatting in the page.

This page should give you all the information you need to make links:
HTML Links

I think your problem is going to be that this html page is made automatically, and there is no easy way to edit it.



-LRFalk01


Oke LRFalk01

thanks for the info


I want to have a easy way to export my moviedatabase to a html file but i dont know much of coding and the rolls1400 output tool works but it doesnt create a nice page like yours with clickable imdb links

so if you please could help me with i need to install ect. ect. to create a nice html page like yours
that really should be cool cause like you said the tool creates the html file automaticly and that sucks if i have to edit it everytime

so if you could help me :)

thanks in advance
 

LRFalk01

Portal Pro
August 27, 2007
257
92
39
Home Country
United States of America United States of America
If rolls1400 releases his source code, I can make the page look better. I'd rather not go through making another html generator.

-LRFalk01
 

Rico

Portal Pro
December 23, 2008
188
12
Straelen
Home Country
Germany Germany
Then we hope roll1400 releases the source code

cause i really like to create also such a html page like the one you have

maybe you can tell me what i need to install for software to create also a page like you have
if its not to much coding for a newbie :D:D



but youre page really is cool and the sig also :eek:
 

shackrock

Portal Pro
December 27, 2008
291
12
Raleigh, NC
Home Country
United States of America United States of America
ok so i did some troubleshooting. It looks like the problem comes in when that query statement is changed to the 2 table one. The old version still works fine, so the problem must be with the T1 T2 stuff somewhere...

Since the code works on your server with your database, can you try your server with MY database? You should be able to download it:

www.thesoundaswordmakes.com/movies/movingpictures.db3
 

LRFalk01

Portal Pro
August 27, 2007
257
92
39
Home Country
United States of America United States of America
ok so i did some troubleshooting. It looks like the problem comes in when that query statement is changed to the 2 table one. The old version still works fine, so the problem must be with the T1 T2 stuff somewhere...

Since the code works on your server with your database, can you try your server with MY database? You should be able to download it:

www.thesoundaswordmakes.com/movies/movingpictures.db3

I'm rebuilding my PC right now. I'll get to it in a couple hours.

-LRFalk01
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom