[Zope] Problem when using Z SQL Method and URL named field
Norman Khine
soraya@o-a-l.net
Sun, 25 Nov 2001 23:50:43 -0000
Hello,
I don't know what/ and if this is correct, but perhaps somebody can check
for me. I have a MySQL database connection with ZMySQLDA, and have the
following table.
CREATE TABLE BusinessName (
BusID int(11) DEFAULT '0' NOT NULL auto_increment,
BusinessName varchar(40),
CompanyInfo text,
NoEmployees int(11),
Turnover int(11),
URL varchar(35),
Status int(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (BusID)
)
Here is my Z SQL Method
insert into BusinessName
(BusinessName, CompanyInfo, NoEmployees, Turnover, URL, Status)
values
('<dtml-var BusinessName>',
'<dtml-var CompanyInfo>',
'<dtml-var NoEmployees>',
'<dtml-var Turnover>',
'<dtml-var URL>',
'<dtml-var Status>')
The problem is that URL appends the path of where the object is based, to
the url address I type, so that I get this:-
SQL used:
insert into BusinessName
(BusinessName, CompanyInfo, NoEmployees, Turnover, URL, Status)
values
('dfsfdfs',
'dsfsdfasf',
'12',
'1',
'http://this-address.net//Tutorials/Zope_MySQL/methods/insert2/manage_test',
'1')
So how do I resolve this? Without having to rename the field name.
Thanks
Norman
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zz/********/z/****\zzz|****\*\zz|*******|z
z/^^^^^^^^/z/******\zz|*^^^^|*|z|*|^^^^^|z norman khine
zzzzzz/**/z|**/^^\**|z|*|zzz|*|z|*|zzzzzzz mailto:norman@khine.net
zzzzz/**/zz|*|zzzz|*|z|****/*/zz|*****|zzz purley
z/******/zz|*|zzzz|*|z|*|^^zzzzz|*|^^^|zzz UK
zzZ/**/zzzz|**\^^/**|z|*|zzzzzzz|*|zzzzzzz
zz/******/zz\******/zz|*|zzzzzzz|*|*****|z
z/^^^^^^/zzzz\^^^^/zzz|^|zzzzzzz|^^^^^^^|z
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz