Re: [PHP-DB] newbie PHP/MySQL question

2006-01-03 Thread toylet
yes. Note the "delete from canton" query.

I found something. case.. Somehow, mysql treat "A" the same as "a"

Maybe from a previous query? I mean, did you make sure the table was clear
> before starting the script?
> >   $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);
> > }
> >   }
>


Re: [PHP-DB] newbie PHP/MySQL question

2006-01-02 Thread Micah Stevens

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



[PHP-DB] newbie PHP/MySQL question

2006-01-02 Thread toylet
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)?


Re: [PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Seabird
LOL, Jason, you actually had me go back to the first post to re-read it for
a link or some code...

good skills there Jason,

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Saturday 21 December 2002 01:11, Matt Matijevich wrote:
> > I am just getting started with php an mysql.
> >
> > When I try to insert a record php get stuck in some kind of loop and
> > about 25 records are created.  Any help would be greatly appreciated.
> >
> > Windows 2000 server latest service pack.
> > PHP 4.2.3
> > MySql 3.23
> > IIS 5.0
>
> My mind reading skills aren't very good, but I think there's something
wrong
> with line 13 of your program.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
>
> /*
> The greatest disloyalty one can offer to great pioneers is to refuse to
> move an inch from where they stood.
> */
>



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




RE: [PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Matthew Moldvan
lol ... sorry but that was just funny

:-D

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Newbie PHP/MySQL question


On Saturday 21 December 2002 01:11, Matt Matijevich wrote:
> I am just getting started with php an mysql.
>
> When I try to insert a record php get stuck in some kind of loop and
> about 25 records are created.  Any help would be greatly appreciated.
>
> Windows 2000 server latest service pack.
> PHP 4.2.3
> MySql 3.23
> IIS 5.0

My mind reading skills aren't very good, but I think there's something wrong

with line 13 of your program.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
The greatest disloyalty one can offer to great pioneers is to refuse to
move an inch from where they stood.
*/


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



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


RE: [PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread NIPP, SCOTT V (SBCSI)
I would say his problem is the IIS 5.0.  Switch to some non-MS
operating system running Apache as a web server and that should clear up
your problems.  :)

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 11:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Newbie PHP/MySQL question


On Saturday 21 December 2002 01:11, Matt Matijevich wrote:
> I am just getting started with php an mysql.
>
> When I try to insert a record php get stuck in some kind of loop and
> about 25 records are created.  Any help would be greatly appreciated.
>
> Windows 2000 server latest service pack.
> PHP 4.2.3
> MySql 3.23
> IIS 5.0

My mind reading skills aren't very good, but I think there's something wrong

with line 13 of your program.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
The greatest disloyalty one can offer to great pioneers is to refuse to
move an inch from where they stood.
*/


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

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




Re: [PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Jason Wong
On Saturday 21 December 2002 01:11, Matt Matijevich wrote:
> I am just getting started with php an mysql.
>
> When I try to insert a record php get stuck in some kind of loop and
> about 25 records are created.  Any help would be greatly appreciated.
>
> Windows 2000 server latest service pack.
> PHP 4.2.3
> MySql 3.23
> IIS 5.0

My mind reading skills aren't very good, but I think there's something wrong 
with line 13 of your program.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
The greatest disloyalty one can offer to great pioneers is to refuse to
move an inch from where they stood.
*/


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




[PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Matt Matijevich
I am just getting started with php an mysql.

When I try to insert a record php get stuck in some kind of loop and
about 25 records are created.  Any help would be greatly appreciated.

Windows 2000 server latest service pack.
PHP 4.2.3
MySql 3.23
IIS 5.0

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