question on text file reading.
| From: | David Banning | Date: | Wed, 26 Feb 2003 16:50:14 +0000 |
| Subject: | question on text file reading. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-137264@lists.php.net to get a copy of this message | ||
The company I am working with is using an old database, which
doesn't even support memo field beyond 256 characters, so it is probably
too difficult, and not worth trying to interface the database with php.
I was wondering how easy it would be to have php access the database
via SQL. The data we are looking for is accessible via SQL. I know that
with my database,
that php -could- execute a shell command which would get the data
needed via SQL.
The data returned would simply spool to the screen, or to a file.
How difficult would it be for php to read and sort the data that
was available that way? The data is just fields separated by pipes.
I imagine that it might be possible for php to read the delimited
text file, but what about php reading back the text file directly
from the command that is executed? This would be similar to php having
to execute the command;
$ cat datafile.txt
and read the results. In my case, the command would be more something
like;
$ SQL sqlrequestfile
where I have my sql commands in "sqlrequestfile".