--- ../../../../../../tmp/kde-brenda/cervisiaycPBMb-slideshow.module-BASE	2007-04-11 23:59:45.000000000 +1200
+++ slideshow.module	2007-04-11 23:57:56.000000000 +1200
@@ -290,7 +290,7 @@
  *   slideshow property must be set.
  */
 function slideshow_insert_record(&$node) {
-  db_query("INSERT INTO {slideshow} SET nid = %d, vid = %d, location = %d, align = %d, dimensions = '%s';", $node->nid, $node->vid, $node->slideshow['location'], $node->slideshow['align'], $node->slideshow['dimensions']);
+  db_query("INSERT INTO {slideshow} (nid, vid, location, align, dimensions) VALUES (%d, %d,%d, %d, '%s')", $node->nid, $node->vid, $node->slideshow['location'], $node->slideshow['align'], $node->slideshow['dimensions']);
 }
 
 /**
@@ -380,7 +380,7 @@
   // create all images in the currently active revision
   if (!empty($node->files)) {
     // Determine if the file size has to be changed
-    $result = db_fetch_array(db_query("SELECT dimensions FROM {slideshow} WHERE nid = %d ORDER BY vid DESC LIMIT 0,1", $node->nid));
+    $result = db_fetch_array(db_query("SELECT dimensions FROM {slideshow} WHERE nid = %d ORDER BY vid DESC LIMIT 1", $node->nid));
     $recreate = !(($result && $result['dimensions'] == $dimensions) || (!$result && empty($node->slideshow['dimensions'])));
 
     $dimensions = explode('x', $dimensions);
