03262006 1743 GMT-6

Lets say Im in the (pretend) lawn and garden section
and Im clicking on the new Blade Widget. Your
saying that the Blade Widget might also be in the
Tools section and the Wood Working section as well.

If the above is true, the what about this: If they are
in the lawn and garden section and that section is
say 13, then the <a href="catalog.php?cat=1&subcat=13">
Widget</a>.  But if they were in the tools area then it
would be <a href="catalog.php?cat=2&subcat=2">Tool
Widget</a>.

Can you do it like that? The url would show if they clicked
from a certain area of the site, then the category would
show that in the link, even if it is the same item.

Wade


Bob Sawyer wrote:

>I'm in dire need of assistance -- the site I'm working on is one that
>I've "inherited" from another developer and have been cleaning up his
>code (orignally done in ASP.net) and converting to PHP.
>
>Anyway -- it's a product catalog, and each product is allowed to be in
>multiple categories. The "categories" field in the DB is of type "TEXT"
>and if there is more than one category for the item to be in, they're
>held on separate lines, like such:
>
>4
>2
>13
>
>and so forth. The products are listed on the page depending on the
>links clicked. So:
>
><a href="catalog.php?cat=1&subcat=2">Widgets</a>
>
>would show the "Widgets" subcategory under whatever main category it's
>listed in. But let's say a particular Widget is also allowed to be in
>categories 4 and 13 (see list above). I can't say "select * from
>products where cat = '1' and subcat contains '2'" because MySQL doesn't
>have a "contains" modifier to a SELECT statement.
>
>I tried the "in" modifier, but kept getting an SQL error:
>
>"select * from products where cats = '1' and '2' in subcats"
>
>Any ideas?
>
>Thanks,
>-Bob
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>
>Community email addresses:
>  Post message: php-list@yahoogroups.com
>  Subscribe:    [EMAIL PROTECTED]
>  Unsubscribe:  [EMAIL PROTECTED]
>  List owner:   [EMAIL PROTECTED]
>
>Shortcut URL to this page:
>  http://groups.yahoo.com/group/php-list 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>


Community email addresses:
  Post message: php-list@yahoogroups.com
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to