當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BD::SetComboSelect方法代碼示例

本文整理匯總了PHP中BD::SetComboSelect方法的典型用法代碼示例。如果您正苦於以下問題:PHP BD::SetComboSelect方法的具體用法?PHP BD::SetComboSelect怎麽用?PHP BD::SetComboSelect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BD的用法示例。


在下文中一共展示了BD::SetComboSelect方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

                                    <div class="col-md-4">
                                        <label for="">Nome do produto</label>
                                        <input type="text" id="nome_produto" name="nome_produto" class="form-control"
                                               value="<?php 
echo $nome_produto;
?>
">
                                    </div>
                                    <div class="col-md-3">
                                        <label for="">Linha</label>
                                        <?php 
$consulta = "SELECT codigo, descricao FROM linhas";
$nome = "linha";
$itemPadrao = $cod_linha;
$css = "form-control";
echo $bd->SetComboSelect($consulta, $nome, $itemPadrao, $css);
?>
                                    </div>


                                    <div class="col-md-3">
                                        <label for="">Família</label>
                                        <?php 
$consulta = "SELECT codigo, nome FROM familia where ativo='true'";
$nome = "nome";
$itemPadrao = $cod_familia;
$css = "form-control";
echo $bd->SetComboSelect($consulta, $nome, $itemPadrao, $css);
?>
                                    </div>
開發者ID:rodrigodeus,項目名稱:lockal-1,代碼行數:30,代碼來源:detalhe_produto.php

示例2: BD

<?php

/**
 * Created by PhpStorm.
 * User: rodrigo.martins
 * Date: 22/01/2016
 * Time: 09:53
 */
include_once "first_all.php";
$bd = new BD();
$sql = "SELECT codigo,nome FROM veiculos WHERE cod_fabricante={$_GET['cod_fabricante']}";
echo $bd->SetComboSelect($sql, 'cod_veiculo', '', 'form-control');
開發者ID:rodrigodeus,項目名稱:lockal-1,代碼行數:12,代碼來源:select_modelo.php

示例3:

        <!--criterios-->
        <div class="row">
            <div class="panel panel-primary">
                <div class="panel-heading">Pesquisa por critérios</div>
                <div class="panel-body">

                    <div class="row">
                        <div class="col-md-3">
                            <label for="">Fabricante</label>
                            <?php 
$consulta = "select 0 codigo,'Todos'  fabricante union all select codigo,nome fabricante from fabricantes";
$nome = "fabricante";
$itemPadrao = 0;
$css = "form-control";
echo $bd->SetComboSelect($consulta, $nome, $itemPadrao, $css);
?>
                        </div>

                        <div class="col-md-5">
                            <label for="">Veículo</label>
                            <?php 
$consulta = "select 0 codigo,'Todos'  veiculo union all select codigo,nome veiculo from veiculos";
$nome = "veiculo";
$itemPadrao = 0;
$css = "form-control";
echo $bd->SetComboSelect($consulta, $nome, $itemPadrao, $css);
?>
                        </div>

                        <div class="col-md-2">
開發者ID:rodrigodeus,項目名稱:lockal-1,代碼行數:30,代碼來源:pesquisa_bkp.php

示例4:

        <form action="../backend/update_veiculo.php" method="post" enctype="multipart/form-data">
            <br>
            <div class="row">
                <div class="panel panel-primary">
                    <div class="panel-heading">Veículos</div>
                    <div class="panel-body">
                        <div class="row">
                            <input name="id" type="hidden" value="<?php 
echo $_GET['codigo'];
?>
">
                            <div class="col-md-4">
                                <label for="">Fabricante</label>
                                <?php 
$sql = "SELECT codigo , nome FROM fabricantes WHERE ativo='true'";
echo $bd->SetComboSelect($sql, "cod_fabricante", $cod_fabricante, "form-control");
?>
                            </div>
                            <div class="col-md-8">
                                <label for="">Veículo</label>
                                <input type="text" value="<?php 
echo $nome;
?>
" name="nome" class="form-control">
                            </div>
                        </div>
                        <br>
                        <div class="row">
                            <div class="col-md-12">
                                <button type="submit" class="btn btn-lg btn-primary pull-right">Salvar</button>
                                <button type="button" onclick="excluir_veiculo(<?php 
開發者ID:rodrigodeus,項目名稱:lockal-1,代碼行數:31,代碼來源:detalhe_veiculo.php


注:本文中的BD::SetComboSelect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。