本文整理汇总了PHP中SqlQuery::set方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlQuery::set方法的具体用法?PHP SqlQuery::set怎么用?PHP SqlQuery::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlQuery
的用法示例。
在下文中一共展示了SqlQuery::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateLastLoginTime
public function updateLastLoginTime($userId, $timestamp)
{
$sql = 'UPDATE user_info SET last_login_time = ? WHERE id = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($timestamp);
$sqlQuery->set($userId);
return $this->executeUpdate($sqlQuery);
}
示例2: updateSocialLink
/**
* Update record in table
*
* @param UserSocialLinksMySql userSocialLink
*/
public function updateSocialLink($userId, $linkUrl, $type)
{
$sql = 'UPDATE user_social_links SET link_url = ? WHERE user_id = ? AND type = ? ';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($linkUrl);
$sqlQuery->setNumber($userId);
$sqlQuery->set($type);
return $this->executeUpdate($sqlQuery);
}
示例3: loadProjectKeywords
public function loadProjectKeywords($projectId)
{
$sql = 'SELECT * FROM keywords WHERE u_p_c_id = ? AND type = 2';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($projectId);
return $this->getList($sqlQuery);
}
示例4: queryByHashKeyAidId
public function queryByHashKeyAidId($hashKey, $userId)
{
$sql = 'SELECT * FROM user_access_aid WHERE id = ? AND hash_key = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->setNumber($userId);
$sqlQuery->set($hashKey);
return $this->getList($sqlQuery);
}
示例5: getLastTemporadaOfSerie
public function getLastTemporadaOfSerie($idSerie)
{
$sql = 'SELECT MAX(temporada) temporada FROM vod WHERE id_serie = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($idSerie);
$tab = QueryExecutor::execute($sqlQuery);
if (count($tab) == 0) {
return null;
}
return $tab[0]['temporada'];
}
示例6: queryAllTeamDasboard
/**
* Get teal Dashboard records from table
*/
public function queryAllTeamDasboard($projectId, $projectId, $projectId, $teamName, $projectId, $teamName, $projectId, $teamName)
{
$sql = "(SELECT challenge.id, challenge.title, challenge.type, challenge.status, challenge.creation_time, user.first_name, user.last_name, user.username \r\n\t\t\t\t\tFROM challenges as challenge JOIN user_info as user \r\n\t\t\t\t\t\tWHERE challenge.project_id = ? \r\n\t\t\t\t\t\t\tAND (challenge.type = '1' OR challenge.type = '2') \r\n\t\t\t\t\t\t\tAND challenge.status = '1' \r\n\t\t\t\t\t\t\tAND challenge.status != '3' \r\n\t\t\t\t\t\t\tAND challenge.status != '7' \r\n\t\t\t\t\t\t\tAND challenge.user_id = user.id\r\n\t\t\t\t\t)\r\n\t\t\t\t\tUNION\r\n\t\t\t\t\t(SELECT DISTINCT challenge.id, challenge.title, challenge.type, challenge.status, challenge.creation_time, user.first_name, user.last_name, user.username \r\n\t\t\t\t\t\tFROM challenges as challenge JOIN user_info as user JOIN challenge_ownership as owner \r\n\t WHERE challenge.project_id = ?\r\n\t AND challenge.id = owner.challenge_id \r\n\t AND owner.user_id = user.id \r\n\t AND challenge.status != '3' \r\n\t AND challenge.status != '7'\r\n\t AND owner.user_id \r\n\t IN (SELECT user_id FROM teams WHERE project_id = ? AND team_name = ? AND member_status = '1')\r\n\t AND challenge.id \r\n\t \tNOT IN (SELECT challenge_id FROM team_tasks WHERE project_id = ? AND team_name = ?)\r\n\t\t\t\t\t)\r\n\t\t\t\t\tUNION\r\n\r\n\t\t\t\t\t(SELECT a.challenge_id, challenge.title, challenge.type, challenge.status, challenge.creation_time, user.first_name, user.last_name, user.username \r\n\t\t\t\t\t\tFROM team_tasks as a join challenges as challenge JOIN user_info as user\r\n\t WHERE a.project_id = ? \r\n\t AND a.team_name = ? \r\n\t AND a.challenge_id = challenge.id\r\n\t\t\t\t\t\t AND challenge.user_id = user.id\r\n\t\t\t\t\t\t AND challenge.status != '3' \r\n\t AND challenge.status != '7'\r\n\t\t\t\t)";
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($projectId);
$sqlQuery->set($projectId);
$sqlQuery->set($projectId);
$sqlQuery->set($teamName);
$sqlQuery->set($projectId);
$sqlQuery->set($teamName);
$sqlQuery->set($projectId);
$sqlQuery->set($teamName);
return $this->getListAllTeamDashboard($sqlQuery);
}
示例7: queryByTerm
public function queryByTerm($term, $usuarioId = 0, $tipo = "hotel")
{
$sql = 'SELECT DISTINCT c.* FROM campania AS c ';
if ($usuarioId) {
$sql .= ' INNER JOIN empresa AS e ON e.id = c.empresa_id OR e.id = c.empresa_distribuidora_id ';
$sql .= ' INNER JOIN usuario_empresa AS ue ON ue.empresa_id = e.id ';
}
$sql .= ' WHERE c.estado = "Aprobada" AND (';
$sql .= ' c.nombre like "%' . $term . '%" OR ';
$sql .= ' c.localizador like "%' . $term . '%" )';
$sql .= ' AND c.tipo = ?';
if ($usuarioId) {
$sql .= ' AND ue.usuario_id = ?';
}
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($tipo);
if ($usuarioId) {
$sqlQuery->setNumber($usuarioId);
}
return $this->getList($sqlQuery);
}
示例8: deleteByStateExecution
public function deleteByStateExecution($value)
{
$sql = 'DELETE FROM alteration WHERE stateExecution = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例9: deleteByDescrizione
public function deleteByDescrizione($value)
{
$sql = 'DELETE FROM TipoSonda WHERE Descrizione = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例10: deleteByHeadshipITName
public function deleteByHeadshipITName($value)
{
$sql = 'DELETE FROM headshipit WHERE headshipITName = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例11: deleteBySenha
public function deleteBySenha($value)
{
$sql = 'DELETE FROM usuario WHERE senha = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例12: deleteByFecha
public function deleteByFecha($value)
{
$sql = 'DELETE FROM tbl_evaluacion WHERE fecha = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例13: deleteByTime
public function deleteByTime($value)
{
$sql = 'DELETE FROM keywords WHERE time = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例14: deleteByName
public function deleteByName($value)
{
$sql = 'DELETE FROM professions WHERE name = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}
示例15: deleteByTipoCobro
public function deleteByTipoCobro($value)
{
$sql = 'DELETE FROM reserva WHERE tipo_cobro = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->set($value);
return $this->executeUpdate($sqlQuery);
}