SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    Washington
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating a search form

    I need help in creating a search form that will search a db table and display the result. I want to search the table by types OR states OR country AND by types AND states AND country. I will appreciate any help I can get from this forum.

    Below is the table dump:

    #
    # Table structure for table 'accounts'
    #

    CREATE TABLE accounts (
    id int(11) NOT NULL default '0',
    dayPhone varchar(20) default NULL,
    evenPhone varchar(20) default NULL,
    startDate text,
    types varchar(20) NOT NULL default '',
    states varchar(20) default NULL,
    country varchar(30) default NULL,
    residence enum('formal estate','informal estate') default 'formal estate',
    age enum('18-30','31-45','over 45') default '31-45',
    gender enum('male','female') default 'female',
    living enum('live-in','live-out') default 'live-out',
    schedule enum('weekly','bi-weekly','semi-weekly','monthly') default 'bi-weekly',
    education enum('some high school','high school','some college','college','vocational school') default 'high school',
    description text,
    PRIMARY KEY (id)
    ) TYPE=MyISAM;



    #
    # Dumping data for table 'accounts'
    #

    INSERT INTO accounts VALUES("1", "33333333", "444444444", "5/30/2005", "nanny", "Florida", "Bolivia", "formal estate", "18-30", "male", "live-in", "weekly", "some high school", "excellent");

  2. #2
    SitePoint Zealot CdeMky's Avatar
    Join Date
    Sep 2004
    Location
    United States
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to clarify, do you want help in creating the actual form or do you want help in implementing a search using the database tables/data that you have provided via php etc. ?

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    Washington
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you CdeMky.
    Yes I need help to create a search form using the table schema above.


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
  •