Order after importing records
2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 30, 2015 (RSS)
By Jesus - November 27, 2015 - edited: November 30, 2015
Hi,
I'm importing records using the CSV import plugin and so far so good, no problems during the process. However, today I noticed something...
On my website I'm not seeing the records properly order (I'm using the default dragSortOrder and normally works just fine), but here I'm not seeing the records properly order (on my backend everything looks perfect, but on my front end, no)
Any ideas?
Here's the code I'm using the grab the records, no sorting or anything here (but honestly I never used before on any of my projects).
// load records from 'products1'
list($productsRT_Records, $productsRT_MetaData) = getRecords(array(
'tableName' => 'products',
'loadUploads' => true,
'allowSearch' => false,
'where' => "category='1'",
));
Thanks as always for your help and pointing me to the right direction!
As an additional information, here are 2 screenshots from my backend and fronend. Where you can see the order on both cases. I want my frontend to show the order I've on my backend (dragSort).
Jesus
By Daryl - November 30, 2015
Hi Jesus,
On your backend.png screenshot, there's an arrow up icon beside the "Family" column header.
So it looks like the records are sorted by "Family" when viewed from the back-end. This doesn't affect the order of the records on the front-end unless you add 'orderBy' parameter in your getRecords() function.
You can click the 'reset' button on the back-end to remove the sorting and/or any other search filters.
Cheers,
PHP Programmer - interactivetools.com