VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 A "shopquery.asp" question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gene
Starting Member

10 Posts

Posted - March 13 2004 :  01:13:08  Show Profile  Reply with Quote
I need to list all the products with the weight of more than 1. How do I do that?
shopquery.asp?weight=6 works for an exact number (6), but what about the rest?

TIA!
Gene

ouresolutions
Starting Member

Australia
45 Posts

Posted - March 13 2004 :  13:46:56  Show Profile  Visit ouresolutions's Homepage  Reply with Quote
Hi Gene,
If you want products with a weight greater than 1 then I suggest you try "weight>1". If you want products with a weight of 1 or greater, then I would try either "weight>=1" or "weight=>1" - I seem to remember it is a combination of the equals and > sign but I am not sure of the order. A quick test will at least resolve for you either way.

Graeme

-------------------------
Our eSolutions
www.ouresolutions.com.au
Go to Top of Page

gene
Starting Member

10 Posts

Posted - March 13 2004 :  14:47:17  Show Profile  Reply with Quote
Thanks Graeme,
That exactly is my question, the obvious "shopquery.asp?weight>6" does not work. It returns ALL products, regardless of weight.

Nice try...
Gene

Go to Top of Page

gene
Starting Member

10 Posts

Posted - March 13 2004 :  14:50:25  Show Profile  Reply with Quote
Oooops...
I meant to say "shopquery.asp?weight>1" does not work.
(I wrote "6" instead of "1" in my last reply)

Gene

Go to Top of Page

Cam
VP-ASP Super User

Australia
361 Posts

Posted - March 13 2004 :  20:04:59  Show Profile  Visit Cam's Homepage  Reply with Quote
Hi Gene,

I asked VPASP support this one myself and they came back with the following:

Weight is a text field in VP-ASP and you are asking for a numeric < which will not work

Hope this provides some more info into the issue.

Cheers,
Cam

*************************************
Cam Flanigan
YourVirtualStore Sales
e-mail:
http://www.vpasp.com/sales/shopcustcontact.asp
web: http://www.yourvirtualstore.net

Build you own YourVirtualStore!!!
www.yourvirtualstore.net
*************************************
Go to Top of Page

siraj
VP-ASP New User

USA
194 Posts

Posted - March 13 2004 :  22:37:05  Show Profile  Visit siraj's Homepage  Reply with Quote
The theorically
shopquery.asp?weight>=1 should work but as support mail to Cam, it should not work. As weight is varchar(20).
You can try change that field to decimal/numeric and try it. I dont know what could be the knock off effect by changing the weight field.
GOOD LUCK.
SJ

[email protected]
Go to Top of Page

gene
Starting Member

10 Posts

Posted - March 14 2004 :  01:40:25  Show Profile  Reply with Quote
I've changed the type to integer and it still doesn't work. Neither
"shopquery.asp?weight>1" nor "shopquery.asp?weight>=2" (which should provide the same result). Either one returned the full listing.
I am lost...
Any other ideas?

Gene

Go to Top of Page

support
Administrator

4266 Posts

Posted - March 15 2004 :  02:10:13  Show Profile  Visit support's Homepage  Reply with Quote
Here is a small asp program thatwill do what you want. Youi cannot pass mathematical operators in a querystring (to best of my knowledge). All the file shopweight.asp (or anything you wish)
Pass weight as a form or querystring

shopweight.asp?weight=5


<!-- #include file="shop$db.asp" -->
<%
weight=request("weight")
If weight="" then weight=5
sql="select * from products where hide=0 and weight<=" & weight
setsess "sql", sql
response.redirect "shopdisplayproducts.asp?search=yes"
%>

This technique can be used essentially for any unique SQL generation

VP-ASP Support

Go to Top of Page

gene
Starting Member

10 Posts

Posted - March 15 2004 :  08:10:15  Show Profile  Reply with Quote
Great! Thank you!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000