Jump to content

Is connecting to a ascii data file similar to connecting to a mysql database???


Presto-X

Recommended Posts

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.