当前位置: 首页>>代码示例>>PHP>>正文


PHP mysql::getall方法代码示例

本文整理汇总了PHP中mysql::getall方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql::getall方法的具体用法?PHP mysql::getall怎么用?PHP mysql::getall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysql的用法示例。


在下文中一共展示了mysql::getall方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exit

    if ($thispwd == $info['pwd']) {
        exit('true');
    } else {
        exit('false');
    }
} elseif ($act == "get_simple_tel") {
    $id = intval($_GET['id']);
    $sql = "select contact,tel from " . table('simple') . " where id=" . $id;
    $tel = $db->getone($sql);
    exit("联系方式:" . $tel['tel'] . " " . $tel['contact']);
} elseif ($act == "get_simple_detailed") {
    $id = intval($_GET['id']);
    $sql = "select detailed from " . table('simple') . " where id=" . $id;
    $detailed = $db->getone($sql);
    exit("要求:" . $detailed['detailed'] . '<a href="javascript:void(0);" class="hidden_detailed" id="' . $id . '">[收起]</a>');
} elseif ($act == "hidden_simple_detailed") {
    $id = intval($_GET['id']);
    $sql = "select detailed from " . table('simple') . " where id=" . $id;
    $detailed = $db->getone($sql);
    $detailed['detailed'] = cut_str($detailed['detailed'], 40, 0, "...");
    exit("要求:" . $detailed['detailed'] . '<a href="javascript:void(0);" class="show_detailed" id="' . $id . '">[展开]</a>');
} elseif ($act == "get_sdistrict") {
    $id = intval($_GET['id']);
    $sql = "select id,categoryname from " . table('category_district') . " where parentid=" . $id;
    $result = $db->getall($sql);
    $html = "";
    foreach ($result as $key => $value) {
        $html .= '<li id="' . $value["id"] . '" did="' . $value["id"] . '" title="' . $value["categoryname"] . '">' . $value["categoryname"] . '</li>';
    }
    exit($html);
}
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:ajax_simple.php

