OK, I've checked the archives and read msgs for two days, now I have to ask ...

I've installed mySQL from Redhat 7.0 distribution and got it running to my eyes ok:

Ver 8.8 Distrib 3.23.22-beta, for redhat-linux-gnu on i386
Server version 3.23.22-beta-log
Linux 2.2.16-22 #1 Tue Aug 22 16:16:55 EDT 2000 i586 unknown

mysqlbug doesn't run right, and I'm not smart enough to fix it.

Anyway, I'm into the tutorial on page 288 of the manual.  I've entered the number in 
the "shop" table, listed them out, and all looks ok.  But, my SELECT to return on a 
match in the "price" column fails.  I've tried various syntax, variations on the 
SELECT (e.g. price > 10), etc. but always returns 0 rows.  Below is a capture of a few 
commands.  No error messages, just wrong results.  I've seen the Redhat 7.0 package 
criticized here ... is this a case where I should blow away the default install and 
load the latest?  This is a server just for my self paced training which still seems 
to be at ground zero.  Any help?

session follows:


mysql> CREATE TABLE shop (
    ->  article INT(4) UNSIGNED ZEROFILL DEFAULT '0000' NOT NULL,
    ->  dealer  CHAR(20)                 DEFAULT ''     NOT NULL,
    ->  price   DOUBLE(16,2)             DEFAULT '0.00' NOT NULL,
    ->  PRIMARY KEY(article, dealer));
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO shop VALUES
    -> (1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45),(3,'C',1.69),
    -> (3,'D',1.25),(4,'D',19.95);
Query OK, 7 rows affected (0.01 sec)
Records: 7  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM shop;
+---------+--------+-------+
| article | dealer | price |
+---------+--------+-------+
|    0001 | A      |  3.45 |
|    0001 | B      |  3.99 |
|    0002 | A      | 10.99 |
|    0003 | B      |  1.45 |
|    0003 | C      |  1.69 |
|    0003 | D      |  1.25 |
|    0004 | D      | 19.95 |
+---------+--------+-------+
7 rows in set (0.00 sec)

mysql> SELECT article, dealer, price
    -> FROM   shop
    -> WHERE  price=19.95;
Empty set (0.00 sec)

=========================================================================================

If this is old ground covered elsewhere or if I should have posted my problem 
elsewhere, please advise me: but I've really spent a lot of time trying to find it!!

Regards
John Wallace



PGP key: http://www.execpc.com/~jwallace/KEY.TXT
Fingerprint: 156B F645 D2C0 AED8 CD9F  C986 DE0D 6708 8513 1B89 

Reply via email to