Please turn on javascript in your browser to play chess.
Developers Forum

Developers Forum

  1. Standard member genius
    Wayward Soul
    05 Apr '04 14:31 / 1 edit
    i know this has nout to do with RHP, but i tired posting it in the general forum and it didn't work...and the whole developers bit...

    o.k.-this is kinda hard to explain, but i'll try and simplify it a bit (for my sake )...basically, i have a friend (waw-i know-shock horror!) and he's doing advanced higher computing (a bit like 1st year uni, but kidna different and still done in school). we have to write a program for this-and it's gotta be a (kinda) hard program to write. i chose naughts and crosses in VB, he chose to do a program that queries and knowledge base using prolog. needless to say, he got confused by prolog. so he asked someone. a university lecturer. he said that he didn't let his students near prolog 'til 3rd year uni. so, with 2 weeks until the deadline, he wrote a program to querie a knowledge base using delphi, mainly using in-built finctions.

    only problem was that this program was too simple, so he decided to code the in-built search function that he was using. except, he has noooooooo idea how to code this search...so, can anyone help? he's now got an extra 2 weeks to finish this (i forget why...) so-yeah...help...

    EDIT-sorry about the no thread title...i thought i'd put one and you can't change it in an edit...
  2. Subscriber Crowley
    Not Aleister
    13 Apr '04 18:43
    I'm no Delphi expert, but need some more info.

    Which search procedure is he trying to code?
    What version of Delphi is he using?
    Also, what context is the function used in? Just sorting records for display etc. etc.

    Give more information, get more information....
  3. Standard member genius
    Wayward Soul
    13 Apr '04 19:50
    Which search procedure is he trying to code? no idea...
    What version of Delphi is he using? 2, i think-well, his books for 2...
    Also, what context is the function used in? Just sorting records for display etc. etc. the function os needed to search the knowledge base for words entered by the user, for instance if the user entered "computer", the knowledge base would be searched for all instances of "computer". i think...
  4. Subscriber Crowley
    Not Aleister
    15 Apr '04 20:47
    I don't know about any Delphi builtin function / procedure that would do this.

    This just sounds like a simple SQL query...
    SELECT * FROM table_name WHERE column_name = 'term'
    Then just use a while statement to iterate through the results.

    Hope this helps - I haven't used Delphi in a while, so I'm not too polished on it any more.