PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #1339

PEAR::DB select distinct ( text field ) Error

Details

Submitted2004-05-04 20:07 UTC
Fromtingham at coalmarch dot com
Assigneddanielc
StatusBogus
PackageDB
PHP Version4.3.2
OSOSX
Roadmaps(Not assigned)

Comments

[2004-05-04 20:07 UTC] tingham at coalmarch dot com

Description:
------------
Selecting distinct( category_name ) from a table containing that field as
type varchar(255) produces an error on either query or getAssoc.
This same query runs fine in mysql terminal.

Reproduce code:
---------------
create table products(
product_id INT NOT NULL AUTO_INCREMENT,
product_category varchar(255),
product_name varchar(255)
PRIMARY KEY(product_id)
);

<?
$que = "select distinct( product_category ) from products;";
$rs = /../->query($que);

$rs is error.

Expected result:
----------------
List of results from mysql.

Actual result:
--------------
Output to a <select> returns something of the form:

"

D

s

"