示例2: COUNT

    if (empty($count[$x])) {
        $count[$x] = 0;
    }
}
//分页
require_once QISHI_ROOT_PATH . 'include/page.class.php';
$perpage = 10;
$total_sql = "SELECT COUNT(*) AS num from " . table('evaluation_record') . " WHERE uid=" . $_SESSION['uid'];
$total_val = $db->get_total($total_sql);
$page = new page(array('total' => $total_val, 'perpage' => $perpage, 'getarray' => $_GET));
$currenpage = $page->nowindex;
$offset = ($currenpage - 1) * $perpage;
$limit = " LIMIT " . intval($offset) . ',' . intval($perpage);
//答卷信息
$paper_sql = "SELECT r.*,name FROM " . table('evaluation_record') . " AS r  LEFT JOIN  " . table('evaluation_type') . " AS t  ON r.type_id=t.id  WHERE uid=" . $_SESSION['uid'] . "  ORDER BY addtime desc " . $limit;
$record_list = $db->getall($paper_sql);
foreach ($record_list as $key => $value) {
    switch ($value['type_id']) {
        case '1':
            $value['url'] = url_rewrite('QS_selfcognition');
            break;
        case '2':
            $value['url'] = url_rewrite('QS_occupation');
            break;
        case '3':
            $value['url'] = url_rewrite('QS_talents');
            break;
        default:
            $value['url'] = url_rewrite('QS_management');
            break;
    }
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:my_evaluation.php

示例3: ltrim

    }
    if (!empty($wheresql)) {
        $wheresql = " WHERE " . ltrim(ltrim($wheresql), 'AND');
        $wheresql .= " AND map_x!='' AND map_y!='' ";
    }
    $id = array();
    if (!empty($lng) && !empty($lat)) {
        $idresult = $db->query("SELECT id , ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM {$jobstable} " . $wheresql . " ORDER BY juli ASC   LIMIT {$offset},{$rows}");
        while ($row = $db->fetch_array($idresult)) {
            $id[] = $row['id'];
        }
    }
    if (!empty($id)) {
        $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
        $sql = "SELECT *, ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM " . table('jobs') . $wheresql . "  ORDER BY juli ASC , stick DESC , refreshtime DESC ";
        $jobs_list = $db->getall($sql);
        foreach ($jobs_list as $key => $value) {
            $jobs_list[$key]["juli"] = distancerange($value["juli"]);
        }
    } else {
        $jobs_list = array();
    }
    $smarty->assign('jobs', $jobs_list);
    $smarty->assign('goback', $_SERVER["HTTP_REFERER"]);
    //热门关键字
    $sqlnearhot = "select w_word,w_hot from " . table("hotword") . " order by w_hot desc limit 15 ";
    $hotword_list = $db->getall($sqlnearhot);
    $smarty->assign('hotword', $hotword_list);
    $smarty->display("m/m-jobs-near-list.html");
} elseif ($act == 'ajaxjobsnearlist') {
    $district = intval($_GET['district']) == 0 ? "" : intval($_GET['district']);
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:jobs-near-list.php

示例4: mysql

require_once QISHI_ROOT_PATH . 'include/fun_wap.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$smarty->cache = false;
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
require_once dirname(__FILE__) . '/weixin_share.php';
$show = jobfair_one($_GET['id']);
$time = time();
if ($show) {
    //状态
    if ($show['predetermined_status'] == "1" && $show['predetermined_start'] > $time) {
        $show['predetermined_ok'] = 1;
        // 未开始
    } else {
        if ($show['predetermined_status'] == "1" && $show['holddate_start'] > $time && ($show['predetermined_end'] == "0" || $show['predetermined_end'] > $time) && ($show['predetermined_web'] == "1" || $show['predetermined_tel'] == "1")) {
            $show['predetermined_ok'] = 2;
            // 预定中
        } else {
            $show['predetermined_ok'] = 0;
            // 已结束
        }
    }
    //参会行业
    $jobfair_trade = explode(",", $show['trade_cn']);
    $show["trade_cn"] = $jobfair_trade;
    $smarty->assign('show', $show);
    //参会企业
    $exhibitors = $db->getall("SELECT * FROM " . table('jobfair_exhibitors') . " WHERE jobfairid=" . $show["id"]);
    $smarty->assign('exhibitors', $exhibitors);
}
$smarty->assign('goback', $_SERVER["HTTP_REFERER"]);
$smarty->display("m/jobfair-show.html");
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:jobfair-show.php

示例5: empty

$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "resume-list.php?sdistrict=" . $sdistrict . "&amp;subclass=" . $subclass . "&amp;key=" . $key;
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} as r {$joinsql} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT id FROM {$jobstable} as r " . $joinsql . $wheresql . $orderbysql . $limit);
while ($row = $db->fetch_array($idresult)) {
    $id[] = $row['id'];
}
if (!empty($id)) {
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") AND display=1 AND audit=1 ";
    $resume = $db->getall("SELECT * FROM " . table('resume') . $wheresql . $orderbysql);
    foreach ($resume as $key => $value) {
        if ($value['display_name'] == "2") {
            $value['fullname'] = "N" . str_pad($value['id'], 7, "0", STR_PAD_LEFT);
            $value['fullname_'] = $value['fullname'];
        } elseif ($value['display_name'] == "3") {
            if ($value['sex'] == 1) {
                $value['fullname'] = cut_str($value['fullname'], 1, 0, "先生");
            } elseif ($value['sex'] == 2) {
                $value['fullname'] = cut_str($value['fullname'], 1, 0, "女士");
            }
            $value['fullname_'] = $value['fullname'];
        } else {
            $value['fullname_'] = $value['fullname'];
            $value['fullname'] = $value['fullname'];
        }
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:resume-list.php

示例6: dirname

 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once QISHI_ROOT_PATH . 'include/fun_wap.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$smarty->cache = false;
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
require_once dirname(__FILE__) . '/weixin_share.php';
wap_weixin_logon($_GET['from']);
$row = jobs_one($_GET['id']);
//感兴趣的职位
$interest_show = interest_jobs($row['topclass'], $row['category'], $row['subclass'], $_GET['id']);
if ($_SESSION["uid"] && $_SESSION["utype"] == 2) {
    $sql = "select * from " . table("resume") . " where uid={$_SESSION['uid']} ";
    $resume_list = $db->getall($sql);
    $smarty->assign('resume_list', $resume_list);
}
$show = false;
if ($_CFG['showjobcontact_wap'] == '0') {
    $show = true;
} elseif ($_CFG['showjobcontact_wap'] == '1') {
    if ($_SESSION['uid'] && $_SESSION['username'] && $_SESSION['utype'] == '2') {
        $show = true;
    } else {
        $show = false;
    }
} elseif ($_CFG['showjobcontact_wap'] == '2') {
    if ($_SESSION['uid'] && $_SESSION['username'] && $_SESSION['utype'] == '2') {
        $val = $db->getone("select uid from " . table('resume') . " where uid='{$_SESSION['uid']}' LIMIT 1");
        if (!empty($val)) {
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:jobs-show.php

示例7: table

 $company_info['wzp_click'] = $praise;
 if ($company_info['logo']) {
     $company_info['logo'] = $_CFG['site_domain'] . $_CFG['site_dir'] . 'data/logo/' . $company_info['logo'];
 } else {
     $company_info['logo'] = $_CFG['site_domain'] . $_CFG['site_dir'] . 'data/logo/no_logo.gif';
 }
 $smarty->assign('company_info', $company_info);
 if (empty($company_info)) {
     $smarty->display("m/m-wzp_error.html");
 } else {
     // 企业自己访问出现菜单
     if ($vip_menu == "1") {
         $smarty->assign('show_menue', 1);
     }
     // 企业职位
     $company_jobs = $db->getall("SELECT j.*,c.telephone from " . table("jobs") . " as j left join " . table("jobs_contact") . " as c on j.id=c.pid where j.uid={$company_info['uid']} ");
     $smarty->assign('company_jobs', $company_jobs);
     // 企业标签
     $company_tag = explode(",", $company_info['tag']);
     foreach ($company_tag as $key => $value) {
         $val = explode("|", $value);
         $company_tagarr['id'][] = $val[0];
         $company_tagarr['tag_cn'][] = $val[1];
     }
     // 默认标签
     $_CAT = get_cache('category');
     if (!empty($_CAT['QS_jobtag'])) {
         foreach ($_CAT["QS_jobtag"] as $cat) {
             $list[] = $cat['categoryname'];
         }
         $list = array_slice($list, 0, 6);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:m-wzp.php

示例8: empty

}
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "wap-jobs-list.php?district=" . $district . "&amp;sdistrict=" . $sdistrict . "&amp;trade=" . $trade . "&amp;topclass=" . $topclass . "&amp;category=" . $category . "&amp;subclass=" . $subclass . "&amp;wage=" . $wage . "&amp;key=" . $key;
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} {$wheresql}";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT id FROM {$jobstable} " . $wheresql . $orderbysql . $limit);
while ($row = $db->fetch_array($idresult)) {
    $id[] = $row['id'];
}
if (!empty($id)) {
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
    $jobs = $db->getall("SELECT * FROM " . table('jobs') . $wheresql . $orderbysql);
    foreach ($jobs as $key => $value) {
        $jobs[$key]['url'] = wap_url_rewrite("wap-jobs-show", array("id" => $value['id']));
        if (!empty($value['highlight'])) {
            $jobs[$key]['jobs_name'] = "<span style=\"color:{$value['highlight']}\">{$value['jobs_name']}</span>";
        }
    }
} else {
    $jobs = array();
}
$smarty->assign('jobs', $jobs);
$smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl));
$smarty->display("wap/wap-jobs-list.html");
开发者ID:source-hunter,项目名称:74cms,代码行数:31,代码来源:wap-jobs-list.php

示例9: dirname

 * 74cms WAP
 * ============================================================================
 * 版权所有: 骑士网络,并保留所有权利。
 * 网站地址: http://www.74cms.com;
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once QISHI_ROOT_PATH . 'include/fun_wap.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$smarty->cache = false;
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
require_once dirname(__FILE__) . '/weixin_share.php';
$id = intval($_GET['id']);
$row = resume_one($id);
wap_weixin_logon($_GET['from']);
if (intval($_SESSION["uid"]) > 0) {
    $sql = "select * from " . table("company_down_resume") . " where company_uid={$_SESSION['uid']} and resume_id=" . $id;
    $down_resume = $db->getone($sql);
    $smarty->assign('down_resume', $down_resume);
    $time = time();
    $jobs_sql = "select * from " . table("jobs") . " where uid={$_SESSION['uid']} and display=1 and deadline>{$time} ";
    $jobs_row = $db->getall($jobs_sql);
    $smarty->assign('jobs_row', $jobs_row);
}
$smarty->assign('show', $row);
$smarty->assign('goback', $_SERVER["HTTP_REFERER"]);
$smarty->display("m/m-resume-show.html");
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:resume-show.php

示例10: mysql

$smarty->cache = false;
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
$jobstable = table('article');
$orderbysql = " ORDER BY `id` desc";
$perpage = 5;
$count = 0;
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$theurl = "wap-news-list.php";
$start = ($page - 1) * $perpage;
$total_sql = "SELECT COUNT(*) AS num FROM {$jobstable} ";
$count = $db->get_total($total_sql);
$limit = " LIMIT {$start},{$perpage}";
$idresult = $db->query("SELECT id FROM {$jobstable} " . $orderbysql . $limit);
while ($row = $db->fetch_array($idresult)) {
    $id[] = $row['id'];
}
if (!empty($id)) {
    $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
    $article = $db->getall("SELECT * FROM " . table('article') . $wheresql . $orderbysql);
    foreach ($article as $key => $value) {
        $article[$key]['url'] = wap_url_rewrite("wap-news-show", array("id" => $value['id']));
    }
} else {
    $article = array();
}
$smarty->assign('article', $article);
$smarty->display("wap/wap-news-list.html");
开发者ID:dalinhuang,项目名称:yy,代码行数:31,代码来源:wap-news-list.php

示例11: mysql

        $redirect_sitename = $subinfo['sitename'];
    }
}
$smarty->assign('redirect_to_subsite', $redirect_to_subsite);
$smarty->assign('redirect_url', $redirect_url);
$smarty->assign('redirect_disname', $redirect_disname);
$smarty->assign('redirect_sitename', $redirect_sitename);
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
require_once dirname(__FILE__) . '/weixin_share.php';
if ($_CFG['subsite_id'] > 0) {
    $subsite_wheresql = ' subsite_id=' . intval($_CFG['subsite_id']) . ' ';
} else {
    $subsite_wheresql = ' 1=1 ';
}
//公告
$notice_list = $db->getall("SELECT * FROM " . table('notice') . " where " . $subsite_wheresql . "  ORDER BY `sort` DESC,`id` DESC LIMIT 5");
$smarty->assign('notice_list', $notice_list);
//紧急职位
$emergency_jobs = $db->getall("SELECT id,subsite_id,jobs_name,district_cn,companyname,wage_cn,refreshtime FROM " . table('jobs') . " WHERE emergency=1 and " . $subsite_wheresql . " ORDER BY `refreshtime` DESC,`id` DESC LIMIT 5");
foreach ($emergency_jobs as $key => $value) {
    $emergency_jobs[$key]['url'] = wap_url_rewrite("jobs-show", array("id" => $value['id']), 1, $value['subsite_id']);
    $emergency_jobs[$key]['r_time'] = daterange(time(), $value['refreshtime'], 'Y-m-d', "#FF3300");
}
$smarty->assign('emergency_jobs', $emergency_jobs);
//推荐职位
$recommend_jobs = $db->getall("SELECT id,subsite_id,jobs_name,district_cn,companyname,wage_cn,refreshtime FROM " . table('jobs') . " WHERE recommend=1 and " . $subsite_wheresql . " ORDER BY `refreshtime` DESC,`id` DESC LIMIT 5");
foreach ($recommend_jobs as $key => $value) {
    $recommend_jobs[$key]['url'] = wap_url_rewrite("jobs-show", array("id" => $value['id']), 1, $value['subsite_id']);
    $recommend_jobs[$key]['r_time'] = daterange(time(), $value['refreshtime'], 'Y-m-d', "#FF3300");
}
$smarty->assign('recommend_jobs', $recommend_jobs);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:index.php

