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


PHP query_select函数代码示例

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


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

示例1: show_site

function show_site($id_user)
{
    $ref_show = $_SESSION['ref_sell_number'];
    connect_db();
    // Show SOLD ITEMS by USER in the session
    $sql_select = "SELECT * FROM Barcode INNER JOIN Item ON Item.id_item=Barcode.Item_id_item INNER JOIN Barcode_has_Buyer ON Barcode.id_Barcode=Barcode_has_Buyer.Barcode_id_Barcode Where stock_out=1 AND Barcode_has_Buyer.user_2='{$id_user}' AND ref_sell_number='{$ref_show}'  ORDER BY date_sold DESC";
    //show transaction started as zero means a fresh transaction that dad
    //if($ref_show==0)
    //  $sql_select="SELECT * FROM Barcode INNER JOIN Item ON Item.id_item=Barcode.Item_id_item INNER JOIN Barcode_has_Buyer ON Barcode.id_Barcode=Barcode_has_Buyer.Barcode_id_Barcode Where stock_out=1 AND Barcode_has_Buyer.user_2='$id_user' AND ref_sell_number='$ref_show'  ORDER BY date_sold DESC";
    $result = query_select($sql_select);
    while ($rek = mysql_fetch_array($result)) {
        echo "<tr><td>";
        echo $rek["Barcode"];
        echo "</td><td>";
        echo $rek["stock_in"];
        echo "</td><td>";
        echo $rek["stock_out"];
        //echo "sdfsdf";
        echo "</td><td>";
        echo $rek["Item_id_item"];
        echo "</td><td>";
        echo $rek["date"];
        echo "</td><td>";
        echo $rek["name"];
        echo "</td><td>";
        echo $rek["brand"];
        echo "</td><td>";
        echo $rek["pn"];
        echo "</td><td>";
        echo $rek["ref_sell_number"];
        echo "</td><td>";
        echo "Sold";
        echo "</td></tr>";
    }
}
开发者ID:bruce28,项目名称:vip,代码行数:35,代码来源:sell_item.php

示例2: get_token_category

function get_token_category($token)
{
    $sql = "SELECT * FROM token_dynamic where idtoken='{$token}'";
    $result = query_select($sql);
    $rek = mysql_fetch_array($result);
    return $rek['category_spare'];
}
开发者ID:bruce28,项目名称:vip,代码行数:7,代码来源:functions_api.php

示例3: get_name_item_cat

function get_name_item_cat($id_c)
{
    $sql1 = "SELECT * FROM item Where Item_has_Cat_id_item_cat='{$id_c}'";
    $result = query_select($sql1);
    $rek = mysql_fetch_array($result);
    return $rek['name'];
}
开发者ID:bruce28,项目名称:vip,代码行数:7,代码来源:colre_report.php

示例4: get_weight_fully_reused

function get_weight_fully_reused($site_id)
{
    $sql = "SELECT SUM(weight) as suma, site_id, Barcode.date,login,Ready,town,cat FROM barcode INNER JOIN test ON Barcode.id_Barcode=test.Barcode_id_Barcode\r\nINNER JOIN user_2 ON user_2.id_user=test.user_2_id_user \r\nINNER JOIN Item on Barcode.Item_id_item=Item.id_item\r\nINNER JOIN item_has_cat ON Item.Item_has_Cat_id_item_cat=item_has_cat.id_item_cat\r\nINNER JOIN site ON site.site_id=barcode.Site_site_id\r\nINNER JOIN Origin On Origin.Origin_id=site.Origin_origin_id\r\nWHERE (Barcode LIKE '%DBS/%/1' OR Barcode LIKE '%DBS/%/2' OR Barcode LIKE '%UNQ/%') AND Site.site_id={$site_id}";
    $result = query_select($sql);
    $rek = mysql_fetch_array($result);
    return $rek['suma'];
}
开发者ID:bruce28,项目名称:vip,代码行数:7,代码来源:manifest_rep_detail.php

示例5: get_name_item

function get_name_item($id_c)
{
    $sql1 = "SELECT * FROM sub_cat Where kind=2 AND id_c='{$id_c}'";
    $result = query_select($sql1);
    $rek = mysql_fetch_array($result);
    return $rek['Name_sub'];
}
开发者ID:bruce28,项目名称:vip,代码行数:7,代码来源:collection_confirmation.php

示例6: show_site

