---------------------------------------------------------------------

Page content

Frequently Asked Questions

I'm receiving the following (or similar) error on the showusers.php, viewmovie.php or listmovies.php page:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in showusers.php on line 15

This is caused by changes in the acceptable join syntax in MySQL 5.x. To resolve the issue, download the updated files and extract them over the existing files.


Can you add a feature to extract data from IMDb automatically?

I looked into this in some detail. There are other tools out there which use IMDb to populate their database. However, when I contacted the IMDb legal department (which is in fact handled by Amazon), they informed me that their license terms would not permit me to include this code in the DVDdb. From a technical standpoint, I could implement the functionality and there's basically no way to prevent it being used (which is presumably why other people have done so), but I will not do this.


Can I add <insert feature> functionality to DVDdb? Or are you going to be doing this?

Pretty much every feature suggested to me by email has so far been implemented, or planned to be implemented. Of course, adding features takes me time, something I don't have a lot of, so when features will be implemented is anyone's guess. In the meanwhile, if you want to add something, go right ahead.


When I try and search by title, I get an error like this:

Warning: Supplied argument is not a valid MySQL result resource in listmovies.php on line 120

Browse to the file /upgradedb.php on your site. This will configure a database version string that should resolve this error.


When trying to set up the database, I get the following error:

You have an error in your SQL syntax near '---------------------------------------------------------'

This is caused by versions of MySQL that don't like the comment style in the latest database file. You can download a version of the file without comments and use that instead from here. This will be resolved in the next release.


Searching returns no results but I know they're in there, what's going on?

MySQL fulltext search has some limitations. By default, it only indexes words of 4 characters or more, so searches on words shorter than this will fail. Also, if the number of results matching the search is 50% or more of the complete table, you will not see results. Therefore, if you have 2 rows, and your search would return 1 row, it will not return anything. Add more entries in the database and the search will get more useful. Finally, MySQL has various "stop words" which do not yield search results. These are words like "and", "or", etc.

You can configure the minimum word length for indexing by modifying the config file my.cnf. The setting to look for is "ft_min_word_len". Once you've made the configuration change, you need to issue the following command to finish the changes:

mysql> repair table movie quick;