[ic] SQL query error (SOLVED)

Interchange User interchange-users@icdevgroup.org
Thu Jul 18 13:52:01 2002


On Wednesday 17 July 2002 11:54, you wrote:
> > -----------------------------------------------------------------
> >------------------------- trial /store/trial/ord/receipt.html Bad
> > SQL statement: Parse error near <WPDISPLAY ITEM=cartId>
> >      at /usr/local/interchange/lib/Vend/Scan.pm line 585.
> >
> > Query was: update transactions set wp_payment_status = 'Success'
> > where code = <WPDISPLAY ITEM=cartId>
> > -----------------------------------------------------------------
> >-------------------------

[snip]

> You need quotes round the <WPDISPLAY ITEM=cartId> string, as
> unquoted strings are expected to be integers.  The dump of the
> original query in the error.log is supposed to help you spot that
> sort of thing.

I did add the quotes, tested with and without quotes, and the errors 
are the same.

Finally solved the problem  :)  For the benefit of those using 
WorldPay and facing similar problems, <WPDISPLAY ITEM=cartId> is just 
for WorldPay to display the values on the html page.  To "use" the 
values (for eg, in sql statements), we have to either use 

[cgi cartId] 

or 

[update values] 
[value cartId]

Sounds so simple, but it was undocumented by WorldPay, as they 
claimed it's an advance feature.  The documented part told us to use 
<WPDISPLAY ITEM=cartId>  :(


Kevin, thank you so much for your help!  I've seen how helpful you've 
been, and taking this opportunity to thank you, as well as the rest 
of the guys, for every advise/tips!  :)