SELECT QUERY Problem

2001-12-10 Thread Anatole

Hello,

I often run into the problem of trying to join several tables and select
just the most recent (or largest) item from a series of entries.

For example.

Table 1: names
Id | name
15 | George
16 | Suzy

Table 2 : scores_1
Id | score
15 | 85
15 | 60
15 | 70
15 | 95

Table 3 : scores_2
Id | score
15 | 50
15 | 55
15 | 60
15 | 45

What I want to end up with is a selection that would pick up George and his
highest score on score_1 and score_2 (i.e. George 95 60)

Anybody have a pretty way to do this???

Thanks for any advice you can throw my way!

anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Myisamchk's Error 22

2001-07-31 Thread Anatole

I'm running MySQL 3.23.39 on RedHat 7.1. When I run myisamchk on my tables I
always get:

 error: 22 when opening MyISAM-table ...

After searching through the mailing lists I can find some people with the
same question, but not any answers. Anyone out there solve know about this
problem?

TiA,

Anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




The old interfering with the young

2001-07-26 Thread Anatole

Here's my problem:

I had some pre-installed version of MySQL on a Linux machine that I didn't
want to use or know how to dispose of properly and then installed a source
distribution on the same machine. I've gotten the source distribution
installed all right and everything seems to be working smoothly enough,
however, I have a lot of defunct mysql files laying around my server that I
would like to get rid of (from the pre-installed distribution).
Additionally, I have to type the complete path to the new MySQL server, or
it will try to connect with the previously installed version. Anyone know
how I can get rid of the old files and fix my environment so that my new
MySQL distribution is called when I enter mysql, mysqladmin, and the
like on the command line?

TIA,

Anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Remote Connection Strangeness

2001-06-27 Thread Anatole

A bit bizarre:
When I connect to MySQL through the localhost I have no problems; however
when I connect from a remote server I get the error Can't initialize
character set 13 (path:default)  in 

The localhost and the remote host both have versions of MySQL installed (the
remote host doesn't have the sjis charset set as its default, the localhost
does). However, it was my understanding that the remote host would use all
the functionality of the host it is connecting to.

I'm a bit confused by this error and it makes me think that I don't quite
fully understand what is going on when a remote connection is made. Any
clues? If so, please send a CC to my email address. TIA :-]

- anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Need Japanese character set files

2001-06-05 Thread Anatole

 Only single-byte character sets with simple sorting rules can be
 described by the *.conf files.  More complex character sets must
 be compiled into the server.
 
 The binaries that MySQL distributes have all supported character
 sets included.  You can see what character sets are available
 with this command:
 
   mysql show variables like 'character_sets';
 
 You should notice ujis and sjis there, if you are using one of our
 binaries.

 When you start mysqld, you use the --default-character-set=ujis
 option to change the character set being used.  Our binaries use
 latin1 by default.  With the configuration line from above, the
 default would be sjis, but you could specify ujis, gbk, or any
 of the simple character sets in share/charsets/*.conf.

I installed MySQL from an RPM file on Linux. When I use the mysqlshow
variables like 'character_sets'; as you mentioned above, I do, indeed, show
sjis. So, I shutdown mysql and restarted it like this:
safe_mysqld --default-character-set=sjis

This resulted in an error message (sorry I forgot the one however something
it to do with missing charsets I believe). I had a look around and I noticed
the following charsets in /usr/share/mysql/charsets:

./croat.conf*greek.conf*  latin1.conf*   win1251.conf*
../   danish.conf*   hebrew.conf* latin2.conf*
win1251ukr.conf*
Index*dec8.conf* hp8.conf*latin5.conf*
README*   dos.conf*  hungarian.conf*  swe7.conf*
cp1251.conf*  estonia.conf*  koi8_ru.conf*usa7.conf*
cp1257.conf*  german1.conf*  koi8_ukr.conf*   win1250.conf*

Alas, no sjis, but I imagine that is because it a double-byte character set.

So, I'm left with the following question:
1. What do you mean by
More complex character sets must
 be compiled into the server.
And how would I go about doing this?

TIA

Anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Need Japanese character set files

2001-06-05 Thread Anatole

Hi Tim,

Thanks for taking the time to write. You answered many questions that I
haven't been able to figure out so far about character sets.

The only thing I have left is...

 This resulted in an error message (sorry I forgot the one however something
 it to do with missing charsets I believe).
 
 I would need to know the error message in order to guess what is
 going wrong.

I brought down mysqld and restarted as before with safe_mysqld
--default-character-set=sjis and get the following error message when php
tries to connect:

Can't initialize character set 13 (path: default) in
/usr/local/apache/sites/gaijinpot.com/php/common.inc


Thanks again for your help!

Anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Efficient Query/Database Structure?

2001-05-17 Thread Anatole

Perhaps this is a common problem:
I would like to have a database field that contains multiple code numbers
and later search for the presence of one of the codes. What I have come up
with so far is using a  delimter between the code numbers to end up with
a field like:
12534

When searching I'm using:
REGEXP 
'^$search_category$|^$search_category|$search_category|$search_category$
'

This seems to work fine, however I was wondering if there is a better way...

Any advice would be greatly appreciated.

- anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Repost: Intall problems on i386-pc-solaris2.6 (bug?)

2001-05-16 Thread Anatole

Making another appeal for help Anybody have any clues to what I could do
to fix the problem below?

 I tried to configure MySQL like this:
 
 ./configure --prefix=/usr/local/mysql --with-charset=sjis
 
 After a hundred lines or so of install verifications, it quits the
 installation with the following:
 
 checking whether struct tm is in sys/time.h or time.h... time.h
 checking size of char... 0
 configure: error: No size for char type.
 A likely cause for this could be that there isn't any
 static libraries installed. You can verify this by checking if you have
 libm.a
 in /lib, /usr/lib or some other standard place.  If this is the problem,
 install the static libraries and try again.  If this isn't the problem,
 examine config.log for possible errors.  If you want to report this, use
 'scripts/mysqlbug' and include at least the last 20 rows from config.log!


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Installation prob on i386 solaris 2.6

2001-04-22 Thread Anatole Varin

Database configure problem:
 
When running configure  I get the following error:
 
 configure: error: No size for char type.
 A likely cause for this could be that there isn't any
 static libraries installed. You can verify this by checking if you have
 libm.a
 in /lib, /usr/lib or some other standard place.  If this is the problem,
 install the static libraries and try again.  If this isn't the problem,
 examine config.log for possible errors.
 
 I checked for libm.a and found it in /usr/lib
 
 Any idea where I should look to figure this out?
 
 Thanks for any advice you can send my way ,
 
 Anatole


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php