Presto-X Posted August 17, 2007 Share Posted August 17, 2007 Ok so I’m new to connecting to data other then mysql, I’m working on a project right now that will connect to a MLS real estate database that is done in ascii. This is the email that I got from a service rep. with RMLS http://www.rmls.com I cannot provide you with samples of the data until I have a properly signed Database Access Agreement. I can tell you the data is available in 5 files, one for each property type (residential, multi-family, etc.). The data is ascii and is available as comma delimited, or pipe or tab between fields. There are 53 fields in Residential feed file. We provide the raw data. The Service provider does all the rest. It is not a simple task. So I’m not sure how this would work, is connecting to a ascii data file similar to connecting to a mysql database??? Any tips, suggestions, or help would be very very greatly welcome... Quote Link to comment https://forums.phpfreaks.com/topic/65516-is-connecting-to-a-ascii-data-file-similar-to-connecting-to-a-mysql-database/ Share on other sites More sharing options...
Fadion Posted August 17, 2007 Share Posted August 17, 2007 I guess no. U can communicate with mysql via builtin php functions and mysql queries. To deal with files u got file handling functions, but u cant expect the same results. Anyway here's a code: //file.txt content is like: var1, var2, var3, var4, var5.... $vars = file_get_contents('file.txt'); $arrVars = explode(',', $vars); foreach($arrVars as $value){ echo $value; //it will echo each value stored in the file.txt } Hope i understood your question and my answer helps. Quote Link to comment https://forums.phpfreaks.com/topic/65516-is-connecting-to-a-ascii-data-file-similar-to-connecting-to-a-mysql-database/#findComment-327170 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.