how to ignore records for the content?

how to ignore records for the content?

lawnder00lawnder00 Posts: 7Questions: 4Answers: 0

I have a table of users on my system with a column of profile id ranging from 1 to 5.

What I need is to ignore the id number '5' and don't display these records

Does anyone know if this is even possible?

This question has accepted answers - jump to:

Answers

  • ignignoktignignokt Posts: 146Questions: 4Answers: 39

    Are you using server-side? Static HTML? Why does your table contain data that you do not want to use?

  • lawnder00lawnder00 Posts: 7Questions: 4Answers: 0

    yes im using server side, and i'm going to use them, but I do not want display them
    you know how I can do that?

  • ignignoktignignokt Posts: 146Questions: 4Answers: 39
    edited February 2015 Answer ✓

    The easiest way would probably be adding this:

    $('#example').DataTable({
        "fnCreatedRow": function( nRow, aData, iDataIndex ) {
            if(aData['id'] == 5){
                $(nRow).addClass('hideme');
            }
        }
    });
    
    .hideme{
        display:none;
    }
    
  • lawnder00lawnder00 Posts: 7Questions: 4Answers: 0

    Thanks!!
    but the point is that the record is still there hidden.

    I found another solution adding these lines to the "simple" funcion of _ssp.php script

    if ($where == "") { $where = "WHERE"; } else { $where .= " AND"; } $where .= " `profile_id` != 5";

    I apologize for my poor english, i am learning

    Lawnder

  • ignignoktignignokt Posts: 146Questions: 4Answers: 39
    Answer ✓

    Ah, that is what I was asking in my first post. What you really want is to not have the data there at all, meaning you should not even be loading it which is what you are now doing in the query. :)

This discussion has been closed.