strange character in MySQL table

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
joshuamichaelsanders
Forum Newbie
Posts: 14
Joined: Thu Jul 21, 2011 4:48 pm

strange character in MySQL table

Post by joshuamichaelsanders »

I have a table called adult_student that basically references the relation between an adult and a student in this application I'm writing for my kids HS band.

Code: Select all

mysql> describe adult_student;
+------------+-------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| adult_ID   | int(11)     | NO   | PRI | NULL    |       |
| student_ID | int(11)     | NO   | PRI | NULL    |       |
| relation   | varchar(45) | YES  |     | NULL    |       |
+------------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)

mysql>
I populated the table with data I massaged in an excel spreadsheet that was saved as a .csv. When I do a

Code: Select all

SELECT * FROM adult_student;
in MySQL workbench I see father, mother, etc. with a little rectangle at the end. I can't even paste into this topic. All it does is return down to the next line. I can paste it into notepad so I'm going to attach a file with the strange character. Is this some bug with workbench or did I enter the data in incorrectly?

edit: well I was going to attach the file but this board doesn't allow .txt or .doc. I'm not sure how to show the artifact. When I open it in word or wordpad it just shows an extra line under father. Is it a carriage return?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: strange character in MySQL table

Post by Weirdan »

it's likely the newline / carriage return. what does the following query return:

Code: Select all

select hex(relation) from adult_student limit 5
?
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: strange character in MySQL table

Post by McInfo »

joshuamichaelsanders wrote:this board doesn't allow .txt or .doc.
It does allow .zip, though.
Post Reply