Re: [PHP-DB] Optimizing Query

2007-07-24 Thread Chris
Arie Nugraha wrote: Hi list, I Have a problem with my query that fetch about 22.000 records from database, the query is like this : SELECT SQL_CALC_FOUND_ROWS DISTINCT b.biblio_id, b.title, a.author_name FROMbiblio AS b LEFT JOIN biblio_author AS ba ON b.biblio_id=ba.biblio_id LEFT JOIN mst_au

[PHP-DB] Optimizing Query

2007-07-24 Thread Arie Nugraha
Hi list, I Have a problem with my query that fetch about 22.000 records from database, the query is like this : SELECT SQL_CALC_FOUND_ROWS DISTINCT b.biblio_id, b.title, a.author_name FROMbiblio AS b LEFT JOIN biblio_author AS ba ON b.biblio_id=ba.biblio_id LEFT JOIN mst_author AS a ON ba.author

Re: [PHP-DB] mysql different server different EXPLAIN result

2007-07-24 Thread Chris
Chenri wrote: Dear All I'm running 3 servers with mysql database - Local : 5.0.18-log, MySQL Community Edition (GPL) - Main Server : 4.1.22-standard-log, MySQL Community Edition - Standard (GPL) - Backup Server : 4.1.20, Source Distribution Not sure why you're surprised why they are differen

[PHP-DB] [Correction] Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding

2007-07-24 Thread Neil Smith [MVP, Digital media]
The solution is pretty simple once you hit it, and works in both MySQL and PGSQL because it's standard SQL-92 : $query="SET NAMES 'UTF-8'"; Sorry - I meant $query="SET NAMES 'UTF8'"; As you pointed out, it's UTF8 not UTF-8 ;-) Cheers - Neil -- PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] mysql different server different EXPLAIN result

2007-07-24 Thread Niel
Hi > I'm running 3 servers with mysql database > - Local : 5.0.18-log, MySQL Community Edition (GPL) > - Main Server : 4.1.22-standard-log, MySQL Community Edition - Standard > (GPL) > - Backup Server : 4.1.20, Source Distribution > > I copied a database from the Main Server to Local and Backup

[PHP-DB] mysql different server different EXPLAIN result

2007-07-24 Thread Chenri
Dear All I'm running 3 servers with mysql database - Local : 5.0.18-log, MySQL Community Edition (GPL) - Main Server : 4.1.22-standard-log, MySQL Community Edition - Standard (GPL) - Backup Server : 4.1.20, Source Distribution I copied a database from the Main Server to Local and Backup Server

[PHP-DB] MDB2 insert Oracle BLOB field problem

2007-07-24 Thread Rosen
Hi, I'm trying to insert into Oracle BLOB field with MDB2 package. I'm using prepared query ( prepare() & execute() ). The value for BLOB field I have in string variable. And I got an error: "Native message: ORA-01461: can bind a LONG value only for insert into a LONG column" Can someone help me w