Changeset 858
- Timestamp:
- 01/30/07 22:31:43 (2 years ago)
- Files:
-
- trunk/upload/admin_maintenance.php (modified) (2 diffs)
- trunk/upload/admin_ranks.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/upload/admin_maintenance.php
r64 r858 53 53 confirm_referrer('admin_maintenance.php'); 54 54 55 $truncate_sql = ($db_type != 'sqlite' ) ? 'TRUNCATE TABLE ' : 'DELETE FROM ';55 $truncate_sql = ($db_type != 'sqlite' && $db_type != 'pgsql') ? 'TRUNCATE TABLE ' : 'DELETE FROM '; 56 56 $db->query($truncate_sql.$db->prefix.'search_matches') or error('Unable to empty search index match table', __FILE__, __LINE__, $db->error()); 57 57 $db->query($truncate_sql.$db->prefix.'search_words') or error('Unable to empty search index words table', __FILE__, __LINE__, $db->error()); … … 66 66 67 67 case 'pgsql'; 68 $result = $db->query('SELECT setval(\' search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $db->error());68 $result = $db->query('SELECT setval(\''.$db->prefix.'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $db->error()); 69 69 } 70 70 } trunk/upload/admin_ranks.php
r125 r858 82 82 83 83 // Make sure there isn't already a rank with the same min_posts value 84 $result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' &&min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error());84 $result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' AND min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error()); 85 85 if ($db->num_rows($result)) 86 86 message('There is already a rank with a minimun posts value of '.$min_posts.'.');
