Results 1 to 5 of 5

Thread: Undefined offset

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    39

    Undefined offset

    I am getting Undefined notice. Could anybody help out. Below are code
    -------------------------------
    <?PHP set_time_limit(0); require("./dbconfig/db_connect.php");
    //////////////////////////////////////SEARCH BARCODE TAG//////////////////////

    $lines = glob("D:/nusphere/apache/htdocs/Msafe/phonoApp/final/ftp_downloaded/*.txt");
    for($i=0;$i<sizeof($lines);$i++){ $fp=fopen($lines[$i],"r+") or die("error opening");
    $file_content =fread($fp,filesize($lines[$i]));
    fclose($fp);
    $arrContent=explode("\n",$file_content);
    //print_r($arrContent);
    //check to see if this is your search string
    SizeOf($arrContent);
    $barCodeinfo="";
    $trackOrder=0;
    $updateRecordCount=0; for($j=0;$j<sizeof($arrContent);$j++){ $arrData=explode(";",$arrContent[$j]);

    $barCode=$arrData[0];
    $SoundLink=$arrData[3];
    $Supplier_TrackID=$arrData[1];

    if($barCode<>$barCodeinfo){ $barCodeinfo=$barCode;
    $trackOrder=0; } else $trackOrder++;
    // echo "SELECT tbltracks.* FROM tbltracks,tblcollection WHERE tblcollection.barcode='".str_replace("'","''",trim($barCode))."' ORDER BY tbltracks.ID Limit ".($trackOrder).",1"."</br>"; // echo "UPDATE tbltracks SET Sound_Links='".($SoundLink)."' WHERE ID ='{$row['ID']}'"."</br>"; $rec = mysql_query("SELECT tbltracks.* FROM tbltracks,tblcollection WHERE tbltracks.FT_SuplProdID=tblcollection.suplprodid and tblcollection.barcode='".str_replace("'","''",trim($barCode))."' ORDER BY tbltracks.ID Limit ".($trackOrder).",1"); $updateRecordCount++; //OK if ($row = mysql_fetch_array($rec)){ mysql_query("UPDATE tbltracks SET Sound_Links='".($SoundLink)."' WHERE ID ='{$row['ID']}'"); echo "Updating ......................."; } else{}; } if($updateRecordCount%50) sleep(1); } ?>
    -------------------------------

    Thanks
    Ramesh chaudhary
    Last edited by RameshChaudhary; Nov 30th, 2006 at 06:02 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width