本文整理汇总了PHP中Query::executeQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Query::executeQuery方法的具体用法?PHP Query::executeQuery怎么用?PHP Query::executeQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Query
的用法示例。
在下文中一共展示了Query::executeQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit_record
public static function exit_record($doc_id, $bdm_id, $type)
{
$date = date('Y-m-d');
$sql = "select * from rx_save where created_at='{$date}' and doc_id='{$doc_id}' and type='{$type}' and bdm_id='{$bdm_id}'";
echo $sql;
$result_array = Query::executeQuery($sql);
return !empty($result_array) ? array_shift($result_array) : FALSE;
}
示例2: TMActivity
public static function TMActivity($conditions = array())
{
$sql = "SELECT SUM(launch) AS launch,SUM(device_check) AS device_check,SUM(paramedic) AS paramedic,SUM(chemist_meet) AS chemist_meet,SUM(visibility) AS visibility,SUM(revolizer) AS revolizer,SUM(zvt) AS zvt,SUM(rotahaler) AS rotahaler,act_id,bmp.Zone,bmp.Region,bmp.Territory,bmp.TM_Name,bmp.BM_Name FROM TM_Activity ta INNER JOIN bip_manpower bmp ON bmp.smswayid = ta.smswayid ";
if (!empty($conditions)) {
$sql .= join(" ", $conditions);
}
return Query::executeQuery($sql);
}
示例3: getAllBook
public static function getAllBook()
{
/*Función para consultar los empleados activos*/
$obj_Book = new Query();
/*Utiliza un objeto empleado, genera una nueva consulta*/
$obj_Book->executeQuery('select * from libro');
/*Genera la consulta ejecuta el query pasado*/
return $obj_Book->FetchAll();
}
示例4: selectList
function selectList($searchColumn, $sscategorie, $pagination, $messageParPage)
{
if ($sscategorie == 1301) {
// Affichage de tous les abonnées astuce pour éviter les sscategorie des abonnées newsletters
$sqlQuery = "SELECT " . $selectColumn . " FROM `" . TABLE_PREFIX . CATEGORIE_NOM . "` WHERE `delete_logical` = '0'";
} else {
$sqlQuery = "SELECT " . $selectColumn . " FROM `" . TABLE_PREFIX . CATEGORIE_NOM . "` WHERE sscat_radio = '" . $sscategorie . "' AND `delete_logical` = '0'";
}
return Query::executeQuery($sqlQuery);
}
示例5: totalCount
private function totalCount()
{
$sql = 'SELECT COUNT(*) AS count FROM ' . $this->table_name;
if (isset($where) && !empty($where)) {
$sql .= join(" ", $where);
}
$result_array = Query::executeQuery($sql);
if (!empty($result_array)) {
$result_array = array_shift($result_array);
return $result_array->count;
}
}
示例6: authenticate
public static function authenticate($id = "", $password = "")
{
global $database;
$id = $database->escape_value($id);
$password = $database->escape_value($password);
if ($id != '' && $password != '') {
$sql = "SELECT * FROM respi2_manpower ";
$sql .= "WHERE SM_Emp_Id = '{$id}' ";
$sql .= " AND SM_Password = '{$password}' ";
$sql .= " LIMIT 1";
$result_array = Query::executeQuery($sql);
return !empty($result_array) ? array_shift($result_array) : false;
}
}
示例7: auth
public static function auth($id = '', $password = '')
{
global $database;
$id = $database->escape_value($id);
$password = $database->escape_value($password);
if ($id != '' && $password != '') {
$sql = "select * from task_force";
$sql .= " WHERE empid = '{$id}' ";
$sql .= " AND password='{$password}'";
$sql .= " LIMIT 1";
$result_array = Query::executeQuery($sql);
return !empty($result_array) ? array_shift($result_array) : FALSE;
}
}
示例8: Inquilinos
function Inquilinos($nro=0) // declara el constructor, si trae el numero de cliente lo busca , si no, trae todos los clientes
{
if ($nro!=0)
{
$obj_inquilino=new Query();
$result=$obj_inquilino->executeQuery("select nombre, valor from premios"); // ejecuta la consulta para traer al cliente
$row=MySQLi_fetch_array($result);
$this->id=$row['nombre'];
$this->nombre=$row['valor'];
}
}
示例9: updatePassword
function updatePassword($newpwd, $login)
{
$sqlQuery = "UPDATE " . TABLE_PREFIX . "admin SET mdp_txt = '" . md5($newpwd) . "' WHERE login_txt = '" . $login . "'";
return Query::executeQuery($sqlQuery);
}
示例10: find_all
public static function find_all($table_name)
{
$sql = "SELECT * FROM " . $table_name;
return Query::executeQuery($sql);
}
示例11: BMlist2
public static function BMlist2($condition)
{
$sql = "SELECT * FROM `breathfree_manpower` WHERE smswayid " . $condition;
return Query::executeQuery($sql);
}
示例12: list_rx
public static function list_rx($date, $date1, $bdm)
{
$sql = "\nSELECT mydate, rx_count\nFROM\n (\n SELECT a.Date AS mydate\n FROM (\n SELECT DATE('{$date1}') - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY AS DATE\n FROM (SELECT 0 AS a\n UNION ALL SELECT 1\n UNION ALL SELECT 2\n UNION ALL SELECT 3\n UNION ALL SELECT 4\n UNION ALL SELECT 5\n UNION ALL SELECT 6\n UNION ALL SELECT 7\n UNION ALL SELECT 8\n UNION ALL SELECT 9) AS a\n CROSS JOIN (SELECT 0 AS a\n UNION ALL SELECT 1\n UNION ALL SELECT 2\n UNION ALL SELECT 3\n UNION ALL SELECT 4\n UNION ALL SELECT 5\n UNION ALL SELECT 6\n UNION ALL SELECT 7\n UNION ALL SELECT 8\n UNION ALL SELECT 9) AS b\n CROSS JOIN (SELECT 0 AS a\n UNION ALL SELECT 1\n UNION ALL SELECT 2\n UNION ALL SELECT 3\n UNION ALL SELECT 4\n UNION ALL SELECT 5\n UNION ALL SELECT 6\n UNION ALL SELECT 7\n UNION ALL SELECT 8\n UNION ALL SELECT 9) AS c\n ) a\n WHERE a.Date BETWEEN '{$date}' AND '{$date1}'\n ) dates\n LEFT JOIN\n (\n SELECT *,SUM(rx) AS rx_count\n FROM\n `rx_save` WHERE bdm_id = '{$bdm}' GROUP BY `created_at`\n ) DATA\n ON DATE_FORMAT(dates.mydate, '%Y%m%d') = DATE_FORMAT(DATA.created_at, '%Y%m%d') GROUP BY dates.mydate ";
return Query::executeQuery($sql);
}
示例13: last_enteries
public static function last_enteries()
{
$sql = "SELECT d.*,r.rx,r.created_at,r.rx,(CASE WHEN b.`bdm_name` IS NOT NULL THEN b.`bdm_name` ELSE tf.name END) AS NAME, \n (CASE WHEN b.`HQ` IS NOT NULL THEN b.`HQ` ELSE tf.HQ END) AS HQ ,r.bdm_id FROM `rx_save` r \n LEFT JOIN `doctor` d ON r.`doc_id` = d.`doc_id` LEFT JOIN `bdm` b ON r.`bdm_id` = b.`bdm_id` AND r.type='bdm' \n LEFT JOIN `task_force` tf ON r.`bdm_id` = tf.`tfid` AND r.type='tf' ORDER BY r.`id` DESC LIMIT 15\n ";
return Query::executeQuery($sql);
}
示例14: TMActivity
public static function TMActivity($id)
{
$sql = "SELECT * FROM TM_Launch WHERE TM_Emp_ID = {$id} ";
return Query::executeQuery($sql);
}
示例15: list_doctor
public static function list_doctor($tf_id)
{
$sql = " SELECT `doctor`.*,SUM(rx_save.rx)as rx_sum FROM `task_force` tf \nINNER JOIN `tf_doc` ON `tf_doc`.`tf_id` = tf.tfid\nINNER JOIN `doctor` ON `tf_doc`.`doc_id` = `doctor`.`doc_id`\nLEFT JOIN `rx_save` ON `rx_save`.`doc_id` = `doctor`.`doc_id` AND rx_save.`type` = 'tf'\nWHERE tf.tfid= '{$tf_id}' GROUP BY tf_doc.doc_id\n ";
// $sql="SELECT doctor.* FROM tf_doc INNER JOIN doctor ON tf_doc.doc_id=doctor.doc_id WHERE tf_doc.tf_id='$tf_id' ";
return Query::executeQuery($sql);
}