Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-19-2012, 11:09 PM   PM User | #1
Aetheris
New to the CF scene

 
Join Date: Feb 2012
Location: Austin, TX
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Aetheris is an unknown quantity at this point
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?
Aetheris is offline   Reply With Quote
Old 02-20-2012, 01:44 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,452
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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/
felgall is offline   Reply With Quote
Old 02-20-2012, 02:00 AM   PM User | #3
Aetheris
New to the CF scene

 
Join Date: Feb 2012
Location: Austin, TX
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Aetheris is an unknown quantity at this point
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.
Aetheris is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:26 AM.


Advertisement
Log in to turn off these ads.