diff options
author | LarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b> | 2004-08-25 15:32:41 +0000 |
---|---|---|
committer | LarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b> | 2004-08-25 15:32:41 +0000 |
commit | cb9b8e3d80006addbfc9002c331fef19d27af6aa (patch) | |
tree | 19c52d4cc3b90cd10e55af1af905e7fb64a0bf3b | |
parent | bd5912cc0c84dec1f6136dbc3b8965587f8cf664 (diff) | |
download | vdr-plugin-muggle-cb9b8e3d80006addbfc9002c331fef19d27af6aa.tar.gz vdr-plugin-muggle-cb9b8e3d80006addbfc9002c331fef19d27af6aa.tar.bz2 |
Corrected SQL syntax errors.
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@118 e10066b5-e1e2-0310-b819-94efdf66514b
-rwxr-xr-x | mugglei.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -166,7 +166,7 @@ void update_db( long uid, string filename ) long id = random();
snprintf( cddbid, 19, "%d-%s", id, album );
- mgSqlWriteQuery( db, "INSERT INTO album VALUES ('%s', '%s', '%s')", artist, title, cddbid );
+ mgSqlWriteQuery( db, "INSERT INTO album (artist,title,cddbid) VALUES ('%s', '%s', '%s')", artist, title, cddbid );
}
else
{ // use first album found as source id for the track
@@ -186,7 +186,7 @@ void update_db( long uid, string filename ) }
else
{ // the entry does not exist, create it
- mgSqlWriteQuery( db, "INSERT INTO tracks VALUES ('%s', '%s', NULL, NULL, '%s', NULL, NULL, NULL, NULL, NULL, '%s', '%s', '%s'", artist, title, year, cddbid, trackno, filename.c_str() );
+ mgSqlWriteQuery( db, "INSERT INTO tracks (artist,title,year,sourceid,tracknb,mp3file) VALUES ('%s', '%s', '%s', '%s', '%s', '%s')", artist, title, year, cddbid, trackno, filename.c_str() );
}
}
@@ -233,9 +233,9 @@ void evaluate_file( string filename ) int main( int argc, char *argv[] )
{
- host = "127.0.0.1";
- user = "music";
- dbname = "GiantDisc";
+ host = "134.130.124.222";
+ user = "root";
+ dbname = "giantdisc";
pass = NULL;
int res = init_database();
|