08 Sep 2010 
Support Center » Knowledgebase » Incorrect order when importing values into 'tree' type fields
 Incorrect order when importing values into 'tree' type fields
Solution Please open the file /system/lib/classifieds/ListingField/ListingFieldTreeManager.php and find the line:
$max_order = DB::query("SELECT MAX(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);

You need to add the following code before it:
DB::resetCacheForquery("SELECT MAX(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);


Also add the line:
DB::resetCacheForquery("SELECT MIN(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);

before the code:
$min_order = DB::query("SELECT MIN(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);


Article Details
Article ID: 132
Created On: 21 May 2010 10:05 AM

 This answer was helpful  This answer was not helpful

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | News | Downloads
Language:

Help Desk Software By Kayako SupportSuite v3.50.06