[Zope] Problem on searching the record

Angietel angietel@hotmail.com
Mon, 8 Jan 2001 17:16:39 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C07996.C35BC300
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The following is my sql method, it can return result even i only enter =
one alphabet in custname but it can't work when i enter data into the =
custid.


select *
from customer
where
custid=3D'<dtml-var custid>'
OR
custname LIKE "%<dtml-var custname>%"


P/s let me know where is my error.TQ


------=_NextPart_000_0005_01C07996.C35BC300
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>The following is my sql method, it can =
return=20
result even i only enter one alphabet in custname but it can't work when =
i enter=20
data into the custid.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>select *<BR>from=20
customer<BR>where<BR>custid=3D'&lt;dtml-var =
custid&gt;'<BR>OR<BR>custname LIKE=20
"%&lt;dtml-var custname&gt;%"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>P/s let me know where is my=20
error.TQ<BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0005_01C07996.C35BC300--