Results 1 to 4 of 4
  1. #1

    Unhappy PHP and MSSQL Help


    Good Day,

    i got a problem, every time i echo a array with 1000 characters in my database, it only shows 250 characters. is mssql_fetch_array() has a maximum length?

    heres my code sir:

    <?php

    $sql_retrieve = "SELECT jobid,jobno,datefiled,dateneeded,reqdept,reqdetail ,accincharge,jobstatus,reqdetail2,reqby,reqnotedby ,reqapprovedby,duedate,test FROM tbl_joborder WHERE jobno = '$jobno'";
    $result = mssql_query($sql_retrieve);

    While($newArray = mssql_fetch_array($result)) {
    $jobid=$newArray['jobid'];
    $jobno=$newArray['jobno'];
    $datefiled=$newArray['datefiled'];
    $dateneeded=$newArray['dateneeded'];
    $reqdept=$newArray['reqdept'];
    $reqdetail= nl2br($newArray['reqdetail']); // nl2br(); to text break area
    $accincharge=$newArray['accincharge'];
    $jobstatus=$newArray['jobstatus'];
    $reqdetail2 = $newArray['reqdetail2'];
    $reqby = $newArray['reqby'];
    $reqnotedby = $newArray['reqnotedby'];
    $reqapprovedby = $newArray['reqapprovedby'];
    $duedate = $newArray['duedate'];
    $test = $newArray['test'];
    }

    ?>

    in the body:

    <?php echo $test; ?>

    output:

    '1234....250' only

    but in my database i have about 1000 characters. have you guys have this problem?

    so sample , $test has 1000characters in my database, but when i echo it in my page it only shows 250 characters... is there other way to retrieve the complete data?

    i have look in my database the 1000 characters are complete but when retrieving it, it is not complete.

  2. #2
    how stupid i am,
    have just solve the problem,
    it was in the database, the datatype i used was varchar which its maximum size is only 255...
    by changing the type to text for unlimited size.

  3. #3

  4. #4
    yeah, learned it in a hardway.

  5.    Advertisement

Similar Threads

 
  1. could anyone help me with php and javascripts
    By isaac42 in forum Programming
    Replies: 6
    Last Post: 05-07-2009, 02:24 PM
  2. Help! PHP and JAVASCRIPT
    By tynum in forum Programming
    Replies: 14
    Last Post: 02-22-2009, 06:11 PM
  3. PHP and MySQL Training
    By TaughtWorks in forum Programming
    Replies: 33
    Last Post: 10-02-2006, 04:12 PM
  4. PHP and MySQL
    By k3nt in forum Websites & Multimedia
    Replies: 11
    Last Post: 06-30-2006, 04:52 PM
  5. Independent contractor info needed---php and mysql
    By BayouPinoy in forum Networking & Internet
    Replies: 0
    Last Post: 03-17-2006, 10:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top