Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv][SOLVED??] MV4beta2 SQL "LIKE" not working



******    message to minivend-users from "Christian J. Müller" <chm@polinet.ch>     ******

Here are the changes I made to make it work.
Be aware that I am not a perl programmer and therefore the changes need
to be checked by some competent person (hopefully MikeH).
Specially change no 2 is dangerous, since I do not know what &$f() is
doing, but commenting it out helped!
Also, I have only tested it with a simple SQL query as in my original
posting.

Change no 1
In Search.pm I added after line 267 another elsif loop identical to the
one between line 267 and 277 except for :

Line 1 of the loop reads now: 
	elseif ($s->{mv_column_op}[$i] =~ /^(like)$/i) {
and Line 9 of the loop reads now:
	$spec = $s->{mv_search_field}[$i] . "LIKE $spec";

Change no 2:
approx. Line 230 I have commented out:
	next unless &$f();

Pls forgive this unprofessional patch info, but I am temporarily working
under difficult situation (holiday, no network, notebook).

I am prepared to receive any comment, even to keep my nose out of MV
code!

Chris

  

Chris Müller wrote:
> 
> ******    message to minivend-users from "Chris Müller" <cjmueller@polinet.ch>     ******
> 
> When I replace
> [search-region more=1 search="
>         st=sql
>         sq=select * from protucts where field = 'xyz'
> "]
> by
> [search-region search="
>         st=sql
>         sq=select * from protucts where field LIKE 'xyz%'
> "]
> the mySQL log shows an entry of "select * from products"
> whereas the first varoiiant works fine.
> 
> The same SQL statement works in [query sql="select * from products where
> field LIKE 'xyz%'], however, I cannot figure out who the [more-list]
> works in the [query ..] as it was announced in the WHATSNEW. There is no
> detail on how to use it.
> 
> The chapter on SQL searches (not text-based) has disappeared from the
> documentation and I cannot find how to set up a form-based SQL search
> that accesses the SQL db in MV4.
> Is there going to be some additional documentation for SQL?
> 
> Mike, as I understand from your earlier posting, you are still improving
> the SQL environment. Is this one of the issues you are planning to
> address, too?
> 
> Chris
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: