• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP execute_query函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中execute_query函数的典型用法代码示例。如果您正苦于以下问题:PHP execute_query函数的具体用法?PHP execute_query怎么用?PHP execute_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_person_schedule

function get_person_schedule($str, $date)
{
    if (!$date) {
        return array();
    }
    $email = mysql_real_escape_string($str);
    $query_date = date_format($date, 'Y-m-d');
    $result = execute_query("SELECT * FROM fuway_schedule WHERE email = \"{$email}\" AND slotdate = \"{$query_date}\" LIMIT 0, 10");
    $slots = array();
    if ($result) {
        while ($row = mysql_fetch_array($result)) {
            $slot = array();
            $person = array();
            $person["Email"] = $row["email"];
            $person["Code"] = $row["person_code"];
            $person["Name"] = $row["person_name"];
            $person["Role"] = $row["role"];
            $slot["Person"] = $person;
            $slot["Date"] = strtotime($row["slotdate"]);
            $slot["Slot"] = (int) $row["slot"];
            $slot["Room"] = $row["room"];
            $slot["Class"] = $row["class"];
            $slot["Course"] = $row["course"];
            array_push($slots, $slot);
        }
    }
    return $slots;
}
开发者ID:CocDamCode,项目名称:fu-where-are-you,代码行数:28,代码来源:api.php


示例2: admin_generateMenusList

/**
 * Generates menus list.
 *
 * @param iMSCP_pTemplate $tpl Template engine instance
 * @return void
 */
