|
|
|
![]() |
|||
This is a perl script search engine which allows a search on a series of related files within a directory and returns matches in HTML table format. This effectively provides Ascii database functionality |
|||
News - Version 1.1 has been released which with one line allows specific fields to be selected |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||
Modus Operandus |
Notes - you should have all data files in an exclusive directory with the same data structure e.g. user1.csv user2.csv . Files will usually have been separated for security reasons where a user owns their own file. data_search will allow a super user to query all files in the directory. |
1. We set the header within the script as follows $myheader = "Country,Capital City,Population (M)"; |
|||||
2. We now run the query e.g. http://purpleflash.netfirms.com/cgi-bin/data_search.pl?searchword=paris and all CSV files are searched for the word paris. The resultant matched record is displayed as a HTML table . Note searchword=france would have given the same result. Now if we use searchword=united it shows both the US and UK. This demonstrates that we are effectively viewing the files within the directory as a database. |
|||||
3. Selecting fields Version 1.1. allows specific fields to be selected - These are set through $myfields = "0,1"; In this case http://purpleflash.netfirms.com/cgi-bin/data_search_1.pl?searchword=paris will return the first two columns only - ie France,Paris i.e the first two fields (Note , fields are numbered from 0. |
|||||
|
||||
|
||||
|