Reply to Question about DB & accessing fixed records from local C:\ .txt file

Your name:

Reply:


Posted by applegreenss on 12/12/06 00:05

Is it possible to take the contents of a MySQL DB Table, and somehow
put the data into a syntax-correct data file format like a delimited
..txt file, and using PHP parse it as a local c:\ file assuming it was
sitting in C:\data.txt ..... so I want to read its contents in a
similar method as you would query a DB table .... can you do this the
same with a blob of data stored in a .TXT file?

If so, how to format .txt & php code -- I would very much like to
emulate this scenario against a c:\ stored .txt file:

<?
$sql_query = "SELECT * FROM localfile WHERE value = '$somevalue'";
$result = @mysql_query($sql_query,$db);

// now put all the data into arrays
$a = 0;
while ($row = mysql_fetch_row($result)) {

$somearray1[$a] = $row[0];
$somearray2[$a] = $row[1];

$a++;
}
?>

Can something like this be done? :)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация