Jump to content

Recommended Posts

I have a varchar field in one of my databases.  I can insert a string such as 'this string is the data in the field' but when I go to display the data is displays 'this'.  It seems that no matter what I type in it will not display the first space or anything beyond it.  How do I fix this?  Thanks in advance.

When creating the table the column is defined as follows:

 

users_school varchar (30) default NULL

 

Now, I am looking at the entries via myPhpAdmin and I have, for example, the value 'University of Florida' in this column.

 

When I go to output this string, I do the following:

 

$result = mysql_query("SELECT users_school FROM users WHERE users_handle='bob")or die(mysql_error());

if (mysql_num_rows($result) > 0)

{

while($row = mysql_fetch_row($result))

                {

                echo $row[0];

                }

        }

 

This will give me the output:

 

'University'

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.