
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] [more] / [more-list] Alpha Numeric
Brian Kosick <briank@nacs.net> writes:
> <snip>
>
>
> >I think if you add:
> >
> > mv_sort_field=name
> >
> >it might work. I don't believe I have ever tried this one, Racke
> >might have.
>
> [query list=1 ml=50 more=1 st=db ma=yes mc=1
> rf=code,name,short_desc,price,qty,new_plant,disc tf=name sql=|
> SELECT p.code, p.name, p.short_desc,
> p.price, p.qty, p.new_plant, p.avail,
> p.disc
> FROM products AS p, zip_zone AS z
> WHERE z.zip = '[value search_zip]'
> AND p.zones ~ z.zone
> AND p.disc != '0'
> ORDER BY p.name;
> |
> ]
>
> gives an internal server error, and the error log entry looks like
>
> [09/October/2001:12:33:05 -0400] bluestone
> /cgi-bin/bluestone.cgi/process.html Runtime error: Can't call method
> "search_error" on unblessed reference at
> /usr/lib/interchange/lib/Vend/Search.pm line 994.
I think no one tried it yet and you definitely found a bug. A first
fix to Interpolate.pm which should work with the above query:
diff -u -r2.9.2.2 -r2.9.2.3
--- Interpolate.pm 2001/10/07 12:56:32 2.9.2.2
+++ Interpolate.pm 2001/10/09 19:23:36 2.9.2.3
@@ -5327,6 +5327,11 @@
if($opt->{ma}) {
# Find the sort field and alpha options....
Vend::Scan::parse_profile_ref($object, $opt);
+ # Contents of mv_return_fields must be of the same type
+ # (numeric here) as the contents of mv_sort_field
+ @{$object->{mv_return_fields}} = map {$nh->{$_}} @{$object->{mv_return_fields}};
+ # We need to turn the hash reference into a search object
+ $object = new Vend::Search (%$object);
# Delete this so it will meet conditions for creating a more
delete $object->{mv_matchlimit};
}
But don't nail me on this. We have to take to look closer at it,
anyway.
Ciao
Racke
--
Racke happily hacks Interchange and maintains Debian packages like Courier.
For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users