SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot trigger8's Avatar
    Join Date
    Nov 2000
    Location
    Dallas, TX
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search All Categories

    I have the following tables in a database. How do I run a search in all the columns at once? I've no problem creating a search against a particular table, but how do I make a 'search all' function?

    -----------
    News
    -----------
    id
    heading
    Topic
    Frequency
    fk

    -----------
    Entertainment
    -----------
    id
    heading
    Topic
    Frequency
    fk
    Trigger8

    **************************
    I killed a 6-pack just to watch it die!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should start by combining those two tables with an extera field for the type, News or Entertainment. Instead of storing the records in two different tables. Then you should have no problem at all searching all records. You see the whole point of a database is to make life easier, you have made life harder on yourself by making separate tables for this type of data storage.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •