summaryrefslogtreecommitdiff
path: root/muggle-plugin/mugglei.c
diff options
context:
space:
mode:
authorLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2004-08-25 15:32:41 +0000
committerLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2004-08-25 15:32:41 +0000
commite9bc613db7b9e1540e01d19ceaaf8f6483a723c8 (patch)
tree0483906c32ad4c3fd60ebfcffea53ca640df61fc /muggle-plugin/mugglei.c
parent56666bdb7d5729459656ebc310522f461b6fed98 (diff)
downloadvdr-plugin-muggle-e9bc613db7b9e1540e01d19ceaaf8f6483a723c8.tar.gz
vdr-plugin-muggle-e9bc613db7b9e1540e01d19ceaaf8f6483a723c8.tar.bz2
Corrected SQL syntax errors.
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk@118 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'muggle-plugin/mugglei.c')
-rwxr-xr-xmuggle-plugin/mugglei.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/muggle-plugin/mugglei.c b/muggle-plugin/mugglei.c
index d241482..2a94c1f 100755
--- a/muggle-plugin/mugglei.c
+++ b/muggle-plugin/mugglei.c
@@ -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();