Req Profile specific bookmarks
#5
Awesome! This is exactly what I was looking for. I ran the script against my MyVideos75 db and it returned an error. Any ideas?

SQL query: Documentation

/* Trigger der den Playcount etc überträgt
*/
DELIMITER |
DROP TRIGGER IF EXISTS `bu_files`;
CREATE TRIGGER `bu_files` BEFORE UPDATE ON `files`
FOR EACH ROW BEGIN
DELETE FROM filestate WHERE filestate.idFile = new.idFile AND filestate.sqlUser = SUBSTRING_INDEX(USER(),'@',1);
INSERT INTO filestate (idFile, lastPlayed, playCount, sqlUser) VALUES(new.idFile, new.lastPlayed, new.playCount, SUBSTRING_INDEX(USER(),'@',1));
END;

/* Erzeugt die movieview neu.
* Enthält auch Änderungen für die RESUME bookmarks
*/
DROP VIEW IF EXISTS `movieview`;
CREATE VIEW `movieview` AS
SELECT movie.*, sets.strSet AS strSet, files.strFileName AS strFileName, path.strPath AS strPath,
filestate.playCount AS playCount, filestate.lastPlayed AS lastPlayed, files.dateAdded AS dateAdded,
bookmark_orig.timeInSeconds AS resumeTimeInSeconds, bookmark_orig.totalTimeInSeconds AS totalTimeInSeconds
FROM movie
LEFT JOIN sets ON sets.idSet = movie.idSet
[...]

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE TRIGGER `bu_files` BEFORE UPDATE ON `files`
FOR EACH ROW BEGIN
DELE' at line 3
Reply


Messages In This Thread
Profile specific bookmarks - by bakslash - 2013-11-28, 20:55
RE: Profile specific bookmarks - by bakslash - 2013-12-01, 22:00
RE: Profile specific bookmarks - by dtdickman - 2014-04-04, 18:54
RE: Profile specific bookmarks - by bakslash - 2014-04-04, 20:26
RE: Profile specific bookmarks - by xrsxj - 2015-05-16, 09:44
RE: Profile specific bookmarks - by phate89 - 2015-06-09, 22:11
RE: Profile specific bookmarks - by dtdickman - 2014-04-05, 01:05
RE: Profile specific bookmarks - by bakslash - 2014-04-05, 02:08
RE: Profile specific bookmarks - by bakslash - 2014-05-10, 16:25
RE: Profile specific bookmarks - by bakslash - 2014-06-01, 17:44
RE: Profile specific bookmarks - by bakslash - 2014-06-01, 23:31
RE: Profile specific bookmarks - by bmac88 - 2014-09-30, 21:04
RE: Profile specific bookmarks - by bmac88 - 2014-09-30, 21:26
RE: Profile specific bookmarks - by MKHR - 2015-03-22, 19:39
RE: Profile specific bookmarks - by MKHR - 2015-06-22, 13:07
RE: Profile specific bookmarks - by MKHR - 2016-04-09, 12:09
Logout Mark Read Team Forum Stats Members Help
Profile specific bookmarks0