255 character limit on $record->display() ?

A place for users and developers of the Xataface to discuss and receive support.

255 character limit on $record->display() ?

Postby rugcutter » Thu May 07, 2009 9:41 am

I'm trying to output the value from a column that is of type "text" in the database table. I'm seeing that the method call to $record->display() is only giving me the 1st 255 characters of the field.

I'm making the call within renderRow() within my delegate class. I wrote code to output the value within an HTML comment block, and I'm only getting the 1st 255 characters. My code looks something like this:

Code: Select all
   function renderRow ( &$record )
   {

      print("<!-- RAC notes ".$record->display(cp_notes)."-->");
      print("<!-- RAC notes ".$record->getValueAsString(cp_notes)."-->"); // this also only gives me the 1st 255 characters
   
   ...


I've tried getValueAsString(), and a few other functions on the Record class as well.

Where is this limit set? How can I indicate to give me the full value that is stored in the table?
rugcutter
 
Posts: 11
Joined: Thu Apr 23, 2009 9:43 pm

Postby shannah » Thu May 07, 2009 9:55 am

In list view, for performance reasons, only the first 255 chars of each field is loaded into memory. If you require a field to always load the entire contents you can specify struct=1 for that field in the fields.ini file:

e.g.
Code: Select all
[myfield]
     struct=1



-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fongchun » Thu May 07, 2009 10:06 am

Might want to check out this post too. It contains a little more information on the situation and some other solutions.
fongchun
 
Posts: 30
Joined: Sun Aug 03, 2008 12:23 am
Location: Vancouver, BC

Postby rugcutter » Thu May 07, 2009 11:02 am

Exactly what i needed. Thanks for the quick response!
rugcutter
 
Posts: 11
Joined: Thu Apr 23, 2009 9:43 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved