无法从数据库调用表

时间:2019-12-19 22:46:52

标签: php jquery mysql view

有人可以告诉我我的代码出了什么问题吗?我真的无法弄清楚自己,已经花了几个小时了,但是html / php并不是我的强项。

enter image description here

    the error is supposed to be here (line 48)
            <li>
                <a href="#EIN" data-toggle="tab">
                    <span class="visible-xs"><i class="entypo-user"></i></span>
                    <span class="hidden-xs"><?php echo get_phrase('Servicios Internos S/C'); ?></span>
                </a>
            </li>`

同一视图还调用了其他表,但这是唯一未显示的表。


the error is supposed to be here (line 205)
<div class="tab-pane" id="EIN">
                <table class="table table-bordered table-striped datatable" id="table-6">
                    <thead>
                        <tr>
                            <th><?php echo get_phrase('Referencia'); ?></th>
                             **(lots of echos here too)**
                            <th><?php echo get_phrase('options'); ?></th>
                        </tr>
                    </thead>
                    <tbody>
the error is supposed to be here (line 221)
                        <?php foreach ($MontacargasInternos_info as $row) { ?> 
                            <tr>
                                <td><?php echo $row['Id'] ?></td>
                                 **(lots of echos here too)**
                                <td><?php echo $row['Fecha_Llegada'] ?></td>
                                <td>
                                    <div class="btn-group">
                                        <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
                                            Action <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-default pull-right" role="menu">
                                            <li>
                                                <a onclick="showAjaxModal('<?php echo base_url(); ?>index.php?modal/popup/show_EquipoInterno/<?php echo $row['Id'] ?>');">
                                                    <i class="entypo-user"></i>
                                                    <?php echo get_phrase('Info'); ?>
                                                </a>
                                            </li>
                                            <li class="divider"></li>
                                            <li>
the error is supposed to be here (line 292)
                                                <a onclick="showAjaxModal('<?php echo base_url(); ?>index.php?modal/popup/add_controlEI/<?php echo $row['Id'] ?>');">
                                                    <i class="entypo-user"></i>
                                                    <?php echo get_phrase('Control'); ?>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                        <?php } ?>
                    </tbody>
                </table>
            </div>


功能


    jQuery(window).load(function() {
        var $ = jQuery;

        $("#table-6").dataTable({
            "sPaginationType": "bootstrap"
        });
        $(".dataTables_wrapper select").select2({
            minimumResultsForSearch: -1
        });
        // Highlighted rows
        $("#table-6 tbody input[type=checkbox]").each(function(i, el) {
            var $this = $(el),
                $p = $this.closest('tr');
            $(el).on('change', function() {
                var is_checked = $this.is(':checked');
                $p[is_checked ? 'addClass' : 'removeClass']('highlight');
            });
        });
        // Replace Checboxes
        $(".pagination a").click(function(ev) {
            replaceCheckboxes();
        });
    });

这可能很重要


    <?php
$Equipo_info = $this->db->get_where('montacargas_internos', array('Id' => $param2))->result_array();;
foreach ($Equipo_info as $row) { ?>    

    <div class="profile-env">

        <header class="row">

            <div class="col-sm-9">

                <ul class="profile-info-sections">
                    <li style="padding:0px; margin:0px;">
                        <div class="profile-name">
                            <h3><?php echo $row['Id'] . ' ' . $row['Tipo'] . ' ' . $row['Marca']; ?></h3>
                        </div>
                    </li>
                </ul>

            </div>


        </header>

        <section class="profile-info-tabs">

            <div class="row">

                <div class="">
                    <br>
                    <table class="table table-bordered">

                        <?php if ($row['Fecha_Llegada'] != '') : ?>
                            <tr>
                                <td><?php echo get_phrase('Fecha de Llegada'); ?></td>
                                <td><b><?php echo $row['Fecha_Llegada']; ?></b></td>
                            </tr>
                        <?php endif; ?>

                        <?php if ($row['Cd_Estado'] != '') : ?>
                            <tr>
                                <td><?php echo get_phrase('Cd/Estado'); ?></td>
                                <td><b><?php echo $row['Cd_Estado']; ?></b></td>
                            </tr>
                        <?php endif; ?>

                        <?php if ($row['Empresa'] != '') : ?>
                            <tr>
                                <td><?php echo get_phrase('Empresa'); ?></td>
                                <td><b><?php echo $row['Empresa']; ?></b></td>
                            </tr>
                        <?php endif; ?>


                        <?php if ($row['Vendedora'] != '') : ?>
                            <tr>
                                <td><?php echo get_phrase('Vendedora'); ?></td>
                                <td><b><?php echo $row['Vendedora']; ?></b></td>
                            </tr>
                        <?php endif; ?>
                    </table>
                </div>
            </div>

        </section>

    </div>

<?php } ?>

也许也是这个


    <script>
    function validar(f) {
        f.enviar.value = "Por Favor, Espere";
        f.enviar.disabled = true;
        f.usuario.value = (f.usuario.value == "") ? "Anónimo" : f.usuario.value;
        return true
    }
</script>
<?php
$single_patient_info = $this->db->get_where('montacargas_externos', array('Id' => $param2))->result_array();
foreach ($single_patient_info as $row) {
    $Semanas_info = $this->db->get('Semana')->result_array();
?>


    <div class="row">
        <div class="col-md-12">

            <div class="panel panel-primary" data-collapsed="0">

                <div class="panel-heading">
                    <div class="panel-title">
                        <h3><?php echo get_phrase('edit_patient'); ?></h3>
                    </div>
                </div>

                <div class="panel-body">

                    <form role="form" class="form-horizontal form-groups-bordered" action="<?php echo base_url(); ?>index.php?reparaciones/control/createEE/<?php echo $row['Id']; ?>" method="post" enctype="multipart/form-data" onsubmit="return validar(this)">

                        <div class="form-group">
                            <label for="field-1" class="col-sm-3 control-label"><?php echo get_phrase('Referencia'); ?></label>

                            <div class="col-sm-5">
                                <input readonly type="text" name="referencia" class="form-control" id="field-1" value="<?php echo $row['Id']; ?>">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="field-1" class="col-sm-3 control-label"><?php echo get_phrase('Semana'); ?></label>

                            <div class="col-sm-5">
                                <select name="Semana" class="select2">
                                    <option value=""><?php echo get_phrase('Selecciona Semana'); ?></option>
                                    <?php foreach ($Semanas_info as $row2) { ?>
                                        <option value="<?php echo date('Y') . '-' . $row2['Semana']; ?>"><?php echo date('Y') . '-' . $row2['Semana']; ?></option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="field-1" class="col-sm-3 control-label">Tipo de Falla</label>

                            <div class="col-sm-5">
                                <select name="falla" class="select2">
                                    <option value=""><?php echo get_phrase('select_type'); ?></option>
                                    <option value="FACIL"><?php echo get_phrase('FACIL'); ?></option>
                                    <option value="COMPLICADA"><?php echo get_phrase('COMPLICADA'); ?></option>
                                    <option value="OK"><?php echo get_phrase('OK'); ?></option>
                                    <option value="PENDIENTE-REVISION"><?php echo get_phrase('PENDIENTE-REVISION'); ?></option>
                                    <option value="YONQUE"><?php echo get_phrase('YONQUE'); ?></option>
                                </select>
                            </div>
                        </div>

                        <div class="col-sm-3 control-label col-sm-offset-2">
                            <input type="submit" class="btn btn-success" value="Agregar" name="enviar">
                        </div>
                    </form>

                </div>

            </div>

        </div>
    </div>
<?php } ?>

很抱歉,它很大

0 个答案:

没有答案