T
T
Twelfth Doctor2017-05-05 16:29:05
Laravel
Twelfth Doctor, 2017-05-05 16:29:05

Is the database query correct?

Hello! Can you tell me if the database query is correct?
Laravel framework application

public function linkalias($domainid, $userid , $vhostid)
    {
        $checkbelonging = DB::table("domain")
            ->select('unid')
            ->where("userid",  Auth::user()->user_id)
            ->where ("domainid" , $domainid)
            ->where("type" , "unlinked")
        ->get();
if (!$checkbelonging) {return $error = "Trying to link foreign domain";}

    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question