It seems like MyODBC  (or ODBC in general ?) cannot accept user variables.
The following query works OK when quering directly through the API but doesnt work via 
MyODBC

Any suggestions to some workaround allowing the use of user variables???

SELECT id, 
@s:="<lang lang=da>",
@o:=objekter.overskrift,
@p0:=POSITION(@s IN @o),
@l:=length(@s),
if (@p0=0, 
        @p1:=POSITION("<lang lang=" IN @o),
        @p1:=LOCATE("</lang>",@o,@p0+@l)
    ),
if (@p0=0, 
        if (@p1=0,@o,LEFT(@o,@p1)),
        SUBSTRING(@o,@p0,@p1-@p0)
    ) AS overskrift , ... and a lot more...

It's testet with windows MyODBC-version 2.50.27 in an delphi-application using 
modbc-component.

klavs




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to