Exemplo n.º 1
0
Arquivo: TXT.php Projeto: elemenofi/lb
 public static function WHERE___BIND__Params($SP, $ArrayObject, $Extra__Column__Name = null, $Extra__Column__Value = null)
 {
     $Query = " WHERE ";
     $Columns = array_keys((array) $ArrayObject);
     foreach ($Columns as $Column__Name) {
         $Query .= ccTXT__DB::WHERE___GET__Clause($Column__Name) . " AND ";
     }
     if ($Extra__Column__Name === null) {
         $Query = substr($Query, strlen($Query) - 4);
     } else {
         $Query .= ccTXT__DB::WHERE___GET__Param_Name($Extra__Column__Name);
     }
     return $Query;
 }
Exemplo n.º 2
0
 private function CHECK___Values___N_Matches($Object__Id, $Name, $Value)
 {
     $Query = "SELECT Id FROM lbxxdb50.db__" . strtolower($this->Name) . " " . "WHERE Id = :inId AND " . $Name . " = :in" . $Name . ";";
     global $PDO;
     $SP = $PDO->prepare($Query);
     $SP->bindValue(":inId", $Object__Id, PDO::PARAM_INT);
     $Param_Type = ccTXT__DB::WHERE___GET__Param_Type($Value);
     $SP->bindValue(":in" . $Name, $Value, $Param_Type);
     $Response = ccDB::GET__ResultsSets__Merged($SP);
     return !empty($Response);
 }