Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
jQuery dataTables wrong sorting

I have a problem with jQuery dataTable sorting. It sorts columns in wrong order. For example: I have numbers from 1 to 5, when I click to sort that column it sorts in random order: 4, 1, 3, 5, 2. It's not only with number type. String, date - same problem. I have my data in MySQL database and I get it in json format. My datatable code:

var dataTable = $('#user_data').DataTable({
    "processing" : true,
    "serverSide" : true,
    "order" : [],
    "ajax" : {
        url:"data_control/orders/fetch.php",
        type:"POST"
    },
    "drawCallback": function( settings ) {
        paint();
    },
    columnDefs: [
        { 
            "orderable": false, 
            targets: [11, 12, 13, 14]
        }
    ]
});

As I already mentioned - I select my data from database in fetch.php file in JSON format. Any ideas how to solve my problem with sorting? Thanks!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda