Page 1 of 1

strange character in MySQL table

Posted: Fri Aug 05, 2011 2:14 pm
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?

Re: strange character in MySQL table

Posted: Fri Aug 05, 2011 5:20 pm
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
?

Re: strange character in MySQL table

Posted: Sat Aug 06, 2011 1:27 pm
by McInfo
joshuamichaelsanders wrote:this board doesn't allow .txt or .doc.
It does allow .zip, though.