You are here: OT: Odd chars in MySQL column « All PHP « IT news, forums, messages
OT: Odd chars in MySQL column

Posted by Squet34785 on 10/09/06 20:57

Hello,
A bit off topic as it's about MySQL but I thought someone here would know
the answer.
I imported a list of records into my database from a tab delimited file, and
where some columns should be null or empty strings the associated PHP script
is treating them as valid entries. If I try to view the column:

mysql> select variantspelling from works where uid2=12777;
+-----------------+
| variantspelling |
+-----------------+
|
+-----------------+
1 row in set (0.00 sec)

It appears to be a newline, as I can pull it out in PHP and wrap it with
some characters and it only seems to a newline character. However the
following doesn't work:

mysql> select variantspelling from works where variantspelling regexp '\n'
and uid2=122777;
Empty set (0.00 sec)

Nor does

mysql> select variantspelling from works where variantspelling regexp '\n\r'
and uid2=122777;
Empty set (0.00 sec)

Does anyone know what the characters might be and how to identify them in
the database so I can mark them as null?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация