Questions: Ambiguous Column when using *_match with left join and allowSearch CMSB 3.75
3 posts by 2 authors in: Forums > CMS Builder
Last Post: Yesterday at 4:21pm (RSS)
I have a left join with
'allowSearch' = true
and get an ambiguous column on _match.
I need to specify the table name in my query string, so I tried 'event.catefory_match=3'; however, $_GET and $_REQUEST both convert the dot to an underscore.
What syntax does ZenDB expect when trying to table qualify *_match?
yaadev.com
I was using getRecords.
list($biosRecords, $biosMetaData) = getRecords(
array(
'tableName' => "bios",
'loadUploads' => true,
'where' => $where,
'orderBy' => $orderby,
'allowSearch' => true,
'perPage' => 10,
'leftJoin' => array(
'locations' => 'company'
),
'limit' => '1',
'requireSearchMatch' => false,
'debugSql' => false,
)
);
I was using a query string of ?category_match=13. This seemed to work until CMSB 3.75. Both tables have a category column, which is where I got the ambiguous column name.
I found I could use bios_category_match, and it worked. However, I see the value gets set in the $_REQUEST to 'bios.category_match'. If this is submitted, it is changed. PHP replaces the dot with an underscore by default.
I am a bit confused on the proper way to use _match.
yaadev.com