php-hmac-rest-api
php-hmac-rest-api copied to clipboard
Having problem using join
Nice day fellas....
columns($select) ->join("TblViewer","TblViewer.accountKey = TblLeads.autokey") ->where("TblViewer.accountLocation = 'l'") ->andWhere("TblViewer.userKey = '8'") ->andWhere("TblLeads.systemId = '2'") ->andWhere("TblLeads.isDeleted = 'n'") ->limit(10) ->execute(); --- This will return Model 'TblViewer' could not be loaded have anyone encounter this? ---------------UPDATE------------------------- columns($select) ->join("Models\TblViewer","TblViewer.accountKey = Models\TblLeads.autokey") ->where("Models\TblViewer.accountLocation = 'l'") ->andWhere("Models\TblViewer.userKey = '8'") ->andWhere("TblLeads.systemId = '2'") ->andWhere("Models\TblLeads.isDeleted = 'n'") ->limit(10) ->execute(); This code works... but, is there any way to declare an alias into it? Thanks!!