cannot write data fetched from database in the text file

Discussion in 'PHP' started by shrad, Mar 24, 2009.

  1. #1
    hi..

    i am fetching data from database and then writing to a file. query runs perfectly correct but full data is not written in a file.only 560000 of records are witting and my database contains around 13lakhs of records.

    i did all possible changes in php.ini file. (ie. increasing 1] memory_limits=3000M, 2]session.bug_compat_42 =0, 3]session.bug_compat_warn =1 )

    still the problem is not solved ...:eek:

    can any one tell mi for what reason full data is not witting in a file ......?


    thanks,
    Shradha
     
    shrad, Mar 24, 2009 IP
  2. steelaz

    steelaz Peon

    Messages:
    47
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try running the script from console, you won't get time-outs that way. Also it may be a good idea to do few thousand records at a time and just append data to existing file.
     
    steelaz, Mar 24, 2009 IP
  3. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    can you show your code here?
     
    javaongsan, Mar 24, 2009 IP
  4. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #4
    How about max_execution_time ?
     
    SmallPotatoes, Mar 24, 2009 IP
  5. moneyaddick

    moneyaddick Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you can export from the DB if it helps. if you run the script 2 times it ads 560000 X 2 records ? (of course if you have the pointer at the end of the file)
     
    moneyaddick, Mar 25, 2009 IP
  6. Stylesofts

    Stylesofts Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hello,

    For such types of things, you have to run them in cronjob..it will take time but at the end all the records will be stored in the file.


    But u will have write different cronjobs limiting the records for ur wish and then appending on the file


    Regards
    Stylesofts Developing Team
     
    Stylesofts, Mar 25, 2009 IP