User Tools

Site Tools


playlists_sql_examples

PlayLists Active SQL Examples

One of the best features of PinUP Popper is the use of active sql playlists. These are different than regular playlists where you add/remove games manually to those. With Acitive SQL Playlists, they will query the sql database in realtime so that the list is populated based on data from game manager. That way you don't need to maintain the playlist. For example, An Active Playlist could list all games from 1990-2000….if you add a new table/game to your system and set its date field, the list will automatically update while you're in the frontend.

Sample Video by user showing example config: https://youtu.be/-ZwC32AzgIM

Here are some sample of Playlists and the SQL you can set to use them:

some threads:

https://web.archive.org/web/20201029143253/https://vpinball.com/forums/topic/sql-playlists/

If you are power user you can download a free sql util like : http://sqlitestudio.pl You can interactive and test sql easier with this db browser.

note: do not change the modify the database structure or datatypes. If you need to add your own data into the sql, then add a new table and join.

How to make a 'mature' sql playlist and hide them from others

You want on each of these 'mature' games, the first field in game manager is “status'. set to mature/hidden.

Note: if you are using any active sql playlist make sure you filter out and use visible=1 so it doesn't pickup any mature games…..

Here are the some columns for Games Table.

    GameID          INTEGER
    EMUID           INTEGER,
    GameName        VARCHAR (200)
    GameFileName    VARCHAR (250)
    GameDisplay     VARCHAR (200)
    UseEmuDefaults  INTEGER,
    Visible         INTEGER       DEFAULT (1),
    Notes           TEXT,
    DateAdded       DATETIME,
    GameYear        INTEGER,
    ROM             VARCHAR (100),
    Manufact        VARCHAR (200),
    NumPlayers      INTEGER,
    ResolutionX     INTEGER,
    ResolutionY     INTEGER,
    OutputScreen    INTEGER,
    ThemeColor      INTEGER,
    GameType        VARCHAR (50),
    TAGS            VARCHAR (200),
    Category        VARCHAR (200),
    Author          VARCHAR (200),
    LaunchCustomVar VARCHAR (200),
    GKeepDisplays   VARCHAR (50),
    GameTheme       VARCHAR (100),
    GameRating      INTEGER,
    Special         TEXT,
    sysVolume       INTEGER,
    DOFStuff        VARCHAR (250),
    MediaSearch     VARCHAR (100),
    AudioChannels   VARCHAR (50),
    CUSTOM2         VARCHAR (100),
    CUSTOM3         VARCHAR (100),
    GAMEVER         VARCHAR (100),
    ALTEXE          VARCHAR (250),
    IPDBNum         VARCHAR (100),
    DateUpdated     DATETIME,
    DateFileUpdated DATETIME,
    AutoRecFlag     INTEGER        DEFAULT 0,
    AltRunMode      VARCHAR (250),
    WebLinkURL      VARCHAR (1000),
    DesignedBy      VARCHAR (200)

- Based on GameType, list all DMD (and color DMD) games:

SELECT * FROM Games JOIN Emulators on Games.EmuID = emulators.EmuID WHERE (GameType= "DMDc" or GameType= "DMD") ORDER BY GameDisplay

- Using the TAG “ignore” remove certain games from any list:

SELECT * FROM Games JOIN Emulators on Games.EmuID = emulators.EmuID WHERE (GameType= "DMDc" or GameType= "DMD") and tags not like "%ignore%" ORDER BY GameDisplay

- Playlist for Pinsound tables (using field LaunchCustomVar)

SELECT * FROM Games JOIN Emulators on Games.EmuID = emulators.EmuID WHERE ( LaunchCustomVar LIKE "%pinsound%" or LaunchCustomVar LIKE "%altsound%") and TAGS NOT LIKE "%ignore%" ORDER BY "GameDisplay"

- Playlist for adult games:

select * from games JOIN Emulators on Games.EmuID = emulators.EmuID where TAGS LIKE "%adult%" and TAGS NOT LIKE "%ignore%" ORDER BY "GameDisplay"
playlists_sql_examples.txt · Last modified: 2021/06/06 11:30 by pinupadmin