View Single Post
Old 02-01-2010, 09:02 PM   #1 (permalink)
CΛSTΞX
The Acquainted
 
Join Date: Feb 2008
Posts: 107
Thanks: 3
CΛSTΞX is on a distinguished road
Plugin/Addon Write Mysql results to a text file

Hello mates, I need help about writing mysql results to a text file. I stuck in this code, it only write "array" to a text file.

PHP Code:
$myFile "test.txt";
$fh fopen($myFile'w') or die("can't open file");

function 
data_dump$query ) {
    
$results mysql_query$query );

    
$data = array();

    while ( 
$row = @mysql_fetch_assoc$results ) )
        
$data[] = $row;

    return 
$data;
}

$stringData data_dump$query )."\n";

fwrite($fh$stringData);
fclose($fh); 
__________________
Downloadic
infolizer
Send a message via MSN to CΛSTΞX
CΛSTΞX is offline  
Reply With Quote