Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author xnau webdesign

    (@xnau)

    You have to alter the database directly to do this. Open your database using PHPMyAdmin or a similar database tool. Change the “data type” of the field you want to sort numerically to a numeric type, such as INTEGER. Be aware that if there is any non-numeric content in that column, it will be lost.

    Now, when you sort by that field, it will sort numerically instead of alphabetically.

    Thread Starter johnhedge

    (@johnhedge)

    So if I enter -3 in the field through the admin app of Participants Database which is probably taken as a string in the web page it will be understood by MySQL as an Integer?

    Plugin Author xnau webdesign

    (@xnau)

    Yes, the database will only store integers in that column, so any strings that can be interpreted as integers are converted to integers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Create field as integer’ is closed to new replies.