Results 1 to 3 of 3
  1. #1

    MYSQL ROW CHANGE

    a customer sent me this :
    in the notepad it appears as just a long row evry row change is a small square I imagine the note pad can not understand it is a row change, whoch is aa new record
    but amazingly, hwen I just post that here it actually recognized it as a row change!!!

    see it ist below here:

    20080226,TT,398.3,,,398.3
    20080229,TT,66.7,54.54,,121.24
    20080301,TT,1528.28,95.45,,1623.73
    20080302,TT,399.96,,,399.96
    20080303,TT,259.09,45.45,,304.54
    20080407,TT,318.18,118.18,,436.36
    20080408,TT,528.45,180.01,,708.46




    how can I make php and my sql ti understand that it is a change in the row, a new record if note pad doesnt reckognize it?

    althoug this board did recognized it!!!

  2. #2
    Join Date
    Dec 2007
    Location
    Lebanon
    Posts
    413
    php doesn't depend on notepad!! it will recognize every new line

    try it

    PHP Code:
     $lines=file("somefile where these lines are");
     foreach(
    $lines as $line){
          echo 
    $line."<br />";
     } 

  3. #3
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Quote Originally Posted by Codebird View Post
    php doesn't depend on notepad!! it will recognize every new line

    try it

    PHP Code:
     $lines=file("somefile where these lines are");
     foreach(
    $lines as $line){
          echo 
    $line."<br />";
     } 
    The small square the OP is referring to, is likely an artifact of a text file downloaded in binary format (FTP i mean). The example appears to be a CSV. I would assume MySQL simple handles this and does the inserts.
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •