Re: newbie PHP/MySQL question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe from a previous query? I mean, did you make sure the table was clear 
before starting the script? 

On Monday 02 January 2006 6:18 pm, toylet 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 are unique. Why did it find a duplicate at (0,97)?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux