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

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 07-24-2008, 08:15 PM   PM User | #1
dlewis23
New Coder

 
Join Date: Jul 2008
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
dlewis23 is an unknown quantity at this point
Display record from database

I have a problem and I can't figure out how to get around it.

I have entries in my MySQL database for the users country. but for some reason when they are placed into the database they are done so in a odd way. If you look at the image below you will see what I mean.



At the bottom it says the users country, but for some reason when it is inserted into the database it is done in like a TEXT type, but the it is set for varchar. It should look like what wifi there is.

But anyway I'm trying to get a php script to display that record, when it is that way it is above, it will not display it in the script. If I manually put the country in, the table will look just like the one with wifi in it does, and it will display fine.

Is there any other way I need to write my line of code I use so it will pull that in?

I'm using this
Code:
$folder_sql = mysql_query("SELECT test_key from user_results WHERE  country = 'United States' ");
If I change the country type over to TEXT it does the same thing.

Thank You
dlewis23 is offline   Reply With Quote
Old 07-24-2008, 08:19 PM   PM User | #2
dlewis23
New Coder

 
Join Date: Jul 2008
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
dlewis23 is an unknown quantity at this point
I wanted to add. If I do it this

Code:
$folder_sql = mysql_query("SELECT country from user_results WHERE testid = 269890 ");
It will tell me the country from that testid just fine, it won't show me anything tho when I ask it to get something from a specific country, with WHERE country = 'Inset Country Name'
dlewis23 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:45 AM.


Advertisement
Log in to turn off these ads.