Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8047215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:01:57+00:00 2026-06-05T06:01:57+00:00

I have a MySQL BIGINT that I am storing in HTML5 data. Then I’m

  • 0

I have a MySQL BIGINT that I am storing in HTML5 data. Then I’m trying to access that value and pass it through an AJAX call.

<div data-id="211285677671858177">

And the JavaScript:

var send_data = {
    id: '' + $(this).data('id')
}
$.post('/send.php', send_data);

The issue is that the jQuery data function seems to retrieve that value as a floating point and not a string. So appending it to a blank string isn’t helping because it’s already too late – it’s already been rounded (in this case to 211285677671858180). What can I do to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:02:01+00:00Added an answer on June 5, 2026 at 6:02 am

    This isn’t a case of “long int” really, the number you’re getting is the closest available representation as a floating-point number.

    Anyway, you want the value as a string. Quote the jQuery docs for .data (emphasis mine):

    Every attempt is made to convert the string to a JavaScript value
    (this includes booleans, numbers, objects, arrays, and null) otherwise
    it is left as a string. To retrieve the value’s attribute as a string
    without any attempt to convert it, use the attr() method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mysql table that contains IPAddress parts TABLE `EndPoints`( `EndPointId` BIGINT(19) UNSIGNED
This is the MySQL table structure that I have: itemID (BIGINT) userID (BIGINT) wasAdded
I have a simple function that looks at an incoming mySQL data type and
I have MySQL running such that I can open a client command line and
I have mysql table that has a column that stores xml as a string.
Do MySQL have any function by which I can split data of a column
I have a MySQL table for storing details of uploaded files, like this: CREATE
I created a web app that uses a MySQL database, but I have to
I have a MySQL table that contains many rows. The table structure is as
I have a mysql table that stores a mapping from an ID to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.