function admin_generateMenusList($tpl)
{
    $query = "SELECT * FROM `custom_menus`";
    $stmt = execute_query($query);
    if (!$stmt->rowCount()) {
        $tpl->assign('MENUS_LIST_BLOCK', '');
        set_page_message(tr('No custom menu found.'), 'static_info');
    } else {
        while (!$stmt->EOF) {
            $menuId = $stmt->fields['menu_id'];
            $menuLevel = $stmt->fields['menu_level'];
            $menuOrder = $stmt->fields['menu_order'];
            $menuName = $stmt->fields['menu_name'];
            $menuLink = $stmt->fields['menu_link'];
            if ($menuLevel == 'A') {
                $menuLevel = tr('Administrator');
            } elseif ($menuLevel == 'R') {
                $menuLevel = tr('Reseller');
            } elseif ($menuLevel == 'C') {
                $menuLevel = tr('Customer');
            } elseif ($menuLevel == 'AR') {
                $menuLevel = tr('Administrator and reseller');
            } elseif ($menuLevel == 'AC') {
                $menuLevel = tr('Administrator and customer');
            } elseif ($menuLevel == 'RC') {
                $menuLevel = tr('Reseller and customer');
            } elseif ($menuLevel == 'ARC') {
                $menuLevel = tr('All');
            }
            $tpl->assign(array('MENU_LINK' => tohtml($menuLink), 'MENU_ID' => $menuId, 'LEVEL' => tohtml($menuLevel), 'ORDER' => $menuOrder, 'MENU_NAME' => tohtml($menuName), 'LINK' => tohtml($menuLink)));
            $tpl->parse('MENU_BLOCK', '.menu_block');
            $stmt->moveNext();
        }
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:41,代码来源:custom_menus.php


示例3: ipban

function ipban()
{
    $p = split('\\.', $_SERVER['REMOTE_ADDR']);
    $query = sprintf(CHECK_IPBAN, $p[0], $p[0], $p[1], $p[0], $p[1], $p[2], $p[0], $p[1], $p[2], $p[3]);
    $result = execute_query($query, 'ipban.php', 0, 0);
    $result->fetch_row();
    return $result->row[0];
}
开发者ID:brenoinojosa,项目名称:ragnarok-public,代码行数:8,代码来源:ipban.php


示例4: generatePage

/**
 * Generates page
 *
 * @param iMSCP_pTemplate $tpl Template engine instance
 * @return void
 */
function generatePage($tpl)
{
    $stmt = execute_query("SELECT admin_id, admin_name FROM admin WHERE admin_type = 'reseller'");
    while ($row = $stmt->fetchRow(PDO::FETCH_ASSOC)) {
        _generateResellerStatistics($tpl, $row['admin_id'], $row['admin_name']);
        $tpl->parse('RESELLER_STATISTICS_BLOCK', '.reseller_statistics_block');
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:14,代码来源:reseller_statistics.php


示例5: bf_error

function bf_error($username)
{
    $log_ip = $_SERVER['REMOTE_ADDR'];
    $current = time();
    $query = sprintf(BF_ADD, $username, $log_ip, $current, 0);
    $result = execute_query($query, "check_user", 1, 0);
    return 1;
}
开发者ID:jaison,项目名称:CeresCP,代码行数:8,代码来源:bruteforce.php


示例6: export_table2xls

function export_table2xls($table)
{
    $sql_query = "SELECT * FROM " . $table;
    $results = execute_query($sql_query);
    query2xls($results, 'xlsfiles/' . $table . '.xls');
    //	echo "<P>Table $table exported <A HREF='export/$table.xls'>here</A><P>";
    //	ob_implicit_flush();
}
开发者ID:nkiourt,项目名称:amacs,代码行数:8,代码来源:export_db2xls_attikon_giorgos.php


示例7: check_hcv_coinfection

function check_hcv_coinfection($code)
{
    $query = "SELECT * FROM coinfections WHERE HCV='1' AND PatientCode = " . $code;
    $result = execute_query($query);
    $row = mysql_fetch_array($result);
    $num_rows = mysql_num_rows($result);
    mysql_free_result($result);
    if ($num_rows != 1) {
        show_errormsg("Δεν υπάρχει στη βάση καταχώρηση με συλλοίμωξη HCV και κωδικό ασθενή " . $code . ". <a href='coinfection.php?code={$code}'>Καταχωρήστε πρώτα την συνλοίμωξη στη βάση.</a>");
    }
}
开发者ID:nkiourt,项目名称:amacs,代码行数:11,代码来源:form_functions.inc.php


示例8: check_patient

function check_patient($code)
{
    $query = "SELECT * FROM patients WHERE PatientCode = " . $code;
    $result = execute_query($query);
    $row = mysql_fetch_array($result);
    $num_rows = mysql_num_rows($result);
    mysql_free_result($result);
    if ($num_rows == 1) {
        return 1;
    } else {
        return 0;
    }
}
开发者ID:nkiourt,项目名称:amacs,代码行数:13,代码来源:ajax_insert.php


示例9: change_sql_user_pass

function change_sql_user_pass(&$sql, $db_user_id, $db_user_name)
{
    global $cfg;
    if (!isset($_POST['uaction'])) {
        return;
    }
    if ($_POST['pass'] === '' && $_POST['pass_rep'] === '') {
        set_page_message(tr('Please type user password!'));
        return;
    }
    if ($_POST['pass'] !== $_POST['pass_rep']) {
        set_page_message(tr('Entered passwords does not match!'));
        return;
    }
    if (strlen($_POST['pass']) > $cfg['MAX_SQL_PASS_LENGTH']) {
        set_page_message(tr('Too long user password!'));
        return;
    }
    $user_pass = $_POST['pass'];
    //
    // update user pass in the vhcs sql_user table;
    //
    $query = <<<SQL_QUERY
        update
            sql_user
        set
            sqlu_pass = ?
        where
            sqlu_id = ?
SQL_QUERY;
    $rs = exec_query($sql, $query, array($user_pass, $db_user_id));
    //
    // update user pass in the mysql system tables;
    //
    $query = <<<SQL_QUERY

        SET PASSWORD FOR '{$db_user_name}'@'%' = PASSWORD('{$user_pass}')
 
SQL_QUERY;
    $rs = execute_query($sql, $query);
    $query = <<<SQL_QUERY

\tSET PASSWORD FOR '{$db_user_name}'@localhost = PASSWORD('{$user_pass}')

SQL_QUERY;
    $rs = execute_query($sql, $query);
    write_log($_SESSION['user_logged'] . " : update SQL user password" . $db_user_name);
    set_page_message(tr('SQL user password was successfully changed!'));
    user_goto('manage_sql.php');
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:50,代码来源:sql_change_password.php


示例10: listIPDomains

/**
 * Generate List of Domains assigned to IPs
 *
 * @param  iMSCP_pTemplate $tpl Template engine
 * @return void
 */
function listIPDomains($tpl)
{
    $resellerId = $_SESSION['user_id'];
    $stmt = exec_query('SELECT reseller_ips FROM reseller_props WHERE reseller_id = ?', $resellerId);
    $data = $stmt->fetchRow();
    $resellerIps = explode(';', substr($data['reseller_ips'], 0, -1));
    $stmt = execute_query('SELECT ip_id, ip_number FROM server_ips WHERE ip_id IN (' . implode(',', $resellerIps) . ')');
    while ($ip = $stmt->fetchRow(PDO::FETCH_ASSOC)) {
        $stmt2 = exec_query('
				SELECT
					domain_name
				FROM
					domain
				INNER JOIN
					admin ON(admin_id = domain_admin_id)
				WHERE
					domain_ip_id = :ip_id
				AND
					created_by = :reseller_id
				UNION
				SELECT
					alias_name AS domain_name
				FROM
					domain_aliasses
				INNER JOIN
					domain USING(domain_id)
				INNER JOIN
					admin ON(admin_id = domain_admin_id)
				WHERE
					alias_ip_id = :ip_id
				AND
					created_by = :reseller_id
			', array('ip_id' => $ip['ip_id'], 'reseller_id' => $resellerId));
        $domainsCount = $stmt2->rowCount();
        $tpl->assign(array('IP' => tohtml($ip['ip_number']), 'RECORD_COUNT' => tr('Total Domains') . ': ' . $domainsCount));
        if ($domainsCount) {
            while ($data = $stmt2->fetchRow(PDO::FETCH_ASSOC)) {
                $tpl->assign('DOMAIN_NAME', tohtml(idn_to_utf8($data['domain_name'])));
                $tpl->parse('DOMAIN_ROW', '.domain_row');
            }
        } else {
            $tpl->assign('DOMAIN_NAME', tr('No used yet'));
            $tpl->parse('DOMAIN_ROW', 'domain_row');
        }
        $tpl->parse('IP_ROW', '.ip_row');
        $tpl->assign('DOMAIN_ROW', '');
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:54,代码来源:ip_usage.php


示例11: update_reseller_owner

/**
 *
 */
function update_reseller_owner()
{
    if (isset($_POST['uaction']) && $_POST['uaction'] === 'reseller_owner') {
        $query = "\n\t\t\tSELECT\n\t\t\t\t`admin_id`\n\t\t\tFROM\n\t\t\t\t`admin`\n\t\t\tWHERE\n\t\t\t\t`admin_type` = 'reseller'\n\t\t\tORDER BY\n\t\t\t\t`admin_name`\n\t\t";
        $rs = execute_query($query);
        while (!$rs->EOF) {
            $admin_id = $rs->fields['admin_id'];
            $admin_id_var_name = "admin_id_{$admin_id}";
            if (isset($_POST[$admin_id_var_name]) && $_POST[$admin_id_var_name] === 'on') {
                $dest_admin = $_POST['dest_admin'];
                $query = "\n\t\t\t\t\tUPDATE\n\t\t\t\t\t\t`admin`\n\t\t\t\t\tSET\n\t\t\t\t\t\t`created_by` = ?\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`admin_id` = ?\n\t\t\t\t";
                exec_query($query, array($dest_admin, $admin_id));
            }
            $rs->moveNext();
        }
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:20,代码来源:manage_reseller_owners.php


示例12: grava_quais

function grava_quais($id1, $id2, $qual, $id_conn)
{
    switch ($qual) {
        case 1:
            $sql = 'INSERT INTO tb_familiaquaisespecies ';
            $sql .= '(familia_id, especie_id) ';
            $sql .= 'VALUES';
            $sql .= '(' . $id1 . ',' . $id2 . ')';
            break;
        case 2:
            $sql = 'INSERT INTO tb_generoquaisespecies ';
            $sql .= '(genero_id, especie_id) ';
            $sql .= 'VALUES';
            $sql .= '(' . $id1 . ',' . $id2 . ')';
            break;
    }
    return execute_query($sql, $id_conn);
}
开发者ID:kureshio,项目名称:colecao,代码行数:18,代码来源:grava_especie.php


示例13: libera_acesso

function libera_acesso($item, $id_conn)
{
    if ($_SESSION['admin'] == '0') {
        $sql = "SELECT tb_usuarioquaisacessos.usuarioquaisacessos_id FROM tb_acesso ";
        $sql .= "INNER JOIN tb_usuarioquaisacessos ON (tb_usuarioquaisacessos.acesso_id = tb_acesso.acesso_id) ";
        $sql .= "WHERE tb_acesso.acesso_nome='%s' ";
        $sql .= "AND tb_usuarioquaisacessos.usuario_id = '%s' LIMIT 1";
        $sql = sprintf($sql, mysql_real_escape_string($item), mysql_real_escape_string($_SESSION['usuario_id']));
        $acessou = execute_query($sql, $id_conn);
        if (!$acessou) {
            $messagem = 'Query Inválida: ' . mysql_error() . "\n";
            $messagem .= 'Pesquisa Inteira: ' . $sql;
            die($messagem);
        }
        if (num_rows($acessou) == 0) {
            header("Location: acesso_proibido.php");
            exit(0);
        }
    }
}
开发者ID:kureshio,项目名称:colecao,代码行数:20,代码来源:funcao.php


示例14: _client_generateIpsList

/**
 * Generates IPs list.
 *
 * @access private
 * @param iMSCP_pTemplate $tpl Template engine
 * @return void
 */
function _client_generateIpsList($tpl)
{
    /** @var $cfg iMSCP_Config_Handler_File */
    $cfg = iMSCP_Registry::get('config');
    $query = "SELECT * FROM `server_ips`";
    $stmt = execute_query($query);
    if ($stmt->rowCount()) {
        while (!$stmt->EOF) {
            list($actionName, $actionUrl) = _client_generateIpAction($stmt->fields['ip_id'], $stmt->fields['ip_status']);
            $tpl->assign(array('IP' => $stmt->fields['ip_number'], 'NETWORK_CARD' => $stmt->fields['ip_card'] === NULL ? '' : tohtml($stmt->fields['ip_card'])));
            $tpl->assign(array('ACTION_NAME' => $cfg->BASE_SERVER_IP == $stmt->fields['ip_number'] ? tr('Protected') : $actionName, 'ACTION_URL' => $cfg->BASE_SERVER_IP == $stmt->fields['ip_number'] ? '#' : $actionUrl));
            $tpl->parse('IP_ADDRESS_BLOCK', '.ip_address_block');
            $stmt->moveNext();
        }
    } else {
        // Should never occur but who knows.
        $tpl->assign('IP_ADDRESSES_BLOCK', '');
        set_page_message(tr('No IP address found.'), 'info');
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:27,代码来源:ip_manage.php


示例15: grava_usuario

function grava_usuario()
{
    $filename = upload_foto();
    require '../config/infodbcon.php';
    require '../config/database.php';
    $id_conn = open_database();
    $post = array_map("mysql_real_escape_string", $_POST);
    execute_query("START TRANSACTION", $id_conn);
    if ($post['cmb_cadastro'] == '0') {
        $sql = 'INSERT INTO tb_usuario ';
        $sql .= '(usuario_nome, usuario_login, usuario_senha, usuario_email, usuario_foto, usuario_info, usuario_ativo)';
        $sql .= 'VALUES ';
        $sql .= '(\'' . addslashes(utf8_decode($_POST['nome'])) . '\', \'' . utf8_decode($post['login']) . '\', ';
        $sql .= '\'' . md5('123mudar') . '\', \'' . $post['email'] . '\',';
        $sql .= '\'' . $filename . '\', \'' . addslashes(utf8_decode($_POST['infor'])) . '\', \'' . ($post['ativo'] ? 1 : 0) . '\')';
    } else {
        $sql = 'UPDATE tb_usuario SET ';
        $sql .= 'usuario_nome = \'' . addslashes(utf8_decode($_POST['nome'])) . '\', usuario_login = \'' . $post['login'] . '\', ';
        $sql .= 'usuario_email = \'' . $post['email'] . '\', ';
        $sql .= 'usuario_info=\'' . addslashes(utf8_decode($_POST['infor'])) . '\', ';
        $sql .= 'usuario_ativo=\'' . (isset($post['ativo']) ? 1 : 0) . '\' ';
        if ($post['trocoufoto']) {
            $sql .= ',usuario_foto=\'' . $filename . '\' ';
        }
        $sql .= 'WHERE ';
        $sql .= 'usuario_id=' . $post['cmb_cadastro'];
    }
    if (!execute_query($sql, $id_conn)) {
        $messagem = utf8_decode('Query Inválida: ') . mysql_error() . "\n";
        $messagem .= 'Pesquisa Inteira: ' . $sql;
        echo $messagem;
        execute_query("ROLLBACK", $id_conn);
    } else {
        execute_query('COMMIT', $id_conn);
        echo '1';
    }
    execute_query("END TRANSACTION", $id_conn);
    close_database($id_conn);
}
开发者ID:kureshio,项目名称:colecao,代码行数:39,代码来源:grava_usuario.php


示例16: sendFinalEmails

function sendFinalEmails($email, $client_key, $final1, $final2, $final3, $final4)
{
    //echo 'final email '.$email.' '.$client_key.'<br>';
    //find device email and device type
    $sql = "call getDeviceInfo(" . sql_escape_string($email, 1) . ");";
    echo $sql;
    $Result = execute_query($mysqli, $sql);
    if ($Result) {
        $row = $Result[0]->fetch_assoc();
        $device_email = $row['email'];
        $device = $row['device'];
        $fname = $row['fname'];
        $lname = $row['lname'];
        $gSQL = 'CALL getOrgByKey(' . sql_escape_string($client_key, 1) . ');';
        //echo $gSQL;
        //echo '<br>';
        $gResult = execute_query($mysqli, $gSQL);
        $group_code = $gResult[0]->fetch_array()[0];
        //echo $group_code;
        //echo '<br>';
        //send to Socks
        $sMail = getSocksMailer();
        $sMail->Subject = "Litesprite User Completed Onboarding";
        $sMail->Body = "client key: " . $client_key . "<br>\n\t\t\t\t\t\tgroup: " . $group_code . "<br>\n\t\t\t\t\t\tCodes and Instructions have been sent to: " . $email . "<br> \n\t\t\t\t\t\tDevice: " . ($device == 'A' ? 'Android' : 'iOS') . "<br> \n\t\t\t\t\t\tDevice email: " . $device_email . "<br>\n\t\t\t\t\t\tLast name: " . $lname . "<br>\n\t\t\t\t\t\tFirst name:" . $fname;
        //echo $sMail->Body;
        //echo '<br>';
        $sMail->AddAddress("[email protected]");
        sendMail($sMail);
        //send to User
        $uMail = getSocksMailer();
        $uMail->Subject = "Litesprite Beta Sign-Up Completed!";
        $uMail->AddEmbeddedImage('../images/paw.png', 'paw');
        $uMail->Body = $final1 . $group_code . $final2 . $client_key . $final3 . $device_email . $final4;
        //echo $uMail->Body;
        $uMail->AddAddress($email);
        sendMail($uMail);
    }
}
开发者ID:YonasBerhe,项目名称:LS,代码行数:38,代码来源:email.php


示例17: syncAnnotations

 public function syncAnnotations()
 {
     $dblink = get_db_link('read');
     $site = elgg_get_site_entity();
     $result = execute_query('SELECT COUNT(`id`) FROM elgg_annotations', $dblink);
     $row = mysqli_fetch_row($result);
     $total = (int) $row[0];
     $result = execute_query('SELECT `id` FROM elgg_annotations ORDER BY id', $dblink);
     while ($row = mysqli_fetch_row($result)) {
         $ids[] = $row[0];
         if (count($ids) == 50) {
             $this->processItems('annotations', $ids);
             $ids = array();
         }
         $i += 1;
         if ($i % 500 == 0) {
             echo round($i / $total * 100, 2) . "%\r";
         }
     }
     if (count($ids) > 0) {
         $this->processItems('annotations', $ids);
     }
 }
开发者ID:pleio,项目名称:elasticsearch,代码行数:23,代码来源:ESBulkSync.php


示例18: savedata

function savedata()
{
    global $post, $get, $link, $jsonpost, $imageUploadDir;
    //func=register&DEBUGMODE=1&[email protected]&fname=yashesh&lname=parma&password=yashesh
    $retArray = array();
    if (!empty($jsonpost['name']) && !empty($jsonpost['location']) && !empty($jsonpost['phonenumber']) && !empty($jsonpost['image'])) {
        $imagename = generateImageFrom64BitData($jsonpost['image'], $imageUploadDir);
        $description = !empty($jsonpost['description']) ? $jsonpost['description'] : "";
        $category = !empty($jsonpost['category']) ? $jsonpost['category'] : "";
        $datetime = !empty($jsonpost['datetime']) ? $jsonpost['datetime'] : date("Y-m-d H:i:s");
        $query = "INSERT INTO `yasheshcfa`.`events` (`name`, `location`, `date`, `phonenumber`, `category`, `image`, `description`) VALUES ('{$jsonpost['name']}', '{$jsonpost['location']}', '{$datetime}', '{$jsonpost['phonenumber']}', '{$category}', '{$imagename}', '{$description}');";
        $result = execute_query($query);
        $insertedId = mysql_insert_id();
        $checkQuery = "select * from events where id='{$insertedId}'";
        $insertResult = execute_query($checkQuery);
        while ($row = mysql_fetch_assoc($insertResult)) {
            $userData = $row;
        }
        $retArray = array("status" => "success", "message" => "", "data" => $userData);
    } else {
        $retArray = array("status" => "error", "message" => "all field not filled");
    }
    echo encode_respond($retArray);
}
开发者ID:bhavanavadodariya,项目名称:jagrutAmdavadi,代码行数:24,代码来源:webservice.php


示例19: show_errormsg

    } else {
        echo " και ημερομηνία λήξης " . $end2;
    }
    echo "<BR> και θέλετε να καταχωρήσετε <b>{$schema}</b> με ημερομηνία έναρξης " . $start;
    if ($enddate == '3000-01-01') {
        echo " και ανοιχτή ημερομηνία λήξης";
    } else {
        echo " και ημερομηνία λήξης " . $enddate;
    }
    echo "</div></p>";
    echo "<br><br><br><br><br><br>";
    echo "<div class='img-shadow'>";
    show_errormsg("");
    echo "</div>";
}
mysql_free_result($result);
// Insert Medicines
$sql = "";
for ($i = 0; $i < count($meds); $i++) {
    $sql = "INSERT INTO antiretro_treatments VALUES('" . $_GET['PatientCode'] . "', '" . $meds[$i]['id'] . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "')";
    //	echo $sql."<BR>";
    $what_happened = execute_query($sql);
}
// Insert Compliance, Discontinuation Reasons and Notes
$sql = "INSERT INTO antiretro_treatments_compliance VALUES('" . $_GET['PatientCode'] . "', '" . $schema . "', '" . join_date($_GET, 'StartDate') . "', '" . $enddate . "', '" . $_GET['comp'] . "', '" . $_GET['Reason1'] . "', '" . $_GET['Reason2'] . "', '" . $_GET['Notes'] . "')";
execute_query($sql);
mysql_close($dbconnection);
perform_post_insert_actions("", "antiretro.php?code=" . $_GET['PatientCode'], "");
?>

开发者ID:nkiourt,项目名称:amacs,代码行数:29,代码来源:antiretro_insert.php


示例20: getmonthstat_for_year_from_tstat

function getmonthstat_for_year_from_tstat($feat_type, $id_observatory, $frc_info_id, $year)
{
    $tab_tables = array("fil" => "FILAMENTS", "pro" => "PROMINENCES", "ar" => "ACTIVEREGIONS", "ch" => "CORONALHOLES", "sp" => "SUNSPOTS", "t3" => "TYPE_III", "rs" => "RADIOSOURCES");
    $tab_month = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12");
    $tab_results = array();
    $table = $tab_tables[$feat_type];
    //foreach($tab_month as $month) {
    $sql_query = "SELECT NB_FEAT FROM DATE_STAT WHERE ";
    //$sql_query = $sql_query."date_format(TIME_RANGE, '%Y-%m')='".$year."-".$month."'";
    $sql_query = $sql_query . "YEAR(TIME_RANGE)=" . $year;
    $sql_query = $sql_query . " AND OBSERVATORY_ID=" . $id_observatory;
    $sql_query = $sql_query . " AND FRC_INFO_ID=" . $frc_info_id;
    $sql_query = $sql_query . " AND FEAT_TYPE='" . $table . "'";
    $sql_query = $sql_query . " ORDER BY TIME_RANGE ASC";
    $rs = execute_query($sql_query);
    //$tab_results[$month] = $rs['NB_FEAT'][0];
    //}
    return array_values($rs['NB_FEAT']);
    //return $tab_results;
}
开发者ID:helio-vo,项目名称:helio,代码行数:20,代码来源:hfc_list_entry.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP execute_sql函数代码示例发布时间:2022-05-15
下一篇:
PHP execute_program函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap