Reply to Storing images into MySQL DB

Your name:

Reply:


Posted by steelghost on 07/27/06 07:21

I'm currently trying to store images into my DB. But the collation used
on my DB is big5, since my client wants this default encoding on their
webpage.
So to be able read the retreived data I have to use the command
mysql_query('SET NAMES big5');.

But when I do this, I'm not able to save the images to my DB. When I
attempt to, I recieve an SQL Error stating:

"You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near
'WÇƎ‡ÿ\\0µGÂé/ä-ÉM3Äzõ·...oŒý†Ípéãžÿ\\07¿B4oè^#³‹PÐu\\\'Z²¸ŒÉ揨Zê¶2Qsf·Œ'
at line 1"

If I changed the command to mysql_query('SET NAMES utf-8'); there are
no errors and the images save properly.

I suppose the encoding of the binary data in big5 contains some type of
invalid character causing the SQL string to error.

Anyone know how I can get around this?

[Back to original 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

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