Reply to Re: PHP MySQL

Your name:

Reply:


Posted by Jerry Kita on 01/03/06 07:39

Man-wai Chang wrote:
> A table with a column big5 char(2) not null primary key.
>
> $target->query("delete from canton");
> for ($ii=0; $ii<256; $ii++) {
> for ($jj=0; $jj<256; $jj++) {
> echo $ii .".". $jj . "\n";
> $query="insert into canton ( big5 ) values ( '"
> . mysql_real_escape_string(chr($ii).chr($jj))
> . "' )";
> $target->query($query);
> }
> }
>
> The program died with this output:
>
> 0.92
> 0.93
> 0.94
> 0.95
> 0.96
> 0.97
> Duplicate entry '' for key 1
>
> The character strings shouldn't be repeated. Why did it stop at (0,97)?
>
Here's one thought ..... ascii (97) is the letter "a" .... is it
possible that the ascii (65) "A" was interpreted as lowercase thus
creating a duplicate primary key? Or your DBMS doesn't make a
distinction between upper or lower case.



--
Jerry Kita

http://www.salkehatchiehuntersville.com

email: jskita@attglobal.net

[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

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