55 users online (1 members and 54 guests)  

Thread: database search


Page 1 of 2 1 2 Last
  Results 1 to 15 of 16

Related

  1. How to Decode the data from Database using database handler?    Forum: Search Engine Optimization - SEO - Forum
    Replies: 1
  2. search access database    Forum: ASP Forum
    Replies: 1
  3. database programming without database????    Forum: Javascript Forum
    Replies: 3
  4. Database    Forum: Website Scripts Forum
    Replies: 14
  5. database search    Forum: HTML Forum
    Replies: 15
  1. #1
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    database search

    I know this may take a bit of explaining but help would be appreciated:

    I want to create a "site search engine" for my site, using php and mysql. But I'm a little lost with the mysql part. While starting to get php is one thing, but I don't know too much about mysql. I can do simple things but that's it. I'd like to have them type in what they're looking for in my site, and have the "search engine page" come up with pages on my site that match what they typed in. If possible I'd like the search to be more "precise", so as lets say they type in "html", a half the pages on my site don't show up like on a lot of site searches I've seen.

    I have my database made and I'm ready to make my table and I'm confused from there.

    All right, I've stated what I'd like to see done, but you only have to just help me out with what you can, any assistence at all would be helpful. Hopefully I can get this thing figured out.

    Thanks in advance

  2. #2
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    wait...

    my database isn't actually "made" I just opened up phpMyAdmin and named a database and named a table but haven't done anything besides that. I'm checking the mysql manual but it doesn't seam to be of help.

  3. #3
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Best thing you can do, would be to go and look at hotscripts. I believe there is a script called PHPDIG which was really nice.

    Im not sure at the moment, on how to index a site, into a database, but again, hotscripts should have something for you

    -Eric

  4. #4
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    decided I'd reply :)

    Shame on u Zaire I gotta learn how...I want to find a book on MySql. I got text databases pretty(:S) good but MySql is gonna take a bit more work. Well later Zaire...thanks for all ur help on PHP.

    Dave-I'm on my knees for a PHP forum...

  5. #5
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Well.. i believe the statement looks like this

    mysql_query("SELECT * FROM table WHERE foo='%$bar%'");

  6. #6
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    well that's not the problem...

    it's CREATING the tables that's the problems I'm havin trouble figurin out what all the options in the mysql table thing are.

  7. #7
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Are you using phpmyadmin?

    If you would tell me what you would like, I will gladly make up some tables here, and post them

  8. #8
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Also, i believe my select statement was wrong... i think it shuold be like


    $word_to_search_for = "%".$word_from_form."%";
    mysql_query("SELECT * FROM table WHERE something LIKE '$word_to_search_for'") or die(mysql_error());

    You still might wanna look this up.. hehe

  9. #9
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Alright, closer and closer i was every time, here is the exact way to search a db


    $sql = "SELECT * FROM COFFEE_INVENTORY WHERE ROAST_TYPE LIKE $sbox";


    Phew. hehe

  10. #10
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    see

    even zaires still learnin

  11. #11
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    hey

    k lets say I have several tables---
    one called XHTML,HTML,CSS,Javascript,Resources (these are just for an example)
    in each table are the links all pertaining to that subject. Could I create a search engine that when someone types in those names of the tables...the links in that table they typed in will ring up? and if they didn't type one of those then it'll bring up a "no search results"? Do u get what I"m sayin? kinda confused myself up there...

  12. #12
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Well, one thing that most people know, is that your never done learnin'. Im always learning new things in php.. Im contastantly printing out tutorials to read.. buyin' books. ext.. just to keep learning

  13. #13
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Also, ANYTHING is possible

  14. #14
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    haha

    ok let's just say...could that be one of the EASIER routes to create a site search engine?

  15. #15
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    So you want tables to contain links to other content? Why not just list them?

    Like, what I do, is have a sitemap/article lister.. it grabs all the id's from the db's, arranges it onto a page, and automatically adds the hyperlink to the page containging the content itself Ahh, the joys of a dynamic site



Page 1 of 2 1 2 Last

Tags for this Thread