Gossamer Forum
Home : Products : DBMan : Discussions :

Can DBMan do this?

Quote Reply
Can DBMan do this?
This is obviously a very good product. I have a very small database, but need to be able to do a couple of things which may be considered complex.

I need to be able to choose multiple items in a select box. I see that this is possible, but only with control>mouse click. Is that correct?

Also, I have product categories which have price ranges:
Product A might have a range of $90 to $120
Product B $100 to $150 and
Product C $130 to $170

When a search is done for a $150 product I need to have B and C both come up. If a search is done for a $110 product I need to have A and B both come up. Can DBMan compare the min and max price for each product category and return a result if the requested number falls somewhere in between? Or is there another way? My database is so small I can change the fields to work in whatever way works best.

Can I do this with DBMan?

Thank You!
Kathleen

Quote Reply
Re: Can DBMan do this? In reply to
In Reply To:
I need to be able to choose multiple items in a select box. I see that this is possible, but only with control>mouse click. Is that correct?
Yes...and there is a Multiple Field Select code hack ("modification") in the Resource Center in the DBMAN: Modifications section.

In Reply To:
Can DBMan compare the min and max price for each product category and return a result if the requested number falls somewhere in between?
Yes...there is a Price Range search code hack ("modification") in the Resource Center in the same section mentioned above and also linked in the DBMAN Customization Forum.

In Reply To:

Can I do this with DBMan?
YES...if you apply the above code hacks ("modifications").

Wink

Regards,


Eliot Lee
Quote Reply
Re: Can DBMan do this? In reply to
Hi Eliot,
Thanks for your reply. I had read the info on both of the mods, but it seems the price range one refers to the 'select' fields not the database fields. Am I reading it right?

I think what I want would require an AND operator in SQL.

Example: Say a user wants a home for $140k. My database has one home development with prices between $120k and $150k and another development with prices between $130k to $160k. I have one database field for the high number and one for the low number of the development's price range. I need the search to check that the number input ($140k) is higher than the minimum number AND lower than the maximum number of each development in order to return a result. In this example both of these developments would be returned.

So what I am looking for is the ability to search two fields one for greater than or equal to and the other for less than or equal to - or something that would work similarly.

It seemed like a simple enough thing when I started doing research, but it has been not so easy to find. I am hoping DBMan can do this.

Kathleen ~~~


Quote Reply
Re: Can DBMan do this? In reply to
Using the regular expression option you can do this...

Low Field:

> 140

High Field:

< 160

with re being on with the following options:

1) Hidden Field:

Code:

<input type="hidden" name="re" value="on">


2) Checkbox

Code:

<input type="checkbox" name="re" value="on"> Price Range On


Note: Price Range On is better than stating "Regular Expression" for end users.

You can also include > and < signs as "default" values in the low and high price fields.

Of course, the easier solution is to have ONE price field and then the Price Range search code hack WOULD work.

Wink

Regards,



Eliot Lee
Quote Reply
Re: Can DBMan do this? In reply to
My "price range" mod wouldn't do what you want it to do. You would have to do some coding, but it could be done. Also, I don't think the Multiple Fancy Select Field MOD v.2.0 is what you want to use, either. There is a simpler mod for using multiple select fields.

Yes, you do have to use ctrl-mouse click to select multiple items in a select field. This doesn't have anything to do with DBMan. It's just the way forms work.




JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Can DBMan do this? In reply to
This is over my head at this point. But, it is reassuring to know it will work. Is there somewhere I can read more about the options available? I can't seem to find a comprehensive manual for DBMan. Is there one?

I would love to have one price field, but I can't think of a way to do it. I am dealing with home developments where homes within each neighborhood can have a wide price range. One neighborhood may run from 80,000 to 130,000, another 110,000 to 150,000. So whether the viewer chooses a minimum price and a maximum price, or just a maximum price or even a price range like 115,000 to 125,000, I haven't yet figured out a way that will work.

But, I'm still trying. So far DBMan seems to be my best best, but having to do additional coding is over my head at this point.

Thanks, Kathleen

Quote Reply
Re: Can DBMan do this? In reply to
Thanks for your reply and thanks to you and the others who devote so much of your time answering the questions.

I would like to learn more about doing the coding - I'm pretty good at picking thing up if there is good documentation. Is there a resource for that? I may be in over my head, but I haven't seen anything else that is both easy and that will do what I want, so I am willing to learn.

Can you tell me where that simpler multiple selct mod is? I didn't see it in the mod section.

Thanks, Kathleen ~~~

Quote Reply
Re: Can DBMan do this? In reply to
The other multiple select subroutine isn't in the Resource Center as yet. I've been trying to work on a comprehensive mod for all types of select fields, but I just haven't had the time to get it done.

I found a previous post where I gave the subroutine. I hope you don't mind going to it, but I just can't bear to write it out again. Smile It's at http://www.gossamer-threads.com/...=&vc=1#Post83290 Just ignore the first three lines or so of the post.

A comprehensive manual on DBMan? No, not yet. That's another thing I'm working on. At the moment, there is a tutorial for installing the script on my site, the URL of which is below my signature. But the comprehensive one is going to take some time.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Can DBMan do this? In reply to
Thank you!
Now I need to go do some studying to see if I can put this all together :)
Kathleen ~~~

Quote Reply
Re: Can DBMan do this? In reply to
Kathleen
Did you get the price range thing figured out, if so could you help me out I got the same problem you had back in June.
I am dealing with home developments where homes within each neighborhood can have a wide price range. One neighborhood may run from 80,000 to 130,000, another 110,000 to 150,000. So whether the viewer chooses a minimum price and a maximum price, or just a maximum price or even a price range like 115,000 to 125,000, I haven't yet figured out a way that will work.

Thanks Frank