Index: node_gallery.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/node_gallery/node_gallery.inc,v
retrieving revision 1.2.2.76
diff -u -p -r1.2.2.76 node_gallery.inc
--- node_gallery.inc	27 Nov 2010 17:08:52 -0000	1.2.2.76
+++ node_gallery.inc	28 Nov 2010 11:30:19 -0000
@@ -364,7 +364,7 @@ function node_gallery_get_images(&$galle
           . ' INNER JOIN {node_gallery_images} ngi ON ngi.nid = n.nid'
           . ' WHERE n.nid IN (' . db_placeholders($image_nids) . ')';
   if ($filtered) {
-    $sql .= ' && WHERE n.status = 1';
+    $sql .= ' AND n.status = 1';
   }
   $images = array();
   $result = db_query($sql, $image_nids);
