TXT File Question - 04/11/08 08:49 PM
Hello,
Due to the complexity of data that I wish to store, I have gone ahead and chose to use a txt file database.
What I would like to do is come up with an alias to read the text file database and return certain attributes about a piece of data.
Example of what's in the txt file (userinfo.txt):
nickname1 48203948230948023890 123.124.125.123
nickname2 2378912@430923423448 123.125.123.698
nickname3 4324923@312484324447 125.125.125.132
Request #1
Lets say for example I would like to get information related to nickname2 $getinfo(nickname2) would return: "nickname2's address is: 2378912@430923423448 and their IP is: 123.125.123.698
Request #2
Let's say I would like to get information based on solely the address: $getinfo(2378912@430923423448) would return " Address: 2378912@430923423448 belongs to: Nickname2, and their IP is: 123.125.123.698
Request #3
Let's say I would like to get information based solely on the ip address: $getinfo(123.125.123.698) would return: the ip address: 123.125.123.698 belongs to Nickname and their address: is 2378912@430923423448
How in the world would I come up with this type of complex code?
I appreciate all your help and support.
Thanks a bunch in advance,
Cheers,
Jay
Due to the complexity of data that I wish to store, I have gone ahead and chose to use a txt file database.
What I would like to do is come up with an alias to read the text file database and return certain attributes about a piece of data.
Example of what's in the txt file (userinfo.txt):
nickname1 48203948230948023890 123.124.125.123
nickname2 2378912@430923423448 123.125.123.698
nickname3 4324923@312484324447 125.125.125.132
Request #1
Lets say for example I would like to get information related to nickname2 $getinfo(nickname2) would return: "nickname2's address is: 2378912@430923423448 and their IP is: 123.125.123.698
Request #2
Let's say I would like to get information based on solely the address: $getinfo(2378912@430923423448) would return " Address: 2378912@430923423448 belongs to: Nickname2, and their IP is: 123.125.123.698
Request #3
Let's say I would like to get information based solely on the ip address: $getinfo(123.125.123.698) would return: the ip address: 123.125.123.698 belongs to Nickname and their address: is 2378912@430923423448
How in the world would I come up with this type of complex code?
I appreciate all your help and support.
Thanks a bunch in advance,
Cheers,
Jay