Error in whereRecordNumberInUrl(),

4 posts by 3 authors in: Forums > CMS Builder
Last Post: June 25, 2020   (RSS)

By mbareara - June 21, 2020

Hi and thanks in advance for your help

I have this code  but every page give me always the last item ... 

// load record from 'locali'
list($prodottiRecords, $prodottiMetaData) = getRecords(array(
'tableName' => 'prodotti',
'where' =>getNumberFromEndOfUrl(), 
'loadUploads' => true,
'leftJoin' => array( 
// foreign table => local field (that matches num in foreign table) 
'azienda' => 'azienda', 
$prodottiRecord = @$prodottiRecords[0]; // get first record

By daniel - June 22, 2020

Hi mbareara,

Could you copy the full URL of a page where this is happening? Sometimes additional parameters can be added to the end of the URL that interferes with whereRecordNumberInUrl(). (You can remove the domain for privacy if needed)


Technical Lead

By mbareara - June 22, 2020 - edited: June 22, 2020

Thank you Daniel this is the url