Welcome Guest, Not a member yet? Register   Sign In
retrieving data from a database and re-retrieving from another database
#8

(10-26-2021, 05:33 AM)php_rocs Wrote: @Secux ,

How where you able to solve your problem?


I found this solution. I don't know how correct and optimized it is
PHP Code:
        $list_business $this->BusinessOwnership->where('userID'session()->get('id'))->get()->getResult('array');

         if (!empty(
$list_business)) {
             
$i 0;
             foreach (
$list_business as $row) {
                 
$listBusiness[$i] = $this->BusinessProfile->where('id'$row['businessID'])->orderBy('id''asc')->findAll();
                 
$i++;
             }
         }
         
$data['business_profile'] = $listBusiness
Reply


Messages In This Thread
RE: retrieving data from a database and re-retrieving from another database - by Secux - 10-27-2021, 12:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB