Datatable problem with Dreamweaver

Datatable problem with Dreamweaver

emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0

Hi guys,

I am writing to salute from Venezuela, my question is this:

The library's installed correctly and works well until a way, the problem is I have a repeating table made with dreamweaver, which automatically performs the matter is that the plugin loads fine, but does not perform the filters to write to the input, any idea how one might set up there, I have the latest version of the plugin discharged yesterday.

Thanks for the help you can give me.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    We would need a link to a test case showing the issue, as per the forum rules please.

    Allan

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0

    ok I prepare

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0
    edited January 2015

    This is the link to the test:

    http://usa-ven.com.ve/admin/conexiones_test.php

    the sample data is there, but if they write "sorely", you will see that it shows nothing as only looking at the first row and not in the list of repetition that makes dreamweaver

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0
    edited January 2015

    not as affix the code and it looks good

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0
    edited January 2015

    .

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0

    Code that searches and lists the records:

    <?php 
    if (!function_exists("GetSQLValueString")) {
    
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", 
    
    $theNotDefinedValue = "") 
    
    {
    
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }
    
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
    
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }
    
    mysql_select_db($database_registro, $registro);
    $query_lista = "SELECT * FROM historial_accesos ORDER BY id DESC";
    $lista = mysql_query($query_lista, $registro) or die(mysql_error());
    $row_lista = mysql_fetch_assoc($lista);
    $totalRows_lista = mysql_num_rows($lista);
    
    <?php
    >
    ```
    ?>
    
    
    HTML Code where the data is displayed:
    
    

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Actualizar Usuario</title>
    <link href="Css/actualizar_usuario.css" rel="stylesheet" type="text/css">

    <link rel="stylesheet" type="text/css" href="Classes/datatable/media/css/jquery.dataTables.css">
    <link rel="stylesheet" type="text/css" href="Classes/datatable/resources/syntax/shCore.css">
    <link rel="stylesheet" type="text/css" href="Classes/datatable/resources/demo.css">
    <style type="text/css" class="init">
    
    </style>
    
    <script type="text/javascript" language="javascript" src="Classes/datatable/media/js/jquery.js"></script>
    <script type="text/javascript" language="javascript" src="Classes/datatable/media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" language="javascript" src="Classes/datatable/resources/syntax/shCore.js"></script>
    <script type="text/javascript" language="javascript" src="Classes/datatable/resources/demo.js"></script>
    <script type="text/javascript" language="javascript" class="init">
    

    $(document).ready(function() {
    $('#example').DataTable({
    "bFilter": true,});

    } );

    </script>
    

    </head>

    <body class="dt-example">
    <header class="titulo" id="titulo"> <strong id="titulo_text">Listado de Conexiones x Usuario</strong></header>
    <div class="container">
    <section>

    <?php do { ?> <?php } while ($row_lista = mysql_fetch_assoc($lista)); ?>
    Usuario Fecha de Acceso Hora de acceso IP de Acceso
    Usuario Fecha de Acceso Hora de acceso IP de Acceso
    <?php echo $row_lista['usuario']; ?> <?php echo $row_lista['fecha_acceso']; ?> <?php echo $row_lista['hora_acceso']; ?> <?php echo $row_lista['ip']; ?>

    </section>
    </div>

    </body>
    </html>
    <?php
    mysql_free_result($lista);

    <?php > ``` ?>
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    I'm not sure whether dataTables supports multiple <tbody> tags.

    Try opening and closing your tbody outside the loop.

    ```

    <tbody>
    <?php do { ?>

    <tr>
      <td width="140"><?php echo $row_lista['usuario']; ?></td>
      <td width="148"><?php echo $row_lista['fecha_acceso']; ?></td>
      <td width="148"><?php echo $row_lista['hora_acceso']; ?></td>
      <td width="148"><?php echo $row_lista['ip']; ?></td>
    </tr>
    <?php } while ($row_lista = mysql_fetch_assoc($lista)); ?>
    

    </tbody>

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0

    Excellent !!!!!!, your guidance led me to the solution, just place the <tbody> out of the loop and ready, everything went fine, thank you very much !!!!!!

      <tbody>
      <?php do { ?>      
        <tr>
          <td width="140"><?php echo $row_lista['usuario']; ?></td>
          <td width="148"><?php echo $row_lista['fecha_acceso']; ?></td>
          <td width="148"><?php echo $row_lista['hora_acceso']; ?></td>
          <td width="148"><?php echo $row_lista['ip']; ?></td>
        </tr>
        <?php } while ($row_lista = mysql_fetch_assoc($lista)); ?>
    </tbody>
    </table>
    
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    I'm not sure whether dataTables supports multiple <tbody> tags.

    It does not. That is something I want to add for v2 - but that is likely a good long while away yet... v1.x still has plenty of life in it :-)

    Allan

  • emcpublicidademcpublicidad Posts: 8Questions: 1Answers: 0

    No problem, just by moving the <tbody> and showed them the problem is solved, thanks again

This discussion has been closed.