MantisBT - Piwigo
View Issue Details
0001763Piwigodatabasepublic2010.07.05 20:472010.07.05 23:19
madman 
nikrou 
normalminoralways
closedfixed 
PostgresqlCentOS 5.4Postgresql 8.4.2
2.1.2 
2.1.3 
Mozilla
Postgresql 8.4.2
5.3.2
Apache 2.2.3
0001763: [PostgreSQL] double quote used in queries
PostgreSQL handles strings with double qoutes as tables/columns, use single quotes instead.

See the documentation for more detail: http://www.postgresql.org/docs/8.4/interactive/sql-syntax-lexical.html [^]

This error is in the query on line 262 of include/section_init.inc.php

Other possible errors:
admin/include/functions.php:297: WHERE data LIKE "pwg_uid|i:'.(int)$user_id.';%"
admin/include/functions_permalinks.php:50: WHERE op.permalink="'.$permalink.'"
include/functions_search.inc.php:396: $clauses[] = $field.' LIKE "'.$before.addslashes($tokens[$i]).$after.'"';
include/functions_search.inc.php:437: $where_clauses='MATCH(i.name, i.comment) AGAINST( "'.$q.'" IN BOOLEAN MODE)';
include/functions_search.inc.php:455: MATCH(i.name, i.comment) AGAINST( "'.$q.'" IN BOOLEAN MODE) AS weight
include/functions_category.inc.php:409: $in .= '"'.$permalink.'"';
install/db/65-database.php:166: $query = 'SHOW TABLES LIKE "'.$prefixeTable.'%"';
install/db/65-database.php:268: UPDATE '.USER_INFOS_TABLE.' SET language="'.$lang_data['new_lang'].'"
install/db/65-database.php:269: WHERE language="'.$old_lang.'"';
install/db/65-database.php:279: pwg_query('SET NAMES "'.DB_CHARSET.'"');
install/db/34-database.php:37:DELETE FROM '.PREFIX_TABLE.'config WHERE param="active_plugins"';
install/db/34-database.php:43: `state` enum("inactive","active") NOT NULL default "inactive",
plugins/LocalFilesEditor/update_config.php:40:SET value = "' . $_POST['editarea'] . '"
plugins/LocalFilesEditor/update_config.php:41:WHERE param="LocalFilesEditor"
Warning: pg_query() [function.pg-query]: Query failed: ERROR: column "1,%" does not exist LINE 5: uppercats LIKE "1,%" ^ in /var/www/sites/fotos.aarjan.nl/piwigo/piwigo_svn/include/dblayer/functions_pgsql.inc.php on line 122
SELECT id FROM piwigo_categories WHERE uppercats LIKE "1,%"
ERROR: column "1,%" does not exist LINE 5: uppercats LIKE "1,%" ^
No tags attached.
Issue History
2010.07.05 20:47madmanNew Issue
2010.07.05 20:47madmanbrowser => Mozilla
2010.07.05 20:47madmanDatabase engine and version => Postgresql 8.4.2
2010.07.05 20:47madmanPHP version => 5.3.2
2010.07.05 20:47madmanWeb server => Apache 2.2.3
2010.07.05 22:55nikrouStatusnew => assigned
2010.07.05 22:55nikrouAssigned To => nikrou
2010.07.05 23:18svnCheckin
2010.07.05 23:18svnNote Added: 0004030
2010.07.05 23:18svnCheckin
2010.07.05 23:18svnNote Added: 0004031
2010.07.05 23:19nikrouStatusassigned => closed
2010.07.05 23:19nikrouResolutionopen => fixed
2010.07.05 23:19nikrouFixed in Version => 2.1.3

Notes
(0004030)
svn   
2010.07.05 23:18   
[Subversion] r6664 by nikrou on trunk

-----[Subversion commit log]----------------------------------------------------
Bug 1763 fixed : [PostgreSQL] double quote used in queries
(0004031)
svn   
2010.07.05 23:18   
[Subversion] r6665 by nikrou on branch 2.1

-----[Subversion commit log]----------------------------------------------------
Bug 1763 fixed : [PostgreSQL] double quote used in queries
Merge from trunk