The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Game scores in MySQL DB are strings

I have a game for a client that submits the player high scores to a php page which then submits it to a MYSQL database.

Everything works fine except the fact that when the user sorts the game scores on the website, the scores must be interpreted as strings, because the scores are sorting in this order: -29, 101, 15, 15, 200

I wrote the program in Director where there is a global variable for the score that is a NUMBER, not a string.

But Director passes the number variable using a command called postNetText() that passes things to PHP as strings. So it may be something in PHP that I need to do to designate that variable passed as a number.

How do I let PHP or MYSQL know that this field is a number? MySQL wouldn't let me change the table field data type from "text" to "small int" ....maybe because there is data already in it?