function show_site()
{
    connect_db();
    $sql_select = "SELECT * FROM Buyer  WHERE postcode NOT Like 'Blank' ORDER BY id_Buyer DESC";
    $result = query_select($sql_select);
    while ($rek = mysql_fetch_array($result)) {
        //echo "<table>";
        echo "<tr><td>";
        echo $rek["postcode"];
        echo "</td><td>";
        echo $rek["company_name"];
        echo "</td><td>";
        echo $rek["name"];
        // echo "sdfsdf";
        echo "</td><td>";
        echo $rek["surname"];
        echo "</td><td>";
        echo $rek["address"];
        echo "</td><td>";
        echo $rek["town"];
        echo "</td><td>";
        //$postal_code = strtoupper (str_replace(' ', '', $postal_code));
        echo $email = $rek['email'];
        echo "</td><td>";
        echo $phone = $rek['phone'];
        echo "</td><td>";
        if (empty($rek['ttl_nr'])) {
            echo "-";
        } else {
            echo $rek['ttl_nr'];
        }
        echo "</td><td>";
        echo "</td></tr>";
    }
}
开发者ID:bruce28,项目名称:vip,代码行数:35,代码来源:buyer_new.php

示例7: manifest_dbi_get_item_type_name

function manifest_dbi_get_item_type_name($id_type_name)
{
    $sql = "select * from item_type WHERE iditem_type='{$id_type_name}'";
    $result = query_select($sql);
    $rek = mysql_fetch_array($result, MYSQL_BOTH);
    $item_type_name = $rek['name_item_type'];
    return $item_type_name;
}
开发者ID:bruce28,项目名称:vip,代码行数:8,代码来源:functions_manifest.php

示例8: get_site_has_cat_weight

function get_site_has_cat_weight($site_id, $sub_cat)
{
    global $site_date_collection;
    $sql = "SELECT * FROM site_has_cat WHERE Site_site_id='{$site_id}'";
    $result = query_select($sql);
    //$date="SELECT * FROM site WHERE site_id"
    while ($rek = mysql_fetch_array($result, MYSQL_BOTH)) {
        $sum_weight += $rek['Quantity'] * get_weight($rek['Sub_cat_id_c']);
        //this takes quantity stored in site_has_cat and recalculates it it takes new weight through new module of calculation
        //including standard weight and non standard
    }
    return $sum_weight;
}
开发者ID:bruce28,项目名称:vip,代码行数:13,代码来源:functions_new_weights.php

示例9: check_weee_waste_sold

function check_weee_waste_sold($barcode)
{
    connect_db();
    //echo "<td>dd</td>";
    global $FLAG_SAC;
    $sql = "SELECT DISTINCT Barcode_waste,category,weight,site,invoice_waste_idinvoice_waste,buyer_id,date_sold FROM waste_barcode" . " INNER JOIN transaction_waste ON waste_barcode.idwaste_barcode=transaction_waste.waste_barcode_idwaste_barcode" . " WHERE Barcode_waste='{$barcode}' ";
    $result = query_select($sql);
    //echo $sql;
    //echo $result;
    echo mysql_num_rows($result);
    if (mysql_num_rows($result) == TRUE) {
        $FLAG_SAC = 1;
        echo "<tr'><td><b>Item disposed for further treatment</b> </td></tr>";
    } else {
        return 0;
    }
    while ($rek = mysql_fetch_array($result, MYSQL_ASSOC)) {
        foreach ($rek as $row) {
            echo '<td>';
            echo $row;
            echo '</td>';
        }
        $button_invoice = "<td><a href='invoice_print_waste1.php?ref_sell=" . get_ref_sell($rek['invoice_waste_idinvoice_waste']) . "&show=3' target='_blank'><button>Invoice</button></a><td>";
        echo $button_invoice;
        echo "<tr><td>To: ";
        echo get_buyer_id($rek['buyer_id']);
        echo "</td></tr>";
        // echo $rek[0];
        // echo $rek[1];
        //  echo $rek[2];
        //  echo $rek[3];
        //echo "Func";
    }
}
开发者ID:bruce28,项目名称:vip,代码行数:34,代码来源:barcode_show_status.php

示例10: query_select2

 $get_ATNA = "SELECT * FROM ATNA";
 $res_ATNA = query_select2($get_ATNA, $connessione);
 $ATNA_host = $res_ATNA[0][1];
 $ATNA_port = $res_ATNA[0][2];
 $ATNA_active = $res_ATNA[0][3];
 echo "<h3>ATNA parameters</h3>";
 if ($ATNA_active == "A") {
     echo "ATNA: <select name=\"repository_atna_status\">\n   <option value=\"A\" selected=\"selected\">ON</option>\n   <option value=\"O\">OFF</option>\n  </select><br></br>";
 } else {
     echo "ATNA: <select name=\"repository_atna_status\">\n   <option value=\"A\" >ON</option>\n   <option value=\"O\" selected=\"selected\">OFF</option>\n  </select><br></br>";
 }
 echo "Repository ATNA Host: <INPUT type=\"text\" name=\"repository_atna_host\" value=\"{$ATNA_host}\" size=\"20\" maxlength=\"30\"><br></br>";
 echo "Repository ATNA Port: <INPUT type=\"text\" name=\"repository_atna_port\" value=\"{$ATNA_port}\" size=\"4\" maxlength=\"10\"><br></br>";
 #################### REGISTRY ####################
 $get_REG = "SELECT HOST,PORT,PATH,HTTP FROM REGISTRY_A WHERE ACTIVE = 'A'";
 $res_REG = query_select($get_REG);
 $REG_host = $res_REG[0][0];
 $REG_port = $res_REG[0][1];
 $REG_path = $res_REG[0][2];
 $REG_http = $res_REG[0][3];
 echo "<h3>Registry parameters</h3>";
 echo "Registry Host: <INPUT type=\"text\" name=\"registry_host\" value=\"{$REG_host}\" size=\"20\" maxlength=\"30\"><br></br>";
 echo "Registry Port: <INPUT type=\"text\" name=\"registry_port\" value=\"{$REG_port}\" size=\"4\" maxlength=\"10\"><br></br>";
 echo "Registry Path: <INPUT type=\"text\" name=\"registry_path\" value=\"{$REG_path}\" size=\"50\" maxlength=\"100\"><br></br>";
 if ($REG_http == "NORMAL") {
     echo "Registry HTTP: <select name=\"registry_http\">\n   <option value=\"NORMAL\" selected=\"selected\">NORMAL</option>\n   <option value=\"TLS\">TLS</option>\n  </select><br></br>";
 } else {
     echo "Registry HTTP: <select name=\"registry_http\">\n   <option value=\"NORMAL\">NORMAL</option>\n   <option value=\"TLS\" selected=\"selected\">TLS</option>\n  </select><br></br>";
 }
 #################### JAVA_PATH ###################
 /*
开发者ID:athoncopy,项目名称:athon,代码行数:31,代码来源:setup.php

示例11: show_site

function show_site($user_st)
{
    connect_db();
    $sql_select = "SELECT * FROM Barcode INNER JOIN Item ON Item.id_item=Barcode.Item_id_item WHERE stock_in=1 AND user_2='{$user_st}' ORDER BY Barcode.date DESC";
    //if(isset($_SESSION['site_id_s'])AND $SESSION['site_id_s']>0)
    //{
    $site_id_site = $_SESSION['site_id_s'];
    $sql_select = "SELECT * FROM Barcode INNER JOIN Item ON Item.id_item=Barcode.Item_id_item WHERE stock_in=1 AND user_2='{$user_st}' AND Site_site_id='{$site_id_site}' ORDER BY Barcode.date DESC";
    //}
    $result = query_select($sql_select);
    while ($rek = mysql_fetch_array($result)) {
        $bar_id_test = $rek['id_Barcode'];
        $sql_test = "SELECT * FROM test WHERE Barcode_id_Barcode='{$bar_id_test}'";
        $result_test = mysql_query($sql_test);
        $rek_test = mysql_fetch_array($result_test);
        echo "<tr><td>";
        echo $rek["Barcode"];
        echo "</td><td>";
        echo $rek["stock_in"];
        echo "</td><td>";
        echo $rek["stock_out"];
        //echo "sdfsdf";
        echo "</td><td>";
        echo $rek["Item_id_item"];
        echo "</td><td>";
        echo $rek["date"];
        echo "</td><td>";
        echo $rek["name"];
        echo "</td><td>";
        echo $rek["brand"];
        echo "</td><td>";
        echo $rek["pn"];
        echo "</td><td>";
        echo $rek["user_2"];
        echo "#";
        echo "</td><td>";
        echo $rek["Site_site_id"];
        echo "</td><td>";
        echo "Stocked-in";
        if (mysql_num_rows($result_test) > 0) {
            echo "</td><td>";
            echo "Tested";
        } else {
            echo "</td><td>";
            $url = "add_barcode.php?test_stock=1&V_BARCODE=";
            $url .= swap_hash($rek['Barcode']);
            echo "<a href=" . $url . "> Test it </a>";
        }
        echo "</td></tr>";
    }
}
开发者ID:bruce28,项目名称:vip,代码行数:51,代码来源:add_stock.php

示例12: query_select

  <td align="center">Headline<td>
</tr>
<tr>
  <td><input size="80" name="headline"
              value="<?php 
print $s['headline'];
?>
"></td>
</tr>

<tr>
  <td align="center">Page</td>
</tr>
<tr>
  <td align="center"><?php 
print query_select('page', "select p.code, p.description \n              from pages p, writer_permissions wp, stories s\n              where p.code = wp.page\n              and wp.writer = s.writer\n              and s.id =" . $HTTP_GET_VARS['story'], $s['page']);
?>
</td>
</tr>

<tr>
  <td align="center">Story text (can contain HTML tags)</td>
</tr>
<tr>
  <td><textarea cols="80" rows="7" name="story_text"
           wrap="virtual"><?php 
print $s['story_text'];
?>
</textarea>
  </td>
</tr>
开发者ID:andersonbporto,项目名称:programacao_internet_2015_1,代码行数:31,代码来源:story.php

示例13: query_select

				</tr>
			</table>
			</form>
		</fieldset>

		<fieldset style="margin-top: 40px;">
			<legend>Delete Forum</legend>

			<form method="post" action="validation.php">
			<table>
				<tr>
					<td>Forum</td>
					<td>
						<select name="forum_id" size="1" class="text">
						<?php 
$query = query_select("forums");
$query .= query_select_order("section_id,position", "ASC");
$forums_list = get_array_from_db($query);
foreach ($forums_list as $item) {
    echo "<option value=\"{$item['forum_id']}\"> {$item['forum_name']} </option>";
}
?>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="hidden" name="action" value="delete_forum">
						<input type="submit" name="submit" value="Delete" class="button">
					</td>
				</tr>
开发者ID:rioLagahit,项目名称:LagahitLucero,代码行数:31,代码来源:settings_delete.php

示例14: connect_to_database

require_once "shared/cookies.php";
require_once "shared/functions.php";
require_once "shared/header.php";
require_once "shared/bbcodeParser.php";
?>

<?php 
connect_to_database();
select_database();
if (isset($_GET['post']) && $_GET['post'] != "") {
    if (get_num_rows("posts", "post_id", $_GET['post']) == 0) {
        redirect_to("not_found.php");
    } else {
        $post_id = $_GET['post'];
        $query = query_select("posts");
        $query .= query_select_where("post_id", $post_id);
        $post = get_array_from_db($query);
        $post = $post[0];
    }
}
if (!logged_in() || $_SESSION['acess_rank'] == "member" && $post['posted_by'] != $_SESSION['user_id']) {
    redirect_to("no_permission.php");
}
?>

<div class="centerBox">

	<div class="title">
		Edit Post
		<hr />
开发者ID:rioLagahit,项目名称:LagahitLucero,代码行数:30,代码来源:edit_post.php

示例15: show_site

function show_site($id_user)
{
    $ref_show = $_SESSION['ref_sell_number'];
    connect_db();
    // Show SOLD ITEMS by USER in the session
    $sql_select = "SELECT * FROM waste_barcode INNER JOIN transaction_waste ON waste_barcode.idwaste_barcode=transaction_waste.waste_barcode_idwaste_barcode WHERE ref_sell_number='{$ref_show}' ";
    //show transaction started as zero means a fresh transaction that dad
    //if($ref_show==0)
    //  $sql_select="SELECT * FROM Barcode INNER JOIN Item ON Item.id_item=Barcode.Item_id_item INNER JOIN Barcode_has_Buyer ON Barcode.id_Barcode=Barcode_has_Buyer.Barcode_id_Barcode Where stock_out=1 AND Barcode_has_Buyer.user_2='$id_user' AND ref_sell_number='$ref_show'  ORDER BY date_sold DESC";
    $result = query_select($sql_select) or die(mysql_error());
    while ($rek = mysql_fetch_array($result)) {
        echo "<tr><td>";
        echo $rek["Barcode_waste"];
        echo "</td><td>";
        echo $rek["stock_in"];
        echo "</td><td>";
        echo $rek["weight"];
        //echo "sdfsdf";
        echo "</td><td>";
        echo $rek["category"];
        echo "</td><td>";
        echo $rek["date_sold"];
        echo "</td><td>";
        echo $rek["type_item"];
        echo "</td><td>";
        echo $rek["brand"];
        echo "</td><td>";
        echo $rek["pn"];
        echo "</td><td>";
        echo $rek["ref_sell_number"];
        echo "</td><td>";
        echo "</td><td>";
        echo $id_weee_ext = $rek["type_item_cnv"];
        //we pick up also a weee extension name for waste barcode
        $check_weee_extension = "SELECT * FROM weee_extension WHERE idweee_extension={$id_weee_ext}";
        $result_weee = mysql_query($check_weee_extension);
        $rek_weee = mysql_fetch_array($result_weee);
        echo "</td><td>";
        echo "</td><td>";
        echo $rek_weee["name_ext"];
        echo "</td><td>";
        echo "Sold";
        echo "</td></tr>";
    }
}
开发者ID:bruce28,项目名称:vip,代码行数:45,代码来源:sell_item_waste1.php


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