Menu

#26 Error related to field itemId

open
nobody
None
5
2014-08-28
2009-03-01
VidarVevik
No

In RequestId 1967188, siliconfiend write that field ItemId has changed from int to varchar. I think this can be related too the error I recive when pressing link "Show a google map".

System Information
------------------
Gallery version 2.3
PHP version 5.2.6-3 apache2handler
Webserver Apache
Database postgres7 8.3.5 3 8.3.6
Toolkits ImageMagick, Thumbnail, SquareThumb, NetPBM, Gd
Operating system Linux verden 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6

Google Map Module Version 0.5.8

This SQL return an error:
-------------------------

SELECT g2_mapMap.g_itemId, g2_mapMap.g_value FROM g2_mapMap, g2_AccessSubscriberMap WHERE g2_mapMap.g_field = 'GPS' AND SUBSTRING(g2_mapMap.g_itemId,1,1) <> 'G' AND g2_AccessSubscriberMap.g_itemId = g2_mapMap.g_itemId AND g2_AccessSubscriberMap.g_accessListId in (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [ (0=>'8614') (1=>'8880') (2=>'8883') (3=>'8884') (4=>'8885') (5=>'8886') (6=>'8888') (7=>'8889') (8=>'8890') (9=>'8891') (10=>'8892') (11=>'8893') (12=>'8894') (13=>'8895') (14=>'8896') (15=>'8897') (16=>'8898') (17=>'8899') (18=>'8900') (19=>'8901') (20=>'8902') (21=>'8903') (22=>'8904') (23=>'9061') (24=>'9153') (25=>'9222') (26=>'9223') (27=>'9224') (28=>'9225') (29=>'9226') (30=>'9227') (31=>'9228') (32=>'9229') (33=>'9230') (34=>'9231') (35=>'9232') (36=>'9233') (37=>'9234') (38=>'9235') (39=>'9236') (40=>'9237') (41=>'9238') (42=>'9239') (43=>'9240') (44=>'9241') (45=>'9242') (46=>'9244') (47=>'9348') (48=>'9349') (49=>'9350') (50=>'9351') (51=>'9352') (52=>'9353') (53=>'9354') (54=>'9355') (55=>'9356') (56=>'9357') (57=>'9358') (58=>'9359') (59=>'9360') (60=>'9361') (61=>'9362') (62=>'9363') (63=>'9364') (64=>'9365') (65=>'9366') (66=>'9367') (67=>'9368') (68=>'9369') (69=>'9370') (70=>'9371') (71=>'9372') (72=>'9373') (73=>'9374') (74=>'9375') (75=>'9376') (76=>'9377') (77=>'9378') (78=>'9379') (79=>'9380') (80=>'9381') (81=>'9382') (82=>'9383') (83=>'9384') (84=>'9385') (85=>'9386') (86=>'9387') (87=>'9388') (88=>'9389') (89=>'9390') (90=>'9391') (91=>'9392') (92=>'9393') (93=>'9394') (94=>'9395') (95=>'9396') (96=>'9397') (97=>'9398') (98=>'9400') (99=>'9457') (100=>'9502') (101=>'9967')]

Error:
------
Warning: pg_query_params() [function.pg-query-params]: Query failed: ERROR: operator does not exist: integer = character varying LINE 10: g2_AccessSubscriberMap.g_itemId = g2_mapMap.g_itemId ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. in /usr/share/php/adodb/drivers/adodb-postgres7.inc.php on line 162
-1: ERROR: operator does not exist: integer = character varying LINE 10: g2_AccessSubscriberMap.g_itemId = g2_mapMap.g_itemId ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts

My analysis:
------------

It looks like field g2_AccessSubscriberMap.g_itemId of type int and g2_mapMap.g_itemId is of type varhar. This SQL will be valid if it is changed to

SELECT g2_mapMap.g_itemId, g2_mapMap.g_value FROM g2_mapMap, g2_AccessSubscriberMap WHERE g2_mapMap.g_field = 'GPS' AND SUBSTRING(g2_mapMap.g_itemId,1,1) <> 'G' AND cast(g2_AccessSubscriberMap.g_itemId as varchar) = g2_mapMap.g_itemId AND g2_AccessSubscriberMap.g_accessListId in (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

Keep on with this nice module

Discussion


Log in to post a comment.