=== modified file 'modules/panels/panels.install'
--- modules/panels/panels.install       2007-09-29 21:59:00 +0000
+++ modules/panels/panels.install       2007-09-29 22:24:41 +0000
@@ -5,38 +5,38 @@
  * Install the panels tables
  */
 function panels_install() {
-  switch ($GLOBALS['dbtype']) {
+  switch ($GLOBALS['db_type']) {
     case 'pgsql':
       db_query(<<<EOT
         CREATE TABLE {panels_info} (
-          did int not null default 0 primary key,
+          did integer NOT NULL DEFAULT 0,
           title varchar(128),
           access varchar(128),
           path varchar(128),
           css_id varchar(128),
-          layout varchar(32)
+          layout varchar(32),
+          PRIMARY KEY (did)
         );
 EOT
       );
-      
+
       db_query("CREATE SEQUENCE {panels_info}_id_seq;");
   
       db_query(<<<EOT
         CREATE TABLE {panels_area} (
-          did int NOT NULL DEFAULT 0,
+          did integer NOT NULL DEFAULT 0,
           area varchar(32),
           type varchar(32),
           configuration text,
-          position int
+          position integer
         );
 EOT
-  );
+      );
   
       db_query("CREATE INDEX {panels_area}_did_idx ON {panels_area} (did);");
       break;
     case 'mysql':
     case 'mysqli':
-    default:
       db_query(<<<EOT
         create table {panels_info} (
           did int(10) not null default 0 primary key,
@@ -58,7 +58,8 @@
           key (did)
         ) /*!40100 DEFAULT CHARACTER SET utf8 */
 EOT
-  );
+      );
+      break;
   }
 }
 

=== modified file 'modules/panels/panels.module'
--- modules/panels/panels.module        2007-09-29 21:59:00 +0000
+++ modules/panels/panels.module        2007-09-29 22:29:16 +0000
@@ -840,7 +840,7 @@
  */
 function panels_node_autocomplete($string) {
   if ($string != '') { // if there are node_types passed, we'll use those in a MySQL IN query.
-    $result = db_query_range(db_rewrite_sql('SELECT n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE LOWER(title) LIKE LOWER("%%%s%%")'), $string, 0, 10);
+    $result = db_query_range(db_rewrite_sql("SELECT n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE LOWER(title) LIKE LOWER('%%%s%%')"), $string, 0, 10);
     $prefix = count($array) ? implode(', ', $array) .', ' : '';
 
     $matches = array();
