当前位置: 首页>>代码示例>>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;未经允许,请勿转载。