Cross tab confusion

2003-03-08 Thread Matt Johnson
This is my first post to the list. I could do with
some pointers please. I'm building a pupil assessment
record. I have these two tables:

table `pupil`

pupil_id   name
1  jeff
2  fred
3  rita


table `reading_level`

record_id   pupil_id   week   level
1   1  1  6.1
2   2  1  4.3
3   1  2  6.2
4   2  2  4.4


I'd really need to present this data thus:

name   week1   week2   week3
jeff   6.1 6.2
fred   4.3 4.4

I believe it will involve a cross tab query, but I'm
completely lost. I suspect it may use a temp table?
I've no experience of that either.

Thanks for any help.

--
Matt Johnson

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-
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: Failure to enforce length of fields to index corrupts tables -- fully resolved in BK

2001-12-11 Thread Matt Johnson

In article [EMAIL PROTECTED], Sinisa 
Milivojevic [EMAIL PROTECTED] writes
 MattJ wrote:
  It's still possible in the mysql client to request the creation 
of an index with indexlength NULL on TEXT fields. This apparently 
works okay on creation of the index, insert and select operations, but 
breaks horribly (marks table as crashed with corrupted indexes) on 
update or delete operations.
Hi!

I have tested your case.

The above bug was already fixed in our BK repository.

Fix will come up in 4.0.1, that is scheduled to come out soon.

Just as a followup to this, this past weekend I installed the BK head 
version of mysql-4.0.1-alpha (last changeset 1.980) on the server with 
the table-marked-as-crashed problems, and since then, having performed 
operations which would have caused a crashed table on the previous 
server, the tables have remained clean and functioning -- looks like the 
bug is fixed. :-)

It's now been up for just over 75 hours, and it's a fairly busy server:

Uptime: 272983  Threads: 6  Questions: 53688790  Slow queries: 505 
Opens: 180  Flush tables: 1  Open tables: 174
Queries per second avg: 196.674

...so the 4.0.1 in BK is looking good! Thanks for your help! :-)

Regards,
-- 
Matt Johnson [EMAIL PROTECTED]
AVSIM Online!

-
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: Failure to enforce length of fields to index corrupts tables

2001-11-28 Thread Matt Johnson

In article [EMAIL PROTECTED], Michael Widenius 
[EMAIL PROTECTED] writes
I just tested this with the upcoming MySQL 4.0.1:

mysql create table t1 (a text);
Query OK, 0 rows affected (0.01 sec)

mysql CREATE INDEX t1 ON t1(a);
ERROR 1170: BLOB column 'a' used in key specification without a key length

If you don't get the same error with your MySQL version, then it's
likely that this error is already fixed.

Monty,

Sinisa already replied saying it was fixed in 4.0.1. :)

...although the table which has been troublesome crashed again earlier 
today, as yet cause unknown *sigh*

Thanks for your help!
-- 
Matt Johnson [EMAIL PROTECTED]
Developer
AVSIM Online!

-
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