本文整理汇总了PHP中db::ExecuteQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP db::ExecuteQuery方法的具体用法?PHP db::ExecuteQuery怎么用?PHP db::ExecuteQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db
的用法示例。
在下文中一共展示了db::ExecuteQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildQuery
function buildQuery()
{
// check if query is set
if (empty($this->query)) {
$this->error = ' NO QUERY SET ';
$this->rQuery = false;
}
// check the mysql object
if (!is_a($this->mysqlOBJ, 'mysql')) {
$this->error = ' NO MYSQL OBJECT SET ';
$this->rQuery = false;
}
// check the numbers of pages
$objDb = new db();
//echo $this->query ;
//echo "<br>";
$this->result = $objDb->ExecuteQuery($this->query);
$this->totalRows = mysql_num_rows($this->result);
if ($this->result !== false) {
//$this->totalRows=$this->mysqlOBJ->num_rows;
$this->totalPages = ceil($this->totalRows / $this->maxpage);
} else {
$this->error = ' ERROR EXECUTING QUERY ';
$this->rQuery = false;
}
//echo "<br>";
//echo $this->totalPages ;
if ($this->totalRows <= $this->maxpage) {
$this->rQuery = $this->query;
} else {
$this->cPage = $this->cPage <= $this->totalPages ? $this->cPage : '1';
$limit = " LIMIT " . ($this->cPage - 1) * $this->maxpage . "," . $this->maxpage;
$this->rQuery = $this->query . $limit;
}
}
示例2: get_admin_user_country
function get_admin_user_country()
{
$obj_Db = new db();
$sql = "select * from job_main_country";
$result = $obj_Db->ExecuteQuery($sql);
$numrows = mysql_num_rows($result);
if ($numrows > 0) {
$countrylist = "<option value = '0'>Country</option>";
while ($countryobj = mysql_fetch_object($result)) {
$countrylist .= "<option value = '" . $countryobj->country_id . "'>" . $countryobj->country_name . "</option>";
}
}
return $countrylist;
}
示例3: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
require_once "../../includes/functions.php";
$objDb = new db();
$sqlplan = "select * from job_rec_payment_plans where plan_id='" . $_GET["pid"] . "'";
$resultplan = $objDb->ExecuteQuery($sqlplan);
$rsplan = mysql_fetch_object($resultplan);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
<script src="../javascript/admin.js" language="javascript"></script>
<script src="../../javascript/job.js" language="javascript"></script>
<script language="javascript">
function displayRate(id)
示例4:
$qks_8_2 = "";
$qks_9_1 = "";
$qks_9_2 = "";
$qks_10_1 = "";
$qks_10_2 = "";
$qks_10_3 = "";
$qks_11_1 = "";
$qks_11_2 = "";
$preference_emp_1_1 = "";
//$preference_emp_1_2 = "";
$preference_emp_1_3 = "Namibia";
$preference_emp_2 = "";
$preference_emp_3 = "";
$confirm_mail = "";
$sqlJob = "select * from job_ad where ad_id=" . $_GET['ad_id'];
$resultJob = $objDb->ExecuteQuery($sqlJob);
$rsJob = mysql_fetch_object($resultJob);
$confirm_mail = $rsJob->send_mail_another;
//new add ons
$fieldofstudy = $rsJob->filter_fieldofstudy;
$typeofqualification = $rsJob->filter_typeofqualification;
$levelofqualification = $rsJob->filter_levelofqualification;
$countryofstudy = $rsJob->filter_countryofstudy;
$typeofbursary = $rsJob->filter_typeofbursary;
$prefinstitution = $rsJob->filter_prefinstitution;
$advancementlevel = $rsJob->filter_advancementlevel;
$accepted = $rsJob->filter_accepted;
$passrate = $rsJob->filter_passrate;
$prefinstitution = $rsJob->filter_prefinstitution;
$parentincome = $rsJob->filter_parentincome;
$equity_status = $rsJob->filter_equity_status;
示例5: db
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<?php
require_once "../../classes/db_class.php";
$objDb = new db();
$sqlactive = "select * from job_jobseeker where seeker_status=1";
$resultactive = $objDb->ExecuteQuery($sqlactive);
$noactive = mysql_num_rows($resultactive);
$sqlinactive = "select * from job_jobseeker where seeker_status=0";
$resultinactive = $objDb->ExecuteQuery($sqlinactive);
$inactive = mysql_num_rows($resultinactive);
$sqlall = "select * from job_jobseeker ";
$resultall = $objDb->ExecuteQuery($sqlall);
$noall = mysql_num_rows($resultall);
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
</head>
<body onload="MM_preloadImages('../images/login1.gif','../images/job_search1.gif','../images/upload_cv1.gif','../images/employers1.gif','../images/features1.gif')">
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><?php
include "top.php";
?>
</td>
</tr>
<tr>
示例6: header
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
require_once "../../includes/functions.php";
$objDb = new db();
$rowCount = "";
$rows = "";
$cols = "";
$option = "";
$resultcol = "";
$resulrow = "";
$sql1 = "select field_value from job_grade_level where field_row = 0";
$sql2 = "select field_value from job_grade_level where field_column = 0";
$sql = "select field_value from job_grade_level";
$res = $objDb->ExecuteQuery($sql);
$rowCount = mysql_num_rows($res);
$res1 = $objDb->ExecuteQuery($sql1);
$cols = mysql_num_rows($res1);
$res2 = $objDb->ExecuteQuery($sql2);
$rows = mysql_num_rows($res2);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
示例7: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/pagination.php";
require_once "../../includes/functions.php";
require_once "includes/functions.php";
$objDb = new db();
$sqlLanguage = "select * from job_language";
$resultLang = $objDb->ExecuteQuery($sqlLanguage);
$rowCount = mysql_num_rows($resultLang);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
<script src="../javascript/admin.js" language="javascript"></script>
<script language="javascript">
function remove_single_language(id)
{
示例8: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
require_once "../../includes/functions.php";
$objDb = new db();
$rowCount = 0;
$cat = "";
$cat1 = "";
$option = "";
$sqlTutorial = "select * from job_vtutorials order by vt_name";
$resultTutorial = $objDb->ExecuteQuery($sqlTutorial);
//$rsadvert=mysql_fetch_object($resultadvert);
$rowCount = mysql_num_rows($resultTutorial);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
<script src="../javascript/admin.js" language="javascript"></script>
<script src="../../javascript/job.js" language="javascript"></script>
示例9: getMark
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
$arrFunctions = array("Post unlimited number of job ads", "System shortlisting", "System regret function", "Client talent database creation", "Full access to immediately available jobseekers.", "Client logo display", "Intercompany advertisement");
$arrFunctionField = array("unlimited_job_ads", "system_shortlisting", "regret_function", "client_talent", "full_access_jobseekers", "client_logo", "intercompany_ad");
$plan_type = "";
if ($_SESSION["status"] == "1") {
$plan_type = "emp";
} else {
$plan_type = "rec";
}
$sqlPlan = "select * from job_rec_payment_plans where plan_status=1 and type='" . $plan_type . "' order by plan_id";
$resultPlan = $objDb->ExecuteQuery($sqlPlan);
for ($i = 1; $i <= mysql_num_rows($resultPlan); $i++) {
$rsPlan = "rsPlan" . $i;
${$rsPlan} = mysql_fetch_object($resultPlan);
}
function getMark($status)
{
if ($status == 0) {
return '<img src="../../images/wrong_mark.gif">';
} else {
return '<img src="../../images/right_mark.gif">';
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
示例10: db
$urlPage = "";
if (isset($_GET['urlPage'])) {
$urlPage = $_GET['urlPage'];
}
$url = "";
if (isset($_GET["url"])) {
if ($_GET["url"] != "employers_list.php") {
$url .= "../utility/";
}
$url .= $_GET["url"];
}
require_once "../../classes/db_class.php";
require_once "../../includes/functions.php";
$objDb = new db();
$sqlRec = "select * from job_recruiter where rec_id=" . $_GET['rec_id'];
$resultRec = $objDb->ExecuteQuery($sqlRec);
$rsRec = mysql_fetch_object($resultRec);
$arrHeared = explode(",", $rsRec->rec_heared);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
<script src="../javascript/admin.js" language="javascript"></script>
<script language="javascript">
function goBack(url)
示例11: db
<?php
session_start();
require_once "../classes/db_class.php";
$obj_Db = new db();
$sqluser = "select * from job_user where `user_name` = '" . addslashes($_POST['user_name']) . "' and `user_password`='" . addslashes($_POST['user_password']) . "' and `user_status`=1";
$resultuser = $obj_Db->ExecuteQuery($sqluser);
$num = mysql_num_rows($resultuser);
if ($num == 1) {
$rsuser = mysql_fetch_object($resultuser);
$_SESSION["user_id"] = $rsuser->user_id;
$_SESSION["user_name"] = $rsuser->user_name;
header("location:admin_home.php");
} else {
header("location:index.php?id=fail");
}
示例12: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
require_once "../../includes/functions.php";
$objDb = new db();
$sqlVat = "select * from job_vat where vat_id=1";
$resultVat = $objDb->ExecuteQuery($sqlVat);
$rsVat = mysql_fetch_object($resultVat);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
<script src="../javascript/menubar.js" language="javascript"></script>
<script src="../javascript/admin.js" language="javascript"></script>
<script src="../../javascript/job.js" language="javascript"></script>
<script language="javascript">
function editVat()
{
示例13: date
if (isset($_GET["link"]) && $_GET["link"] == "new") {
if ($array["pay_status"] == "2") {
$array["received_date"] = date("Y-m-d");
} else {
if ($array["pay_status"] == "4") {
$array["bounce_date"] = date("Y-m-d");
}
}
$objDb->UpdateData("job_rec_payments", $array, "pay_id", $_POST['chk'][$i]);
} else {
if (isset($_GET["link"]) && $_GET["link"] == "rec") {
if ($array["pay_status"] == "1") {
$objDb->UpdateData("job_rec_payments", $array, "pay_id", $_POST['chk'][$i]);
$array["pay_date"] = date("Y-m-d");
$sqlInvoice = "select * from job_rec_invoices i,job_rec_payments p where i.invoice_id=p.invoice_id and p.pay_id=" . $_POST['chk'][$i];
$resultInvoice = $objDb->ExecuteQuery($sqlInvoice);
$rsInvoice = mysql_fetch_object($resultInvoice);
//for recruiter
$sqlRec = "select * from job_recruiter where rec_id=" . $rsInvoice->rec_id;
$resultRec = $objDb->ExecuteQuery($sqlRec);
$rsRec = mysql_fetch_object($resultRec);
//end of recruiter
//for cheque
$sqlCheque = "select * from job_rec_payments where pay_id=" . $_POST['chk'][$i];
$resultCheque = $objDb->ExecuteQuery($sqlCheque);
$rsCheque = mysql_fetch_object($resultCheque);
//end of cheque detail
//for payment
$cnt = mysql_num_rows($resultInvoice);
$paid = 0;
if ($cnt > 0) {
示例14: showId
function showId($row, $col)
{
$objDb = new db();
mysql_select_db("test");
$sql = "SELECT g_id \r\n\t\tFROM job_grade_level \r\n\t\tWHERE field_row = " . $row . " \r\n\t\tAND field_column=" . $col;
$res1 = $objDb->ExecuteQuery($sql);
$nums = mysql_num_rows($res1);
$rs = mysql_fetch_object($res1);
$aa = $rs->g_id;
//exit;
if ($nums > 0) {
return $aa;
} else {
return 0;
}
}
示例15: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
$sqlTag = "select * from job_tagline";
$resultTag = $objDb->ExecuteQuery($sqlTag);
$rsTag = mysql_fetch_object($resultTag);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Recruit Young</title>
<link rel="stylesheet" type="text/css" href="../../styles/job.css">
<link rel="stylesheet" type="text/css" href="../styles/job_admin.css">
</head>
<body onLoad="MM_preloadImages('images/home1.gif','images/job_seekers1.gif','images/employers_admin1.gif','images/utility1.gif','images/signout1.gif')">
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><?php
include "includes/top.php";
?>
</td>
</tr>
<tr>