Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Location
    Austin, TX
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Integers with symbols in sql tables

    I've created my database table and a php form on my website to upload data to the database. All the fields work fine except for the two "coordinate" fields, which require two sets of numbers separated by a forward slash (ex. 111/222). I've tried using VARCHAR, CHAR and TEXT and INT types, but am getting no results. I've even tried using a comma in place of the slash but with the same negative results. Can someone please help me with this issue?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    VARCHAR or CHAR should work for a field with content like that if you insist on it being kept in one field. The alternative would be to store the two parts separately in two INT fields.

    If it doesn't work when you do that then post the code you are using so we can figure out why.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New to the CF scene
    Join Date
    Feb 2012
    Location
    Austin, TX
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    VARCHAR or CHAR should work for a field with content like that if you insist on it being kept in one field. The alternative would be to store the two parts separately in two INT fields.

    If it doesn't work when you do that then post the code you are using so we can figure out why.
    Thanks, I've gotten no results from VARCHAR or CHAR. The fields just stay blank when I upload a new target info. I'll try the using two fields for the coordinate fields.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •