<?php

/*
  PHP version 5
  Copyright (c) 2002-2018 ECISP.CN、EarcLink.COM
  警告：这不是一个免费的软件，请在许可范围内使用，请尊重知识产权，侵权必究，举报有奖
  作者：黄祥云 E-mail:6326420@qq.com  QQ:6326420 TEL:18665655030
*/

namespace admin_application;
class OnlineServiceDB {
    public static function lastPidOnlineService($lng = false, $return_key = false) {
        $db_where = "WHERE lng='$lng' ORDER BY pid DESC LIMIT 0,1";
        $db_table = ESPCMS_DB_PREFIX . 'calling';
        $talbe_field_array = espcms_field_out($db_table, false);
        $read_info = espcms_db_read($db_table, $db_where, $talbe_field_array);
        if (!$read_info) {
            return false;
        }
        return !$return_key ? $read_info : $read_info[$return_key];
    }
}
