Posted by Man-wai Chang on 01/01/06 16:17
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)?
--
.~. Might, Courage, Vision. SINCERITY. http://www.linux-sxs.org
/ v \
/( _ )\ (Ubuntu 5.10) Linux 2.6.14.4
^ ^ 22:15:01 up 8 days 11:12 load average: 0.02 0.06 0.10
Navigation:
[Reply to this message]
|