sqlite syntax ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #115
    eddieb
    Participant

    Hi,

    I am trying to load my playlists from a file into the songs.db using sqlite …

    sqlite ./songs.db < playlists.sql
    ……….. playlists.sql ………….
    BEGIN TRANSACTION;
    INSERT INTO playlists VALUES(null,”80’s”,1,0,’path includes “80”s”‘,0,NULL,0);
    COMMIT;
    …………………………………

    the problem is that for the single ‘ in the path ..
    If I insert the ‘ as above (2 following single ‘) , mt-daapd crashes on rescanning …

    2005-11-01 22:22:50: Query: UPDATE playlists SET items=(SELECT COUNT(*) FROM songs WHERE (path like ‘%80’s%’)) WHERE id=12
    2005-11-01 22:22:50: Error: near “s”: syntax error

    bug ???

    Eddie

    #3748
    rpedde
    Participant

    yup.

    Guess strings should be sqlescaped. D’oh.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.