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

123
Vistas
MySQL In NodeJS is grabbing IDs from a database but it's changing the last 2 digits of it to 00

I'm having troubles with MySQL for node, when I see the IDs on the DB, they look fine, but when I grab it with the MySQL (code below) the last 2 digits are replaced by 0, any ideas on what's happening & how to solve it? I also will attach a picture of the database data & settings Settings Data

dbPool.getConnection((err, con) => {
        if (err) throw err
        con.query(`SELECT * FROM node_1 WHERE gid`, (err, rows:guildData[]) => {
            if(err) throw err
            rows.forEach(row => {
                client.dataGuilds.set(`${row.gid}`, row)
                console.log(row.gid)
            })
        })
        con.release()
})
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The problem is that DB bigint exceeds Number.MAX_SAFE_INTEGER. You can use BitInt(x) to convert:

const x = BigInt(928711151708167415);
console.log(x);
about 4 years ago · Juan Pablo Isaza Denunciar

0

Solved, instead of turning a bigint into a string, just store it as an string

about 4 years ago · Juan Pablo Isaza Denunciar
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