Re: cannot install mysql, read directions many times

2001-02-04 Thread rmdirms

I hate when I forget passwords, too. Especially when I didn't write them down and
safe-keep them somewhere.

Regards,

rmdirms

Jeff wrote:

 Never mind.  Dumb mistake.  I had an older version of mysql
 on this system set to a password which I forgot.


--
rmdirms...

seen on the internet

...w98-nt...32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit
operating system originally coded for a 4-bit microprocessor, written by a 2-bit
company that can't stand 1 bit of competition...




Re: Not Urgent . Please Don't care. (Can't Connect to Mysql Server on 192.9.200.2 (10055))

2001-02-04 Thread Yusuf Incekara


- Original Message -
From: Yusuf Incekara [EMAIL PROTECTED]
To: Benjamin Pflugmann [EMAIL PROTECTED]
Cc: Mysql Mailing list [EMAIL PROTECTED]
Sent: Saturday, February 03, 2001 1:54 AM
Subject: Re: Not Urgent . Please Don't care. (Can't Connect to Mysql Server
on 192.9.200.2 (10055))


 Dear Benjamin.
 I firstly very very thanks for your interest.
 This is my 3'rd mail with same question and you 're the first one who
 reply.

 - Original Message -
 From: Benjamin Pflugmann [EMAIL PROTECTED]
 To: Yusuf Incekara [EMAIL PROTECTED]
 Cc: Mysql Mailing list [EMAIL PROTECTED]
 Sent: Friday, February 02, 2001 2:52 AM
 Subject: Re: Not Urgent . Please Don't care. (Can't Connect to Mysql
Server
 on 192.9.200.2 (10055))


  Hi.
 
  On Thu, Feb 01, 2001 at 08:18:45PM +0200, [EMAIL PROTECTED]
wrote:
   Would you please offer me something please ?
  
From: [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Subject: Mysql Bug ? (Can't Connect to Mysql Server on 192.9.200.2
   (10055))
   
   
Description:
 I am connecting from Visual Basic 6 to Mysql via
ODBC DSN. When i made 94 sleeped connection after 94 can't connect
to
 a
server. It says : [TCX][MYODBC]Can't Connect to Mysql Server on
   192.9.200.2
(10055)
   Is it fault of myodbc or mysql server?
Is it normal. If there a maximum connection limit for process ?
 
  No. Your process is only limited by your OS. E.g. Linux defaults to a
  limit of 256 sockets per process. I don't know about Windows.
 I know but i tried it on 1 GB RAM and dual processor PIII 700 MHZ on winnt
4
 with service pack 6 a.
 There is a concurrent sleeped process limit. Same on linux too also.

 
I think it is abnormal cause everyone is talking about
10.000 Web Hit.
 
  Sorry? You can handle 10.000 web hits with only one connection.
 i am not interested about web. it works. no problem.
 if you just create a server object on asp. loop the recordset. then close.
 no problem. cause you only open 1 process then close. and it take 1 secs.
 example.

 Think a scenario :
 You connect via ODBC or Data Environment from VB
 then you get a recordset.
 You will show this recordset on a grid. (excel style spreadsheet.)
 if you use additem method , you can loop recordset and
 manually add rows into grid then close recordset no problem.

 but if you bound grid into that dao object then until program or form
close
 it run as a sleep process.

 and if you even use 3 connection for program ,
 if max sleep process is limited to 90 (due to your hardware configuration
,
 but even if you use 1 gb ram
 it is limited to max 120) that means maximum 30 user will be execute your
 program.

 and it is not satify us.

 
   Is it cause from sleeped process list ?
 
  Quite probably. Why do you need so much sleeping processes? Maybe
  there is a misconception about the need of them?
 mentioned above

I increased maximum connection to 200 but it not works.  I think
it is not related with maximum connection. It is related with
maximum process number.
 
  Why do you get so much processes? Do you really get so much hits? If
  so, maybe someone else can help (I have no clue about tuning Windows
  systems).
 yes i really need this. as i mentioned above every executed compiled
 software
 will be needed at least 3 connection till to unloaded.

 
How-To-Repeat:
Run this code on Microsoft Visual Basic 6 ENT Edition.
   
For i = 1 To 200
Set Temp_Bag(i) = New ADODB.Connection
Temp_Bag(i).Open "DSN=Avukatpro;UID=avukatpro;PWD=avukatpro"
Next i
It hangs 94 on Winnt. It hangs 60 on Win 95. It hangs 50 on Win98
SE.
 
  Well, do you have a production situation that hits the wall? If not, I
  wouldn't care about it. One of my servers delivers about 5.000.000
  queries (300.000 web hits) a day with only 10-20 concurrent
  connections. (Not, that there is no need for hundreds of connections
  in some applications, but most time you don't need so much).

 i have a critical product(which is written in vb for end users)
 that needs at least 150 concurrent sleeped process to run.

 
  [...]
Release: mysql-3.23.26-beta
   
Exectutable:   mysqld-nt and mysqld-opt
Environment:   PIII 700 MHZ Intel,256 MB RAM with WinNT4 ,
Same Problem on PIII MHZ Intel with 128 MB Ram
System:WinNT4 with Service Pack 6a, Internet Explorer 5
  Same problem on Windows 95 Osr 2
Same Problem on Windows 98 SE
  [...]
 
  Bye,
 
  Benjamin.
 
 



-
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




Data won't display

2001-02-04 Thread Joel Holtzman

Hello, I noticed that while access databases use 'memo' mysql does not. It
uses blob. Anyway, I used it for a discussion board, and it stores messages,
but it won't display on my web page via asp.

It would work via access using 'memo' not 'text'.

So what conditions apply when inserting/displaying 'blob' text ( I need text
well over 1 characters I figure at times) that I should know about?

Anybody notice how text records sometimes don't display?

Thanks




-
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




problems getting DISTINCT data

2001-02-04 Thread Siim Einfeldt aka Itpunk



SELECT DISTINCT estitle,id,lepingid FROM main WHERE litsents='something'
ORDER BY lepingid

Now, lets suppose I have 20 entries with the exact same information (or at
least estitle and lepingid are the same). What if I wanted to get only one
entry with the same information? I could do it with LIMIT 1, but this case
it would only give me one entry. But I have there entries with different
estitles as well. So how could I manage to get entries only with different
estitles? 

Thanks,
Siim Einfeldt


-
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: MySQL NT Service Question

2001-02-04 Thread Greg Cope

Lee Jenkins wrote:
 
 Hello all.
 
 We are currently using MS Access for a multi-user application (4-5 clients).
 We sent out a system to a customer with NT Service enabled in anticipation
 of switching over to MySQL.
 
 We noticed that when activity on the MS database got heavy (if you can call
 3 clients heavy activity) that our application that was talking to it would
 hang alot.  It's a small network using TCP/IP over NetBEUI with a Win2K Box
 in the back with 128 MB RAM/PIII 666 MHz.  When I un-installed the MySQL NT
 Service (3.23 Gamma) the problem disapeared.
 
 Any Ideas (other than stop using MS Access)?
 

Access is horrible in a multiuser environment and will hag due to
locking issues.

I do not use the word Database with Access - having worked with it in
the past!

MySQL IMHO being a RDatabaseMS has few locking issues and is designed
for a multiuser environment, something which access was not.

As an aside 128 meg of RAM is not alot for a W2k server - RAM being
cheap you may wish to upgrade it.

Greg


 Lee Jenkins
 
 -
 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

-
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: Re[2]: Serious MySQL internal deadlock

2001-02-04 Thread Sinisa Milivojevic

Peter Zaitsev writes:
  Hello Andreas,
  
  Thursday, February 01, 2001, 7:42:31 PM, you wrote:
  
  
  I must confirm the problem with table locks. Mysql realy may deadlock
  sometimes, and the funny thing is the solution to this case is to kill
  the oldest locked thread waiting this condition - afterwards
  everything resolves. So this may mean something like broadcast is lost
  sometimes (?)
  
  


Hi!

I guess we may sound to be obnoxious, but can you make a repeatable
case out of it ??

d
Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaka, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
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: when does inserting become too much of an overhead?

2001-02-04 Thread Sinisa Milivojevic

Daniel Kirk writes:
  Hi there,
  
  I am considering porting a MS-SQLServer database to MySQL.  After reading
  some of the documentation, I am concerned about inserts.
  
  I run a sports prediction website, where players submit their predictions
  for a competition.  When a player submits their predictions, this is
  generally 10 inserts into each of 3 different tables.
  
  It is not feasible to store these inserts in a pool and execute them later -
  they must be done so that the player receives confirmation that their
  predictions were submitted straight away - their predictions must also be
  submitted by a certain time so the time they submitted them must be
  accurate.
  
  The website generally gets busy on a friday afternoon as that is when most
  people want to submit their predictions.  Hence I need the database to be
  able to inserts thousands of records per second - how much would MySQL be
  able to handle?
  
  Another problem I foresee is that this table is also used for people to view
  the predictions of other users.  So a common query is something like "SELECT
  tip FROM UserTippingInfo WHERE userid = x AND matchnumber = y".  Would I be
  best to keep the in the one table or should I create a View on the table or
  a copy of the table to query?
  
  thx for your help
  
  Dan


Hi!

If you would use multi-row INSERT's, you would be surprised of the
speed that MySQL is capable of.

Regarding SELECT's, you just have to normalize your schema and put
indices to the right place, which in the above situation would be on
userid and matchnumber, without unnecessary duplicating tables. Also
try not to DELETE rows, but to mark them so that INSERT's and SELECT's
could work in parallel (if on UNIX).


Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaka, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
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




Increasing queries speed?

2001-02-04 Thread keetsh®

Hi,

I'm handling a database which has about 2 million records.

When I execute a query such as: "select * from megasize where
idtxt='hello';"
It takes approximately 8 seconds to get the records...
I've got a quite fast computer and I wondered if there was a way to increase
the speed of the query and bring it to 2 or 3 seconds?

If yes, please tell me how to do it...

Regards,

SK


-
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




Page Locking in 3.23

2001-02-04 Thread Phil Taylor

Hi

I can't find  any documentation that explains how to activate page level locking on 
BDB tables - is page level locking the default when a CREATE TABLE is done?

Cheers

Phil



SQL- syntax... error using interchange and mysql

2001-02-04 Thread Boyd Lynn Gerber

I keep getting this error.

table products created: create table products (
sku VARCHAR(20) NOT NULL PRIMARY KEY,
description VARCHAR(255) NOT NULL,
price DECIMAL(12,2) NOT NULL, index(price),
author_editor VARCHAR(80),
isbn VARCHAR(20),
url VARCHAR(40),
title VARCHAR(128) DEFAULT '' NOT NULL, index(title),
template_page VARCHAR(64),
comment__MVC_FIELDMUNGE__ char(128),
display VARCHAR(128),
image VARCHAR(64),
wholesale char(128),
category VARCHAR(64) NOT NULL, index(category),
nontaxable CHAR(3),
weight VARCHAR(12) DEFAULT '0' NOT NULL,
size__MVC_FIELDMUNGE__ char(128),
color VARCHAR(96),
gift_cert VARCHAR(3),
related TEXT,
featured VARCHAR(32),
download char(128),
dl_type char(128),
dl_location char(128),
inactive char(128)
)

signat config error: You have an error in your SQL syntax near ' '', '',
'', '',
 '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',' at line 1


This is the tab delimited first and part of the second line.

sku description price   author_editor   isbnurl title   template_page  
 comment__MVC_FIELDMUNGE__   display image   wholesale   category
nontaxable  weight  size__MVC_FIELDMUNGE__  color   gift_cert
related featureddownloaddl_type dl_location inactive
1-56085-123-6  An Abundant Life: The Memoirs of Hugh B. Brown  17.95
Edwin B. Firmage, editor1-56085-123-6   abundant.htm...


Thanks,

--
Boyd Gerber [EMAIL PROTECTED]
ZENEZ   3748 Valley Forge Road, Magna Utah  84044
Office 801-250-0795 FAX 801-250-7975


-
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




NuSphere

2001-02-04 Thread Ruben I Safir - Brooklyn Linux Solutions CEO


What exactly is now the relationship between NuShpere and MYSQL/TSX.  Who is
working on the Gemini COde and the documentation?

Ruben

-- 
Brooklyn Linux Solutions
http://www.mrbrklyn.com
http://www.brooklynonline.com

1-718-382-5752


-
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




chroot strangenesses

2001-02-04 Thread Christian Hammers

Hi

I don't understand the way mysql tries to jail itself with --chroot.

If I start 
 mysqld --chroot=/var/lib/mysql_jail
then it gives me an error saying that it wasn't able to initialize the 
databases. When I copy the mysql database somewhere into the jail it works.

But - when I modify the mysql database or create new databases then only
the files outside the jail, in /var/lib/mysql/ gets modified. 

So why there is a need for having this mysql database copy in the jail?!
 
TIA
bye,

-christian-

Apropos: it would be nice if someone would incorporate the no-passwd-patch
from the mailing list into the latest mysqld server so that there is no longer
a need to have a /etc/passwd and libnss/libcompat in the jail.

-- 
   You know you're a nerd when your os uptime is longer than 
   you've ever had a girlfriend.  ([EMAIL PROTECTED])

-
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




timestamp(14) fails to change on load data infile

2001-02-04 Thread Clownfish Internet Services - www.clown-fish.com

I am experiencing problems trying to dynamically link tables in Microsoft
Access 2000 using ODBC and MYSQL.

MYSQL  Ver 11.12 Distrib 3.23.32, for pc-linux-gnu (i686)
ODBC  myodbc-2.50.36-win95
MS Access2000 with MDAC 2.1

The error messages I am getting are "this record has been changed by another
user since you started editing it"
I believe it is due to duplicate timestamp(14) values.

For Example:

I have a simple data base created using the following statement:

create table example (id int(11) NOT NULL AUTO_INCREMENT, name
varchar(10),timestamp timestamp(14),PRIMARY KEY(id));

***no problem***

mysql describe example;
+---+---+--+-+-++
| Field | Type  | Null | Key | Default | Extra  |
+---+---+--+-+-++
| id| int(11)   |  | PRI | NULL| auto_increment |
| name  | varchar(10)   | YES  | | NULL||
| timestamp | timestamp(14) | YES  | | NULL||
+---+---+--+-+-++
3 rows in set (0.00 sec)

***problem***

when I import external data in the following format (example.csv)


1,a
2,b
3,c


using the following statement:

load data local infile  '/home/fred/example.csv' replace into table example
FIELDS TERMINATED BY ',';

mysql select * from example;
++++
| id | name   | timestamp  |
++++
|  1 | aa | 00 |
|  2 | bb | 00 |
|  3 | cc | 00 |
++++
3 rows in set (0.00 sec)

The timestamp has not been changed upon import and hence is duplicated
throughout.

***Question***

Is there any way to import from an external source and create a modified
(unique) timestamp upon import ?
I have tried defining the timestamp(14) column with "default 'now' ",
suggested by somone else with a
similar problem but it doesn't seem to work.

Please Help !

Clownfish


-
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




copy fields

2001-02-04 Thread William

Is there a way to copy select fields from one table and copy them into another table?

Thank you
William Robinson




Re: Need join order help

2001-02-04 Thread Bob Hall

Background info: One main table with basic entry info joined to 
other tables with additional info about the entry.  The additional 
info about the entry is based on the entry type and is located in 
single other table (which other table depends on the entry type).

  - table LOG_LOG (this is the main table that is joined to other tables.)
Fields  Type Null   Key
LOG_IDbigint(20)PRIauto_increment
LOGGED_DATEdatetime  yes
ENTRY_DATE  datetime   yes
CREW_POSITIONvarchar(10)yes
LOGGER varchar(5)  yes
TBL_NAME  varchar(255)
REMARKS   text  yes

Keys
PRIMARYUnique   Field = LOG_ID
LOG_LOGField = LOG_ID

  - table SAT_GEN (this is one of the tables that has more 
information about that type of entry)
Fields  Type Null   Key
SAT_GEN_ID   int(11)PRIauto_increment
LOGID bigint(20)Unique
SAT_GEN_FLTvarchar(10)yes

Keys
PRIMARYUnique   Field = SAT_GEN_ID
SAT_GENField = SAT_ID
LOGID Unique   Field = LOGID

  - table SAT_CMD (this is another table that has more information 
about this type of entry)
Fields  Type Null   Key
SAT_CMD_ID   int(11)   PRIauto_increment
LOGID bigint(20)   Unique
SAT_CMD_FLTvarchar(10) yes
SAT_CMD_CMD   varchar(255)  yes
SAT_CMD_Tvarchar(8)  yes
SAT_CMD_Vvarchar(8)  yes
SAT_CMD_GO char(1)  yes

Keys
PRIMARY Unique   Field = SAT_CMD_ID
SAT_CMD_IDUnique   Field = SAT_CMD_ID
LOGID  Unique   Field = LOGID

Now, to get the data and display it correctly I use a select to get 
all the data (it will be limited by date range) and display it 
correctly.  Since each entry can be of a different type I first 
check the value of the TBL_NAME field and then know what type of 
entry it is so I can look at the correct field names and display it 
correctly.

Finaly the problem.  The SQL select below puts the joins in the wrong order.

SELECT LOG_LOG.LOG_ID, LOG_LOG.ENTRY_DATE, 
CONCAT(DATE_FORMAT(LOG_LOG.ENTRY_DATE,'%Y'),':',DATE_FORMAT(LOG_LOG.EN 
TRY_DATE,'%j')) AS ENTRY_JULIAN, 
DATE_FORMAT(LOG_LOG.ENTRY_DATE,'%T') AS ENTRY_TIME, 
LOG_LOG.CREW_POSITION, LOG_LOG.LOGGER, LOG_LOG.TBL_NAME, 
LOG_LOG.REMARKS, SAT_GEN.LOGID, SAT_GEN.SAT_GEN_FLT, SAT_CMD.LOGID, 
SAT_CMD.SAT_CMD_FLT, SAT_CMD.SAT_CMD_CMD, SAT_CMD.SAT_CMD_T, 
SAT_CMD.SAT_CMD_V, SAT_CMD.SAT_CMD_GO
FROM LOG_LOG, SAT_GEN, SAT_CMD
WHERE LOG_LOG.LOG_ID=SAT_GEN.LOGID AND LOG_LOG.LOG_ID=SAT_CMD.LOGID;

This is the EXPLAIN output for the select statement.  LOG_LOG should 
be the first table as it is the main table that all others are 
joined to.

   table type possible_keys key key_len ref rows Extra
   SAT_CMD ALL LOGID NULL NULL NULL 8
   LOG_LOG eq_ref PRIMARY,LOG_LOG PRIMARY 8 SAT_CMD.LOGID 1
   SAT_GEN eq_ref LOGID LOGID 8 LOG_LOG.LOG_ID 1


I can't figure out how to force the correct join order to get all 
entries in LOG_LOG and matching entries in the other two tables 
(there will be many more tables later).  I tried various STRAIT_JOIN 
syntaxes but everything I tried gives me an error.

Question:  How do I use STRAIT_JOIN to force the correct order?

Bigger Question:  Am I using a reasonable method of accomplishing 
this task in the first place i.e. is there a better schema? (this 
will be a web-based intranet application.

Thanks and sorry about the lenght of the question.

Chuck Murison

Sir, you're asking about two different, unrelated things. The first 
is the order of joins. Since you're using an inner join, the order of 
joins has no effect on the output. It's purely an optimization issue.

The other thing you're asking about is getting all rows from one 
table and matching rows from other tables. The answer is to use LEFT 
JOIN, with the main table as the left table.
(FROM log_log LEFT JOIN another_table ON ...) LEFT JOIN 
yet_another_table ...

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

-
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: Problem with Match / Against and multi-table join

2001-02-04 Thread Bob Hall

I am trying to write a query using the fulltext and match and I've 
run into a problem.  I'm new to MySQL, so this question might have 
already been asked, but I just can't seem to find it.

I'm using the fulltext capabilities to do a query.  The query 
requires joins with four different tables.  The problem that I've 
run into is once I add the fourth table, the match column no longer 
has any value -- it's always zero.  I'm running version 3.23.32 on a 
Windows 2000 server machine.


Query 1: Works as expected

select message.thread_id, message.forum_id, message.user_id, 
message.created, match message.body against ('test') as score,
 thread.thread_title, user.username
 from message,thread,user
 where message.thread_id = thread.thread_id
 and message.user_id=user.user_id
 order by score desc limit 10

Query 2: Returns rows (the joins are working), but match column is 
zero for every record.

The only difference is the addition of the forum table (adding 
forum.title as a column, and adding a join condition in the where 
clause)

select message.thread_id, message.forum_id, message.user_id, 
message.created, match message.body against ('test') as score,
 thread.thread_title, user.username, forum.title
 from message,thread,user,forum
 where message.forum_id = forum.forum_id
 and message.thread_id = thread.thread_id
 and message.user_id=user.user_id
 order by score desc limit 10

Am I missing the point with all this?  Should I be doing a 
match...limit x into a temporary table and then do my join against 
that?

I would appreciate any help anyone can offer.

Sir, in the example you're not doing anything with the fourth table. 
Why are you adding it to the FROM clause?

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

-
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: timestamp(14) fails to change on load data infile

2001-02-04 Thread Clownfish Internet Services - www.clown-fish.com

Thank you very much -

This works fine now !

Clownfish

- Original Message -
From: "Pat Sherrill" [EMAIL PROTECTED]
To: "Clownfish Internet Services - www.clown-fish.com"
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, February 04, 2001 6:00 PM
Subject: Re: timestamp(14) fails to change on load data infile



 When using a TIMESTAMP column with LOAD DATA INFILE, the TIMESTAMP must be
 either set to NULL or an appropriate date within the import file or
 specifically left out of the field list in the LOAD DATA INFILE statement
as
 follows:

   LOAD DATA INFILE  'example.csv' replace into table example FIELDS
 TERMINATED BY ',' (id,name);

 otherwise TIMESTAMP will be set to the appropriate zero value
 ('00').

 I hope this helps...

 Pat...
 [EMAIL PROTECTED]

 BTW  I would recommend against using 'timestamp' as a column name since it
 is a reserved word.

 - Original Message -
 From: "Clownfish Internet Services - www.clown-fish.com"
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 04, 2001 11:20 AM
 Subject: timestamp(14) fails to change on load data infile


  I am experiencing problems trying to dynamically link tables in
Microsoft
  Access 2000 using ODBC and MYSQL.
 
  MYSQL  Ver 11.12 Distrib 3.23.32, for pc-linux-gnu (i686)
  ODBC  myodbc-2.50.36-win95
  MS Access2000 with MDAC 2.1
 
  The error messages I am getting are "this record has been changed by
 another
  user since you started editing it"
  I believe it is due to duplicate timestamp(14) values.
 
  For Example:
 
  I have a simple data base created using the following statement:
 
  create table example (id int(11) NOT NULL AUTO_INCREMENT, name
  varchar(10),timestamp timestamp(14),PRIMARY KEY(id));
 
  ***no problem***
 
  mysql describe example;
  +---+---+--+-+-++
  | Field | Type  | Null | Key | Default | Extra  |
  +---+---+--+-+-++
  | id| int(11)   |  | PRI | NULL| auto_increment |
  | name  | varchar(10)   | YES  | | NULL||
  | timestamp | timestamp(14) | YES  | | NULL||
  +---+---+--+-+-++
  3 rows in set (0.00 sec)
 
  ***problem***
 
  when I import external data in the following format (example.csv)
 
 
  1,a
  2,b
  3,c
 
 
  using the following statement:
 
  load data local infile  '/home/fred/example.csv' replace into table
 example
  FIELDS TERMINATED BY ',';
 
  mysql select * from example;
  ++++
  | id | name   | timestamp  |
  ++++
  |  1 | aa | 00 |
  |  2 | bb | 00 |
  |  3 | cc | 00 |
  ++++
  3 rows in set (0.00 sec)
 
  The timestamp has not been changed upon import and hence is duplicated
  throughout.
 
  ***Question***
 
  Is there any way to import from an external source and create a modified
  (unique) timestamp upon import ?
  I have tried defining the timestamp(14) column with "default 'now' ",
  suggested by somone else with a
  similar problem but it doesn't seem to work.
 
  Please Help !
 
  Clownfish
 
 
  -
  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
 


 -
 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




-
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: Page Locking in 3.23

2001-02-04 Thread Jeremy D. Zawodny

On Sun, Feb 04, 2001 at 01:03:47PM -, Phil Taylor wrote:
 Hi
 
 I can't find any documentation that explains how to activate page
 level locking on BDB tables - is page level locking the default when
 a CREATE TABLE is done?

Yes.
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408) 530-5454
Cell: (408) 439-9951

-
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




Need help debugging 3.23.32 crashing

2001-02-04 Thread Brad Fitzpatrick

MySQL 3.23.32 has been crashing on me quite frequently, as well as the past
several versions.  At first I gave MySQL the benefit of the doubt and blamed
it on the compilation.  I've since tried 6 different builds, ranging from
fully optimized with no debugging to bloated and slow, with full debugging.
Each one of the crashes.

I know the table that is causing MySQL to segfault, but I can't reproduce
yet the sequence of queries that caues it to happen.

What I really need help with is instructions on how to make mysqld write its
core file after it crashes.  I have "core" on its own line in /etc/my.cnf,
in the [mysqld] section.  Is that enough?  Obviously not.  I'm new to using
the my.cnf  the parsing of that file seems somewhat odd.

If that is what I'm supposed to do, where are the core files supposed to go?

Also, the error doesn't show me a stack trace, but instead says:

  Bogus stack limit or frame pointer, aborting backtrace.

Then, mysqld restarts and I see a bunch of lines like:

  read_const: Got error 126 when reading table ./livejournal/dirsearchres

I've pretty much figured out that MySQL crashes after I do a "DELETE FROM
dirsearchres".  That table is constantly growing up to a million rows or so,
and then a cron job deletes everything in them.  (Why this is necessary is
another discussion in itself)

MySQL developers --- maybe that means something to you.  The schema is:

CREATE TABLE dirsearchres (
dsid INT UNSIGNED NOT NULL,
userid INT UNSIGNED NOT NULL,
KEY (dsid) --- really an INDEX, not a key
);

The this table grows a ton, then rapidly shrinks.

Maybe TRUNCATE dirsearchres would work better than DELETE FROM dirsearchres.

But regardless, MySQL is crashing and should be fixed.  I don't want to find
a workaround.

Any suggestions?

- Brad



-
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




Can anyone do this ?

2001-02-04 Thread Web Depressed

Hi,
I've been trying for a while now and I can't figure
out how to do the following:

In regular English, I wish to show all items for which
I have allocations greater than one for all days
encapsulated between the user input range.

User Input:
---
Date_from   (ie. 2001-02-04)
Date_to (ie. 2001-02-06)

My Tables:
--
Table1
+++
| id | name   |
+++
|  1 | Item1  |
|  2 | Item2 |
+++

Table2
++-+---+
| date   | no_of_items | table1_id |
++-+---+
| 2001-02-04 |   3 | 1 |
| 2001-02-05 |   2 | 1 |
| 2001-02-06 |   2 | 1 |
| 2001-02-04 |   2 | 2 |
| 2001-02-06 |   1 | 2 |
++-+---+

Basically my user says he/she needs a list of what
items are available FROM a certain date TO a certain
date.  I therefor need to return all items which I
have at least 1 of for EACH of the dates within my
users range:

I have tried using BETWEEN but it fails (ie.
If my user says: from 2001-02-04 to 2001-02-06, using
BETWEEN MySQL returns Item2 even though I do not have
Item 2 listed for 2001-02-05.

Here is where I'm at:
mysql SELECT t1.*, t2.* 
-  FROM Table1 t1, Table2 t2 
-  WHERE t2.date BETWEEN "2001-02-04" AND
"2001-02-06" 
-  AND t1.id=t2.table1_id 
-  AND t2.no_of_Items =1;

++---++-+---+
| id | Item  | date   | no_of_items | table1_id |
++---++-+---+
|  1 | Item1 | 2001-02-04 |   3 | 1 |
|  1 | Item1 | 2001-02-05 |   2 | 1 |
|  1 | Item1 | 2001-02-06 |   2 | 1 |
|  2 | Item2 | 2001-02-04 |   2 | 2 |
|  2 | Item2 | 2001-02-06 |   1 | 2 |
++---++-+---+

What I need is a query which will generate the
following result:

++---++-+---+
| id | Item  | date   | no_of_items | table1_id |
++---++-+---+
|  1 | Item1 | 2001-02-04 |   3 | 1 |
|  1 | Item1 | 2001-02-05 |   2 | 1 |
|  1 | Item1 | 2001-02-06 |   2 | 1 |
++---++-+---+

Forgive me if this is actually simple and/or I haven't
explained clearly.

Many thanks in advance for your help.

-- Frank


__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.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




Different versions causing this?

2001-02-04 Thread Charles Murison

I recently asked for some help with join order and it's now fixed, kinda :)

On a web server running mySQL version 3.22.32 on a Linux box (cobalt RAQ) I get the 
following output for this query:

EXPLAIN SELECT * FROM (LOG_LOG LEFT JOIN SAT_CMD ON LOG_LOG.LOG_ID=SAT_CMD.LOGID) LEFT 
JOIN SAT_GEN ON LOG_LOG.LOG_ID=SAT_GEN.LOGID; 

  table type possible_keys key key_len ref rows Extra 
  LOG_LOG ALL NULL NULL NULL NULL 41   
  SAT_CMD ALL LOGID NULL NULL NULL 7   
  SAT_GEN eq_ref LOGID LOGID 8 LOG_LOG.LOG_ID 1   


As you can see it's not an optimal query.  Nothing I did could fix it.

So I dumped the tables and put them on my local machine running mySQL version 
3.23.28-gamma on Win98.  This is the output I get now for the same query:

+-++---+---+-++--+---+
| table   | type   | possible_keys | key   | key_len | ref| rows | Extra |
+-++---+---+-++--+---+
| log_log | ALL| NULL  | NULL  |NULL | NULL   |   41 | |
| sat_cmd | eq_ref | LOGID | LOGID |   8 | log_log.log_id |1 | |
| sat_gen | eq_ref | LOGID | LOGID |   8 | log_log.log_id |1 | |
+-++---+---+-++--+---+
3 rows in set (0.55 sec)

All fields remained the same except for case and all indexes are the same.

Is it the different versions causing this or different platforms?

Thanks and thanks for the previous help in getting this query working in the first 
place,

Chuck Murison






Re: About reserved words: mySQL's dirty little secret

2001-02-04 Thread Paul DuBois

At 2:28 PM -0800 2/4/01, Heath Boutwell wrote:
Evidently, one can use the ` to escape reserved words
in mySQL.

Why in the world this isn't mentioned in the manual is
beyond me.

http://www.mysql.com/doc/L/e/Legal_names.html
http://www.mysql.com/doc/R/e/Reserved_words.html


Why no one on the list ever mentions it when some poor
sap discovers that some random word has been made
reserved for no reason is beyond me

They're not exactly chosen at random, but yes, it's
unpleasant to find that a word you've used has become
reserved in a new release.

That's why it's a good idea to read the change notes
when a new release comes out. The developers try to
mention when a word becomes reserved due to the addition
of new features.


Why the mySQL developers never mention it is beyond
me.

See above.


Anyway, since its undocumented, I'm guessing that it
will magically quit working one day, but for now it
seems to work like a charm.


-- 
Paul DuBois, [EMAIL PROTECTED]

-
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: About reserved words: mySQL's dirty little secret

2001-02-04 Thread Paul DuBois

At 5:45 PM -0500 2/4/01, Rick Pasotto wrote:
If reserved words are such a big deal why are they not even mentioned
in the DuBois book? Or if they are I haven't come across it. Certainly
'reserved' does not appear in the index.

Guilty as charged.

With reference to the use of `` to quote reserved words so that you can
use them as identifiers, it's not mentioned because that was an addition
that occurred as the book was going to press.

-- 
Paul DuBois, [EMAIL PROTECTED]

-
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: Can anyone do this ?

2001-02-04 Thread Jeff Sorenson

Try: select t1.*, t2* from table1 as t1, table2 as t2 where 
t2.date='2001-02-04' and t2.date='2001-02-06' and t1.id=t2.id and 
t2.no_of_items=1


Here is where I'm at:
mysql SELECT t1.*, t2.*
   -  FROM Table1 t1, Table2 t2
  -  WHERE t2.date BETWEEN "2001-02-04" AND
"2001-02-06"
-  AND t1.id=t2.table1_id
   -  AND t2.no_of_Items =1;

Jeff

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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: warning using php

2001-02-04 Thread Rus

Maybe mysql_result description could help you.

int mysql_result(int result, int row, mixed [field] );

mysql_result() returns the contents of one cell from a MySQL result set. The
field argument can be the field's offset, or the field's name, or the
field's table dot field's name (fieldname.tablename). If the column name has
been aliased ('select foo as bar from...'), use the alias instead of the
column name.

When working on large result sets, you should consider using one of the
functions that fetch an entire row (specified below). As these functions
return the contents of multiple cells in one function call, they're MUCH
quicker than mysql_result(). Also, note that specifying a numeric offset for
the field argument is much quicker than specifying a fieldname or
tablename.fieldname argument.

Calls mysql_result() should not be mixed with calls to other functions that
deal with the result set.

Recommended high-performance alternatives: mysql_fetch_row(),
mysql_fetch_array(), and mysql_fetch_object().

I usualy use mysql_fetch_object($result).

- Original Message -
From: John-Mark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 05, 2001 1:56 AM
Subject: warning using php


 Hello all I hope you can help.
 I am using the line
 $email = mysql_result($result,0,"email");
 in php4
 when i load the page I get
 Warning: Supplied argument is not a valid MySQL result resource
in/var/www/dbase/index.php on line 10
 This is the line i have written the code.
 I have tried it several different ways all to no avail
 Thanks in advance
 jm
 --
 John-Mark

 -
 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




-
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: Can anyone do this ?

2001-02-04 Thread Rus

Can you explain what difference between dates 2001-02-04 and  2001-02-06 for
item2 and 2001-02-04 and  2001-02-06 for item1?

- Original Message -
From: Web Depressed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 04, 2001 11:41 PM
Subject: Can anyone do this ?


 Hi,
 I've been trying for a while now and I can't figure
 out how to do the following:

 In regular English, I wish to show all items for which
 I have allocations greater than one for all days
 encapsulated between the user input range.

 User Input:
 ---
 Date_from (ie. 2001-02-04)
 Date_to (ie. 2001-02-06)

 My Tables:
 --
 Table1
 +++
 | id | name   |
 +++
 |  1 | Item1  |
 |  2 | Item2 |
 +++

 Table2
 ++-+---+
 | date   | no_of_items | table1_id |
 ++-+---+
 | 2001-02-04 |   3 | 1 |
 | 2001-02-05 |   2 | 1 |
 | 2001-02-06 |   2 | 1 |
 | 2001-02-04 |   2 | 2 |
 | 2001-02-06 |   1 | 2 |
 ++-+---+

 Basically my user says he/she needs a list of what
 items are available FROM a certain date TO a certain
 date.  I therefor need to return all items which I
 have at least 1 of for EACH of the dates within my
 users range:

 I have tried using BETWEEN but it fails (ie.
 If my user says: from 2001-02-04 to 2001-02-06, using
 BETWEEN MySQL returns Item2 even though I do not have
 Item 2 listed for 2001-02-05.

 Here is where I'm at:
 mysql SELECT t1.*, t2.*
 -  FROM Table1 t1, Table2 t2
 -  WHERE t2.date BETWEEN "2001-02-04" AND
 "2001-02-06"
 -  AND t1.id=t2.table1_id
 -  AND t2.no_of_Items =1;

 ++---++-+---+
 | id | Item  | date   | no_of_items | table1_id |
 ++---++-+---+
 |  1 | Item1 | 2001-02-04 |   3 | 1 |
 |  1 | Item1 | 2001-02-05 |   2 | 1 |
 |  1 | Item1 | 2001-02-06 |   2 | 1 |
 |  2 | Item2 | 2001-02-04 |   2 | 2 |
 |  2 | Item2 | 2001-02-06 |   1 | 2 |
 ++---++-+---+

 What I need is a query which will generate the
 following result:

 ++---++-+---+
 | id | Item  | date   | no_of_items | table1_id |
 ++---++-+---+
 |  1 | Item1 | 2001-02-04 |   3 | 1 |
 |  1 | Item1 | 2001-02-05 |   2 | 1 |
 |  1 | Item1 | 2001-02-06 |   2 | 1 |
 ++---++-+---+

 Forgive me if this is actually simple and/or I haven't
 explained clearly.

 Many thanks in advance for your help.

 -- Frank


 __
 Get personalized email addresses from Yahoo! Mail - only $35
 a year!  http://personal.mail.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




-
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: Can anyone do this ?

2001-02-04 Thread Bob Hall

Hi,
I've been trying for a while now and I can't figure
out how to do the following:

In regular English, I wish to show all items for which
I have allocations greater than one for all days
encapsulated between the user input range.

User Input:
---
Date_from  (ie. 2001-02-04)
Date_to(ie. 2001-02-06)

My Tables:
--
Table1
+++
| id | name   |
+++
|  1 | Item1  |
|  2 | Item2 |
+++

Table2
++-+---+
| date   | no_of_items | table1_id |
++-+---+
| 2001-02-04 |   3 | 1 |
| 2001-02-05 |   2 | 1 |
| 2001-02-06 |   2 | 1 |
| 2001-02-04 |   2 | 2 |
| 2001-02-06 |   1 | 2 |
++-+---+

Basically my user says he/she needs a list of what
items are available FROM a certain date TO a certain
date.  I therefor need to return all items which I
have at least 1 of for EACH of the dates within my
users range:

I have tried using BETWEEN but it fails (ie.
If my user says: from 2001-02-04 to 2001-02-06, using
BETWEEN MySQL returns Item2 even though I do not have
Item 2 listed for 2001-02-05.

Here is where I'm at:
mysql SELECT t1.*, t2.*
 -  FROM Table1 t1, Table2 t2
 -  WHERE t2.date BETWEEN "2001-02-04" AND
"2001-02-06"
 -  AND t1.id=t2.table1_id
 -  AND t2.no_of_Items =1;

++---++-+---+
| id | Item  | date   | no_of_items | table1_id |
++---++-+---+
|  1 | Item1 | 2001-02-04 |   3 | 1 |
|  1 | Item1 | 2001-02-05 |   2 | 1 |
|  1 | Item1 | 2001-02-06 |   2 | 1 |
|  2 | Item2 | 2001-02-04 |   2 | 2 |
|  2 | Item2 | 2001-02-06 |   1 | 2 |
++---++-+---+

What I need is a query which will generate the
following result:

++---++-+---+
| id | Item  | date   | no_of_items | table1_id |
++---++-+---+
|  1 | Item1 | 2001-02-04 |   3 | 1 |
|  1 | Item1 | 2001-02-05 |   2 | 1 |
|  1 | Item1 | 2001-02-06 |   2 | 1 |
++---++-+---+

Forgive me if this is actually simple and/or I haven't
explained clearly.

Many thanks in advance for your help.

-- Frank

Sir, create a variable day_count with the count of days in the 
user-supplied range. Then set up the following temp table.

CREATE TEMPORARY TABLE counts
SELECT table1_id, Count(DISTINCT date_field) as cnt
WHERE data_field BETWEEN min AND max
GROUP BY id
HAVING cnt = day_count;

Now you have a table with the IDs of items that occur at least once 
each day in the user-supplied range. You don't need the DISTINCT if 
each item can only have one record per day. Now some inner joins 
should get the results you want.

   SELECT table1.*, table2.*
   FROM table1, table2, counts
   WHERE table1.id = table2.table1_id AND table1.id = counts.table1_id
  AND date_field BETWEEN min AND max;

I haven't actually run this, which means that there's probably a 
mistake or three.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

-
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: About reserved words: mySQL's dirty little secret

2001-02-04 Thread Paul DuBois

On Sun, Feb 04, 2001 at 11:32:42PM -0200, Fbio Ottolini wrote:
 Paul,
 
 Tomorrow they are going to add a new feature named "over the air select".
 Why this is not on your book? :)

Ag!

:-)

 BR,
 
 Fbio Ottolini
 
 - Original Message -
 From: "Paul DuBois" [EMAIL PROTECTED]
 To: "Rick Pasotto" [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, February 04, 2001 9:49 PM
 Subject: Re: About reserved words: mySQL's dirty little secret
 
 
  At 5:45 PM -0500 2/4/01, Rick Pasotto wrote:
  If reserved words are such a big deal why are they not even mentioned
  in the DuBois book? Or if they are I haven't come across it. Certainly
  'reserved' does not appear in the index.
 
  Guilty as charged.
 
  With reference to the use of `` to quote reserved words so that you can
  use them as identifiers, it's not mentioned because that was an addition
  that occurred as the book was going to press.
 
  --
  Paul DuBois, [EMAIL PROTECTED]
 
  -
  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
 
 
 
 
 
 -
 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

-
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




Tru64 4.0F Upgrade

2001-02-04 Thread --/--


After upgrading an 1000A from 4.0E to 4.0F and successfully running
3.23.29a-gamma for three days I thought I was out of the woods. This BTW
was an upgrade from 3.22.xx with the Binary release:

mysql-3.23.29a-gamma-dec-osf4.0f-alphaev6.tar.gz.

I did the OS and Database at the same time, living on the edge?

Compiling mysql C clients using the following cc line failed:

cc -o test test.c -I/usr/local/mysql/include -L/usr/local/mysql/lib
-lmysqlclient -lm

ld:
Unresolved:
mysql_num_fields
mysql_error

/usr/local/mysql is my default installation directory. A "ls -l" of the
lib directory in /usr/local/mysql/lib has:

-rw-r--r--  1 mysql mysql 369074Feb 4 05:34 libmysqlclient.a

I was quite concerned and downloaded the mysql-3.23.32 source and compiled
the client  library portions using gnu's make (3.79.1). After this
successful compilation (It did fail on ./strings doing strxmov.c and the
include c_asm.h later on.) and make install from those directories I
tried replacing the -L/usr/local/mysql/lib (Binary Distribution Files)
with:
 
-L/usr/local/lib/mysql (Source compiled locally.)

and it worked.

The ls -l of /usr/local/lib/mysql is:

-rw-r--r--  1 root  system  455926 Feb 4 18:43 libmysqlclient.a

"file" on both says "Alpha archive"

My question is this:

Is there a `problem' with the 23.29a-gamma-dec-osf4.0f-alphaev6 binary
release? 

The alpha I'm working with is a EV5.6, is this the problem? **Obvious**

(I will probably take a crash through the mail lists and dig up the files
on successfully building a mysqld from source on 4.0f and give it a try.
With GNU make it bailed with the error (above) and I'm sure I've seen
this on the list or in the README for info specific to Alpha/Tru64.)

In the meantime am I safe to continue to run the binary client/server
programs including mysqld from the Binary release? They don't seem to be
causing in grief and no errors over three days now... 

Thanks for anyone who might be willing to help me `open my eyes' if that's
what's required.


-
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




usage of distinct in a table join query?

2001-02-04 Thread Marc Swanson

Hello,

I am trying to craft a query that will allow me to retrieve truly unique
result elements.  Here's my setup:


table_1

link_field varchar(20)
field1 varchar(20)
field2 varchar(20)




table_2
--
link_field varchar(20)
field3 varchar(20)


Here's what I've been trying to do (unsuccessfully):

"SELECT DISTINCT t1.*,t2.field3 FROM table_1 AS t1, table_2 AS t2 WHERE
t1.link_field = t2.link_field ORDER BY t2.field3"


imagine these contents of the two tables:
table_1
---
record 1:
link_foo1
foo1
foo2

record 2:
link_foo2
foo3
foo4

table_2
---
record 1:
link_foo1
bar1

record 2:
link_foo1
bar2

record 3:
link_foo2
bar1


What I want is a query that will return only 1 entry for each "link_foo"
encountered in table #2 but order the result based on the contents of
"field3" from table #2 and also return the corresponding data from table #1.
The query I'm running shows a number of records returned equal to the number
of records in table #2... although they ARE ordered correctly.

What am I doing wrong?  If there's no way to do what I want I suppose I
could keep a list of each item encountered and skip over the next element if
it has already been encountered but that seems like a lot of extra
unneccessary code.

Thanks

-Marc-

#/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/#
#Marc Swanson |  \|||/  #
#MSwanson Consulting  |  /o o\  #
#Phone:  (603)868-1721|-oooOooo-#
#Fax:(603)868-1730|  Solutions in:  #
#[EMAIL PROTECTED] |  'PHP'Perl  #
# |  'SQL'C++   #
# |  'HTML   'Sh/Csh#
# http://www.mswanson.com |  'Javascript#
#/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/#


-
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




Problem with reinstalling

2001-02-04 Thread Lars-Olof Albertson

Hello,
After trying an HPH-script MySQL started to slow down the whole computer. 
The problems remained after a restart of the computer. I removed the MySQL 
installation using the Control Panel Add/Remove Programs and reinstalled 
MySQL. When I run "mysqld-nt --install" I got a message - failed to install 
service. When I try to start MySQL from service's dialog in control panel I 
get errcode 1067.  It seems to be impossible to remove a service from the 
service's list!!
Please help.

Lars-Olof Albertson







--
Lars-Olof Albertson
FormOnLine AB
Ragnar Lodbroks gr 17
S-224 75 Lund
Sweden

Telephone 046-39 93 32
Mobil 070-636 76 93 


-
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




DB link with Oracle

2001-02-04 Thread Chan, Kwok-Hing

Can MySQL make a DB link connection to Oracle such that MySQL can access
tables in Oracle and vice versa?
Thank you very much

-
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




mysql threads not dying after mysqladmin shutdown

2001-02-04 Thread root

Description:

When the system is loaded down and using the max number of connections,
if you do a mysqladmin shutdown, it kills all the mysql processes except
a few. One of the mysqld processes uses 100% cpu and writes this out
to the log file continuously:
   
  
010203 22:57:22  Delayed insert thread couldn't get requested lock for 
  
table ArtistRatings
  
   
  
This happens on several tables.  

Fix:

Have to kill -9 the processes

Release:   mysql-3.23.32 (Official MySQL RPM)
Server: /usr/bin/mysqladmin  Ver 8.14 Distrib 3.23.32, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.32-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 20 hours 46 min 35 sec

Threads: 99  Questions: 48299363  Slow queries: 34  Opens: 500  Flush tables: 1  Open 
tables: 494 Queries per second avg: 645.757
Environment:

System: Linux db1.audiogalaxy.com 2.2.19pre7 #2 SMP Tue Jan 23 14:13:04 CST 2001 i686 
unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.0)
Compilation info: CC='egcs'  CFLAGS='-O6 -fomit-frame-pointer -mpentium'  CXX='egcs'  
CXXFLAGS='-O6 -fomit-frame-pointer  -felide-constructors 
-fno-exceptions -fno-rtti -mpentium'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   14 Dec 18 04:16 /lib/libc.so.6 - 
libc-2.1.94.so
-rwxr-xr-x1 root root  4796386 Oct  5 16:46 /lib/libc-2.1.94.so
-rw-r--r--1 root root 22737326 Oct  5 16:09 /usr/lib/libc.a
-rw-r--r--1 root root  178 Oct  5 16:09 /usr/lib/libc.so
Configure command: ./configure  --disable-shared --with-mysqld-ldflags=-all-static 
--with-client-ldflags=-all-static --enable-assembler --with-mysqld-user=mysql 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ 
--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin 
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql 
--infodir=/usr/info --includedir=/usr/include --mandir=/usr/man --without-berkeley-db 
'--with-comment=Official MySQL RPM'


-
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: sth-execute - screen/file output

2001-02-04 Thread Jeremy D. Zawodny

On Mon, Feb 05, 2001 at 02:44:35PM +0800, [EMAIL PROTECTED] wrote:
 hi list,
 
 im trying to write a perl srcipt that will connect to a mysql
 database server, do some queries and print the output on the screen
 (or maybe append the output to a file), that would look something
 like this.
 
 +--+---+--+-+
 | tnum | user  | cust | area|
 +--+---+--+-+
 |   22 | nivra | testing  | isdn  |
 |   23 | nivra | testing1 | ddu  |
 |   24 | nivra | testing1 | ddu  |
 +--+---+--+-+
 
 below is my perl script.
 
 #!/usr/bin/perl
 
 use DBI;
 
 $dbname= "dbname";
 $dbuser = "dbuser";
 $dbpass = "dbpass";
 $dbhost = "localhost";
 $dbport = "3306";
 $dsn = "DBI:mysql:database=$dbname;host=$dbhost;port=$dbport";
 
 $condition = " where date = '2001/01/27' and petsa = '2001/01/31' and 
 user = 'user'";
 
  # Connect to the database
  $dbh = DBI-connect($dsn, $dbuser, $dbpass);
 
  # if needed and execute the SELECT
  $sth = $dbh-prepare("SELECT tnum, user, type, area, stat FROM 
 tickets$where ");
  $output = $sth-execute;
 
  # clean up  disconnect from the DB
  $sth-finish;
  $dbh-disconnect;
  print $output;
 
 but it doesn't give me any output at all. i'd like to know if there
 is any special parameter to use with sth-execute to do this. did i
 miss anything here?

A couple of points:

  (1) You should really `use strict' in your Perl code.

  (2) The return value of $sth-execute is not what you expect. Check
  the DBI docs to learn what it really is.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408) 530-5454
Cell: (408) 439-9951

-
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: sth-execute - screen/file output

2001-02-04 Thread Sean Conley

You are just missing a step.  The execute method does exactly what it says,
executes the prepared SQL statement.  Once this is done, you must fetch data
from the handle with one of the fetch methods such as fetchrow_array or
fetchall_arrayref.  Another alternative is to combine the prepare, execute,
and fetch into a single statement with one of the operations on a database
handle such as $dbh-selectrow_array(sql statement), etc.  There are a few
ways to actually fetch the data, I'd suggest taking a look at the
documentation.

Sean

-Original Message-
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Sunday, February 04, 2001 10:35 PM
Subject: sth-execute - screen/file output


hi list,

im trying to write a perl srcipt that will connect to a mysql database
server, do some queries and print the output on the screen (or maybe append
the output to a file), that would look something like this.

+--+---+--+-+
| tnum | user  | cust | area|
+--+---+--+-+
|   22 | nivra | testing  | isdn  |
|   23 | nivra | testing1 | ddu  |
|   24 | nivra | testing1 | ddu  |
+--+---+--+-+

below is my perl script.

#!/usr/bin/perl

use DBI;

$dbname= "dbname";
$dbuser = "dbuser";
$dbpass = "dbpass";
$dbhost = "localhost";
$dbport = "3306";
$dsn = "DBI:mysql:database=$dbname;host=$dbhost;port=$dbport";

$condition = " where date = '2001/01/27' and petsa = '2001/01/31' and
user = 'user'";

 # Connect to the database
 $dbh = DBI-connect($dsn, $dbuser, $dbpass);

 # if needed and execute the SELECT
 $sth = $dbh-prepare("SELECT tnum, user, type, area, stat FROM
tickets$where ");
 $output = $sth-execute;

 # clean up  disconnect from the DB
 $sth-finish;
 $dbh-disconnect;
 print $output;

but it doesn't give me any output at all. i'd like to know if there is any
special parameter to use with sth-execute to do this. did i miss anything
here?

thanks for your time.





-
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



-
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