List:General Discussion« Previous MessageNext Message »
From:Ravi Kumar. Date:November 14 2007 1:04pm
Subject:Re: SQL query problem
View as plain text  
Dear Mat,

Your mail is not very clear. But I have a feeling that using '%' wildcard in
the like operand should help you....



On 11/14/07, Matthew Stuart <mrs@stripped> wrote:
> Hi, I have built a site with Dreamweaver and I have a problem with a
> query.
> I am trying to pass a parameter from one page to another to drill
> down. Basically, I have one product entry that is in multiple
> categories on my website. So, say it's a dress, it is therefore
> related to category 1 which is 'Girls', but it is also more
> specifically related to category 2 which is 'Girls Dresses'.
> The way I have set this up is to have a column called MultiCategoryID
> that holds both the number 1 and 2 like this: /1/2/
> When a user clicks a link to look at dresses, the parameter 2 is
> passed, but my query on the result page is wrong in some way because
> no records are displaying even though there is content to display.
> This is what I have so far:
> FROM Products
> WHERE MultiCategoryID LIKE '/catdrill/'
> The parameter settings are:
> Name: catdrill
> Type: Numeric
> Value: Request("MCID") MCID is the url parameter being passed
> Default value: 2
> Only when I test the Default value with an exact match of /1/2/ does
> any product display. What have I done wrong here? Is there a way to
> get it to recognise that I want it to pick specific numbers between
> the slashes rather than the whole lot? I have tried to change the
> slashes to full stops just in case they are causing problems, but
> it's still giving the same problem.
> Thanks.
> Mat

SQL query problemMatthew Stuart14 Nov
  • Re: SQL query problemRavi Kumar.14 Nov