php - Saving mysql data in binary -
is there way retrieve data mysql db table , save them in binary file?
my table looks this
id  domain_name  isauth 1   www.yah.com  1 2   www.go.com   0 3   www.goo.com  1 4   www.foo.com  1      
since performance seems issue here, assuming $data result of call pdostatement::fetchall or mysqli_fetch_all, suggest serialize , unserialize: 
/* fetch $data */ file_put_contents('my_file.dat', serialize($data)); /* other stuff */ $data = unserialize(file_get_contents('my_file.dat')); /* use $data */      
Comments
Post a Comment