示例12: intval

            $infoarr['experience'] = $setsqlarr['experience'];
            $infoarr['experience_cn'] = $setsqlarr['experience_cn'];
            $infoarr['phone'] = $setsqlarr['telephone'];
            $infoarr['email'] = $setsqlarr['email'];
            $infoarr['uid'] = intval($_SESSION['uid']);
            $db->inserttable(table('members_info'), $infoarr);
        }
        baidu_submiturl(url_rewrite('QS_resumeshow', array('id' => $pid)), 'addresume');
        echo $pid;
        // header("Location: ?act=resume_success&pid=".$pid);
    }
} elseif ($act == "resume_success") {
    $smarty->cache = false;
    $id = intval($_GET['pid']);
    $sql = "select j.* from " . table("jobs") . " as j left join " . table("resume_jobs") . " as r on r.category=j.category where r.pid={$id} limit 5";
    $resume_jobs = $db->getall($sql);
    $smarty->assign('resume_jobs', $resume_jobs);
    $smarty->display('wap/personal/wap-create-resume-success.html');
} elseif ($act == "resume_list") {
    $smarty->cache = false;
    $wheresql = " WHERE uid='" . intval($_SESSION['uid']) . "' ";
    $sql = "SELECT * FROM " . table('resume') . $wheresql;
    $resume_list = get_resume_list($sql, 12, true, true, true);
    $smarty->assign('resume_list', $resume_list);
    $smarty->display('wap/personal/wap-resume-index.html');
} elseif ($act == "resume_one") {
    $smarty->cache = false;
    $id = intval($_GET['pid']);
    $resume_one = resume_one($id);
    $smarty->assign('resume_one', $resume_one);
    $smarty->assign('resume_basic', get_resume_basic(intval($_SESSION['uid']), $id));
开发者ID:source-hunter,项目名称:74cms,代码行数:31,代码来源:wap_user.php

示例13: dirname

define('IN_QISHI', true);
$alias = "QS_evaluation_index";
require_once dirname(__FILE__) . '/../include/common.inc.php';
$smarty->assign("evaluation_nav", "index");
if ($mypage['caching'] > 0) {
    $smarty->cache = true;
    $smarty->cache_lifetime = $mypage['caching'];
} else {
    $smarty->cache = false;
}
$cached_id = $alias . (isset($_GET['id']) ? "|" . intval($_GET['id']) % 100 . '|' . intval($_GET['id']) : '') . (isset($_GET['page']) ? "|p" . intval($_GET['page']) % 100 : '');
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
//统计测评类型参与人数
$sql = "SELECT *  FROM " . table('evaluation_type') . " ";
$type_info = $db->getall($sql);
foreach ($type_info as $key => $value) {
    $num = 0;
    $sql_num = "SELECT * FROM " . table('evaluation_paper') . " WHERE type_id=" . $value['id'];
    $type_num = $db->query($sql_num);
    while ($row = $db->fetch_array($type_num)) {
        $num = $num + intval($row['join_num']);
    }
    $type_info[$key]['join_num'] = $num;
}
//热门测评
$paper_sql = "SELECT * FROM " . table('evaluation_paper') . " ORDER BY join_num LIMIT 10 ";
$paper_info = $db->getall($paper_sql);
foreach ($paper_info as $key => $value) {
    $paper_info[$key]['key'] = $key + 1;
}
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:index.php

示例14: intval

     $smarty->assign('next_page', 1);
     if ($page != 1) {
         $smarty->assign('pre_page', 1);
     }
 } else {
     $page = $_REQUEST['page'] ? intval($_REQUEST['page']) + 1 : 2;
     if ($page != $page_num) {
         $smarty->assign('next_page', 1);
     }
     $smarty->assign('pre_page', 1);
     $offset = ($page - 1) * $perpage;
     $smarty->assign('page', $page);
 }
 $limit = " LIMIT " . intval($offset) . ',' . intval($perpage);
 $question_sql = "SELECT * FROM " . table('evaluation_question') . " WHERE paper_id=" . $id . " ORDER BY id asc " . $limit;
 $question_list = $db->getall($question_sql);
 foreach ($question_list as $key => $value) {
     $option_sql = "SELECT * FROM " . table('evaluation_option') . " WHERE question_id=" . $value['id'] . " ORDER BY id asc ";
     $option_list = $db->getall($option_sql);
     $question_list2[intval($offset) + intval($key) + 1] = $value;
     $question_list2[intval($offset) + intval($key) + 1]['key'] = intval($offset) + intval($key) + 1;
     $question_list2[intval($offset) + intval($key) + 1]['option'] = $option_list;
 }
 $smarty->assign('question_list', $question_list2);
 $paperid = intval($_REQUEST['paperid']);
 $page_num = intval($_REQUEST['page_num']);
 $perpage = intval($_REQUEST['perpage']);
 $total_val = intval($_REQUEST['total_val']);
 //读取 答完页的session 整合当前页面的 要不然当前页面的数据会把之前存的session覆盖掉
 if (!empty($_SESSION['paper_info'])) {
     $pagerarr = json_decode($_SESSION['paper_info'], true);
开发者ID:winiceo,项目名称:job,代码行数:31,代码来源:evaluation_ajax.php

示例15: ltrim

    }
    if (!empty($wheresql)) {
        $wheresql = " WHERE " . ltrim(ltrim($wheresql), 'AND');
        $wheresql .= " AND map_x!='' AND map_y!='' ";
    }
    $id = array();
    if (!empty($lng) && !empty($lat)) {
        $idresult = $db->query("SELECT id , ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM {$jobstable} " . $wheresql . " ORDER BY juli ASC   LIMIT {$offset},{$rows}");
        while ($row = $db->fetch_array($idresult)) {
            $id[] = $row['id'];
        }
    }
    if (!empty($id)) {
        $wheresql = " WHERE id IN (" . implode(',', $id) . ") ";
        $sql = "SELECT *, ROUND(6378.138*2*ASIN(SQRT(POW(SIN((" . $lat . "*PI()/180-map_y*PI()/180)/2),2)+COS(" . $lat . "*PI()/180)*COS(map_y*PI()/180)*POW(SIN((" . $lng . "*PI()/180-map_x*PI()/180)/2),2)))*1000) AS juli FROM " . table('jobs') . $wheresql . "  ORDER BY juli ASC , stick DESC , refreshtime DESC ";
        $jobs_list = $db->getall($sql);
        foreach ($jobs_list as $key => $value) {
            $jobs_list[$key]["juli"] = distancerange($value["juli"]);
        }
    } else {
        $jobs_list = array();
    }
    $smarty->assign('jobs', $jobs_list);
    $smarty->assign('goback', $_SERVER["HTTP_REFERER"]);
    $smarty->display("m/m-jobs-near-list.html");
} elseif ($act == 'ajaxjobsnearlist') {
    $district = intval($_GET['district']) == 0 ? "" : intval($_GET['district']);
    $sdistrict = intval($_GET['sdistrict']) == 0 ? "" : intval($_GET['sdistrict']);
    $trade = intval($_GET['trade']) == 0 ? "" : intval($_GET['trade']);
    $topclass = intval($_GET['topclass']) == 0 ? "" : intval($_GET['topclass']);
    $category = intval($_GET['category']) == 0 ? "" : intval($_GET['category']);
开发者ID:winiceo,项目名称:fenzhan,代码行数:31,代码来源:jobs-near-list.php


注:本文中的mysql::getall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。