Menu

#907 Search.php v.1.5.0

open
nobody
None
1
2016-03-03
2016-03-01
weblan
No

Estimado, como puedo modificar la busqueda para que me entregue como resultado:

ROOM_NAME | NAMEBOOKER | FULLDESCRIPTION | STAR | END |

Agradeceria su ayuda.

Discussion

  • Campbell Morrison

    You'll need to modify search.php by

    (1) changing the SQL query to include the fields you need
    (2) changing the table header
    (3) changing the table body

     
    • weblan

      weblan - 2016-03-02

      no puedo con el error :(

       

      Last edit: weblan 2016-03-02
  • weblan

    weblan - 2016-03-02

    DataTables warning table id=search results - Requested unknown parameter '3' for wow '0

     
  • Campbell Morrison

    The section of code

      if ($ajax)
      {
        $json_data['aaData'][] = $values;
      }
      else
      {
        echo "<tr>\n<td>\n";
        echo implode("</td>\n<td>", $values);
        echo "</td>\n</tr>\n";
      }
    

    should be at the end of the function output_row()

     
    • weblan

      weblan - 2016-03-02

      No me funciona :(

         if ($ajax)
        {
          $json_data['aaData'][] = $values;
        }
        else
        {
          echo "<tr>\n<td>\n";
          echo implode("</td>\n<td>", $values);
          echo "</td>\n</tr>\n";
        }
      
       

      Last edit: weblan 2016-03-02
  • Campbell Morrison

    Yes - you need to delete that block of code from the earlier part. In other words you need to move that block of code, not copy it.

     
    • weblan

      weblan - 2016-03-02

      Genial, funciona :) Gracias nuevamente Campbell Morrison

       
    • weblan

      weblan - 2016-03-02

      Una duda, porque end_time se incrementa en relacion al original ??

      Ej el resultado dice que comienza en periodo 1 y termina en periodo 3, pero la reserva orginal dice que comienza en periodo 1 y termina en periodo 2.

       
  • Campbell Morrison

    That's because of the way that periods work. They are stored internally as bookings of one minute long starting at 1200. You'll need to subtract 60 from the end time as follows:

      if(empty($row['enable_periods']))
      {
        $link_str = time_date_string($row['end_time']);
      }
      else
      {
        list(,$link_str) = period_date_string($row['end_time'] - 60);
      }