Results 1 to 3 of 3

Thread: Dreamweaver / Search Help

  1. #1
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dreamweaver / Search Help

    Hi, I've been a couple of simple shopping sites through Dreamweaver.

    One feature all products - www.drinkemporium.com - the other just a selection of products (one kind) - www.vodkaemporium.com.

    At the moment, the two sites use separate databases, with the vodka stuff duplicated in its own db. I'd like to combine both sites to use a single db.

    However, I've hit a problem. Both sites use a simple search engine. How do I set the vodka site to only search the vodka products in my db? Product types are set by an entered value in one of the db columns.

    My SQL code looks like this:

    SELECT *
    FROM drinkemporium
    WHERE Name LIKE CONCAT('%', colname, '%') OR Description LIKE CONCAT('%', colname2, '%')

    I need to add another criteria telling it to only search results where Type = X and not Y or Z.

    Can anyone help?

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    just add to the where clause

    Code:
    SELECT * FROM `drinkemporium` WHERE (`Name` LIKE CONCAT('%', colname, '%') OR `Description` LIKE CONCAT('%', colname2, '%')) AND `Type`='X'

  3. #3
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi,
    Does anybody have a shopping cart script that can be used to create an online shopping website.

    I'm a novice and do not know how to write code but am interested in web creation as a personal hobby.

    Any help will be much appreciated.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •