20
« on: October 28, 2008, 06:51:59 pm »
The problem is your database entries aren't numbered. The ID number (the first value) is assigned as the "primary key" in the database, which probably means it has to be unique. I wasn't even aware that PVD would allow duplicate IDs.
Fortunately the internal PVD database has an internal ID you can use as a replacement value. Make the change shown with red to the sql.ptm file before exporting, this should assign the internal ID number instead:
%OPTIONS%
filter="SQL Files|*.sql"
encoding="UTF8"
replace=";<->,"
replace="'<->''"
replace=""<->"
replace="#13#10<-> "
replace="#13<-> "
replace="#10<-> "
imagepath="images\"
%OPTIONS%INSERT INTO movies (NUM, CHECKED, MEDIA, MEDIATYPE, SOURCE, DATEADD, BORROWER, RATING, ORIGINALTITLE, TRANSLATEDTITLE, FORMATTEDTITLE, DIRECTOR, PRODUCER, COUNTRY, CATEGORY, YEAR, LENGTH, ACTORS, URL, DESCRIPTION, COMMENTS, VIDEOFORMAT, VIDEOBITRATE, AUDIOFORMAT, AUDIOBITRATE, RESOLUTION, FRAMERATE, LANGUAGES, SUBTITLES, FILESIZE, DISKS, VIEWDATE, PICTURENAME) VALUES ('{%value=0}', '', '{%value=47}', '', '', '{%value=17}', '', '{%value=9}', '{%value=3}', '{%value=2}', '', '{%value=53}', '{%value=56}', '{%value=45}', '{%value=44}', '{%value=5}', '{%value=19}', '{%value=52}', '{%value=8}', '{%value=15}', '{%value=16}', '{%value=23}', '{%value=24}', '{%value=43}', '{%value=25}', '{%value=21}', '{%value=22}', '{%value=48}', '{%value=49}', '{%value=26}', '{%value=29}', '{%value=33}', '{%value=63}');
I suspect the date values formatted like "21st July 1979" will end up as "0000-00-00" in the mysql database. It should be possible to fix this using regular expressions, let me know if it becomes a problem.
EDIT: forget the last part, seems the alternative date formatting I spotted is part of a descripton text and not a date field.