Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wanted: last version of phdbase
Message
 
To
29/09/2005 15:47:46
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01054612
Message ID:
01054661
Views:
31
That is what I like about this community, people like yourself can create some great code out of a need for something that is missing in FoxPro.

Thanks for the lines of code and I am sure others here appreciate it too.

>For my specific need, I wrote a few functions to create and maintain a set of tables with all the words from all the fields of interest. The "words" table contains two fields, the words and a PK which matched the PK in the main table.
>
>I also wrote a functions to find all the records which had all the matching words in the "words" table. It is damned fast, even with more than 5 million records in the main table and more than 20 million records in the "words" table.
>
>I will give you a few words about how the search works. A typical search is ?SEARCHWITHWORDS('word1 word2 word3 word4'). The search string is divided into separate words by Getwordnum() and getwordcount(), and they are sorted so that the longest word is checked first. The reason for this, is of course that the longest word is most likely to have fewest hits.
>
>The rest of the function is like this, simplified a little bit here
>
>lcInn='word1 word2 word3 word4'
>lcCursor='curTemp' && Name of result cursor
>lcSok=Getwordnum(lcInn,1)
>Select Dist Master.Id, slave.word From myWordtable As Master, myWordtable As slave;
>  Where slave.word = lcSok And Master.Id = slave.Id Into Cursor (lcCursor) Readwrite
>If Getwordcount(lcInn) > 1
>  For lnTeller = 2 To Getwordcount(lcInn)
>    lcSok = Getwordnum(lcInn, lnTeller)
>    If _Tally>0
>      Select Dist Master.Id, slave.ord From (lcCursor) As Master, myWordtable As slave;
>        Where slave.word = lcSok And Master.Id = slave.Id Into Cursor (lcCursor) readwrite
>    Endif
>  Endfor
>Endif
>Select **the rest of the important fields** from MyTable as Master, (lcCursor);
>  where master.id=&lcCursor..Id into cursor (lcCursor) readwrite
>
>I must confess that I am pretty proud of this code myself, because these few lines of codes actually does a lot of magic. And note that I only use one cursor! I only use indexes in the first and the last Select, since the other Selects are against cursor, they are usually handled in RAM.
>
>
>>What did you replace it with?
>>
>>>>I am in need of a copy of the last phdbase sold by Korenthal and Associates. The one that will work with VFP8-9 If anyone has a copy they would be willing to part with please contact me a at my email address. Failing that does anyone have a contact for Korenthal?
>>>>
>>>>Mike
>>>
>>>Hi Michael,
>>>
>>>AFAIK, the last version of PHD is 3.61, and is from 1997. It has a loooot of bugs, and personlly I stopped using it many years ago. It has been discontinued, and is no longer supported. One of the problems, is that it simply did not find all matching records!
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform