Re: partitionong MyISAM tables??

2003-02-01 Thread Jeremy Zawodny
On Fri, Jan 31, 2003 at 04:36:05AM -0700, Prasanth Krishna wrote:
 Is there any way to partition MyISAM tables in mysql? i have a huge
 table and want to partition it. 

Why?

Have you looked at MyISAM MERGE tables yet?  They're a style of
partitioning that MySQL lets you play with.

 Do InnoDB tables support partitioning?

No.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.8: up 3 days, processed 111,370,017 queries (345/sec. avg)

-
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 field is updated unintentionally

2003-02-01 Thread Jennifer Goodie
Read the section in the manual about timestamps, this is expected behavior,
it is how it is supposed to work.

http://www.mysql.com/doc/en/DATETIME.html
The TIMESTAMP column type provides a type that you can use to automatically
mark INSERT or UPDATE operations with the current date and time. If you have
multiple TIMESTAMP columns, only the first one is updated automatically...

-Original Message-
From: Marco Deppe [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 3:18 AM
To: [EMAIL PROTECTED]
Subject: TIMESTAMP field is updated unintentionally


Hi,

I was already questioning my sanity, but the problem below is
reproduceable:

This is how my table looks:
mysql describe T_ORDH;
--+--+-+++
Field |Type  |Null |Key |Default |Extra
--+--+-+++
PK_ID |int(10) unsigned  | |PRI |NULL|auto_inc
ERSTELL_DATUM |timestamp(14) |YES  ||NULL|
STATUS|smallint(5) unsigned  | ||0   |

If I do
mysql update T_ORDH set STATUS=2 where PK_ID=26272;
ERSTELL_DATUM is set to the current date. I know that a timestamp
takes the current time, if set it to NULL, but since I'm not touching
it, it shouldn't change, should it?

A quick workaround is
mysql update T_ORDH set STATUS=2, ERSTELL_DATUM=ERSTELL_DATUM
- where PK_ID=26272;

The big question: Is it a bug or a feature?
(mysql  Ver 11.18 Distrib 3.23.51, for pc-linux-gnu (i686))


-
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: Fulltext Index

2003-02-01 Thread Diana Soares
Hi, 

The MATCH() column list must exactly match the column list in some
FULLTEXT index definition for the table, unless this MATCH() is IN
BOOLEAN MODE.

from:
http://www.mysql.com/doc/en/Fulltext_Restrictions.html


On Thu, 2003-01-30 at 21:40, R. Hannes Niedner wrote:
 If I create a FULLTEXT index for 2 or more columns in a table will I be able
 to use it for a MATCH only against a single column (of the above) or do I
 have to create additional FULLTEXT indices for each of these columns?
 
 Thanks/h
 
-- 
Diana Soares


-
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 field is updated unintentionally

2003-02-01 Thread Stefan Hinz, iConnect \(Berlin\)
Marco,

 mysql update T_ORDH set STATUS=2 where PK_ID=26272;
 ERSTELL_DATUM is set to the current date. I know that a timestamp
 takes the current time, if set it to NULL, but since I'm not touching
 it, it shouldn't change, should it?

 A quick workaround is
 mysql update T_ORDH set STATUS=2, ERSTELL_DATUM=ERSTELL_DATUM
 - where PK_ID=26272;

 The big question: Is it a bug or a feature?

The small answer is: It's a feature, and it's documented as well:

Automatic updating of the first TIMESTAMP column occurs under any of the
following conditions:
The column is not specified explicitly in an INSERT or LOAD DATA INFILE
statement.
The column is not specified explicitly in an UPDATE statement and some
other column changes value. (Note that an UPDATE that sets a column to
the value it already has will not cause the TIMESTAMP column to be
updated, because if you set a column to its current value, MySQL ignores
the update for efficiency.)
You explicitly set the TIMESTAMP column to NULL.

http://www.mysql.com/doc/en/DATETIME.html

BTW: In tables like yours I always have _two_ timestamp columns, like:

letzteAenderung TIMESTAMP
erstellDatumTIMESTAMP

On INSERT, I set erstellDatum to now(). letzteAenderung will
automatically be set to the same value. On UPDATE, erstellDatum will be
left untouched (because it's not the first TIMESTAMP column), and
letzteAenderung will be set to NOW() without me having to think of it. A
very convenient feature, indeed :)

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Marco Deppe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 12:17 PM
Subject: TIMESTAMP field is updated unintentionally


 Hi,

 I was already questioning my sanity, but the problem below is
 reproduceable:

 This is how my table looks:
 mysql describe T_ORDH;
 --+--+-+++
 Field |Type  |Null |Key |Default |Extra
 --+--+-+++
 PK_ID |int(10) unsigned  | |PRI |NULL|auto_inc
 ERSTELL_DATUM |timestamp(14) |YES  ||NULL|
 STATUS|smallint(5) unsigned  | ||0   |

 If I do
 mysql update T_ORDH set STATUS=2 where PK_ID=26272;
 ERSTELL_DATUM is set to the current date. I know that a timestamp
 takes the current time, if set it to NULL, but since I'm not touching
 it, it shouldn't change, should it?

 A quick workaround is
 mysql update T_ORDH set STATUS=2, ERSTELL_DATUM=ERSTELL_DATUM
 - where PK_ID=26272;

 The big question: Is it a bug or a feature?
 (mysql  Ver 11.18 Distrib 3.23.51, for pc-linux-gnu (i686))



 --
 Best regards,
 Marco

 mailto:[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




Re: binary log not recording 4.0.9

2003-02-01 Thread sam
Hi Gerald,

I do not know what you mean by opening one database?  Medic is a 
database.  Are saying that two database are involved?
And , why would updates be excluded.  I read the documentation
about replication and did not see anything about updates not occurring
under certain situations.

I appreciate any help you can offer,

Sam Pizzuto


- Original Message - 
From: gerald_clark [EMAIL PROTECTED]
To: sam [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 9:20 AM
Subject: Re: binary log not recording 4.0.9


 If your application is opening one database, and then updating
 medic.sometable, the update will not be recorded in the bin file.
 
 
 sam wrote:
 
 I am trying to use replication with 4.0.9.
 
 Changes to the datbase are not being recorded in
 the bin file on the master for a DB called Medic 
 when presented by an application but will if I 
 setup a test table in the DB mysql and use the 
 mysql client to insert/update.
 
 At this point I have no idea what to do.
 
 Should I sent this to bugs@mysql?
 
 Any ideas?
 
 sam 
 
   
 
 
 
 


-
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: Newbie Q: Booleans??

2003-02-01 Thread Fernando Grijalba
There is a BOOLEAN type, which really is a TINYINT.  Any non-zero value is
true and zero is false.

I use this columnt type with all my checkboxes in Visual Basic.

HTH

JFernando
* sql *

-Original Message-
From: David Hefford [mailto:[EMAIL PROTECTED]]
Sent: January 31, 2003 06:46
To: [EMAIL PROTECTED]
Subject: Newbie Q: Booleans??


Have used many databases but am just getting into MySQL and am totally rapt
about it :) I am writing a front end in realBasic that needs to be able to
run on various backends, MySQL being the main one. All of the others have a
boolean type of column. What is the general practice to Œmimic¹ a BOOLEAN
field in MySQL? PS: I do not need NULL or date for example, I just need true
or false, yes or no etc...

Regards

David Hefford
Power On Solutions
Web: http://www.poweron.com.au
Email: [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




Re: How can I start my mysql server with max_connections option

2003-02-01 Thread Diana Soares
You have mistaken the syntax, use the option 
--set-variable max_connections=200

or add to your my.cnf file in one of [mysqld], [server] or [safe_mysqld]
sections:

set-variable   = max_connections=200


On Thu, 2003-01-30 at 17:16, [EMAIL PROTECTED] wrote:
 Hi Group,
 
 I want to start my mysql with max_connections option. Now I am getting To
 many connction error. So I want to allow 200 concurrent connections...
 
 I tried with
 safe_mysqld max_connections=200 
 But it is not coming up...
 How can I set max_connections as 200. Do I need to specify that in my.cnf
 
 Please help..
 
-- 
Diana Soares


-
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: partitionong MyISAM tables??

2003-02-01 Thread Joseph Bueno
Hi,

Have you looked at MERGE tables (http://www.mysql.com/doc/en/MERGE.html) ?

Hopre this helps,
Joseph Bueno

Prasanth Krishna wrote:

Is there any way to partition MyISAM tables in mysql? i have a huge
table and want to partition it. 
Do InnoDB tables support partitioning?
thanks.
Prasanth



-
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: # of connected user

2003-02-01 Thread Joseph Bueno
SHOW PROCESSLIST
Check http://www.mysql.com/doc/en/SHOW_PROCESSLIST.html for details

Hope this helps,
Joseph Bueno


Mustafa Yelmer wrote:

How i list connected users(active) to mysql server?

it is important to know connected users for me?
Mysql runs in server-client system, and each host of clients are different
(i assume)


Mustafa Yelmer
Software Engineer
+90 212 2128200-1228
[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: Newbie Q: Booleans??

2003-02-01 Thread Diana Soares
Hi,
You have the BOOL type in MySQL which is a synonym for TINYINT(1). 
Maybe this is the best approach.

You may see the manual in Column types section.

On Fri, 2003-01-31 at 11:46, David Hefford wrote:
 Have used many databases but am just getting into MySQL and am totally rapt
 about it :) I am writing a front end in realBasic that needs to be able to
 run on various backends, MySQL being the main one. All of the others have a
 boolean type of column. What is the general practice to Œmimic¹ a BOOLEAN
 field in MySQL? PS: I do not need NULL or date for example, I just need true
 or false, yes or no etc...
 
 Regards
 
 David Hefford
 Power On Solutions
 Web: http://www.poweron.com.au
 Email: [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
 
-- 
Diana Soares


-
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: # of connected user

2003-02-01 Thread Diana Soares
Don't know if i understood your question very well, but try:
# mysqladmin proc
in command line or execute the query 
SHOW PROCESSLIST

On Fri, 2003-01-31 at 11:49, Mustafa Yelmer wrote:
 How i list connected users(active) to mysql server?
 
 it is important to know connected users for me?
 Mysql runs in server-client system, and each host of clients are different
 (i assume)

I didn't understand this...

 
 
 Mustafa Yelmer
 Software Engineer
 +90 212 2128200-1228
 [EMAIL PROTECTED]
 
-- 
Diana Soares


-
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: Configure prob with FreeBSD/Linuxthreads

2003-02-01 Thread Dan Nelson
In the last episode (Jan 31), Maximo Migliari said:
 So, my dear friends, could we conclude that Linux is a more appropriate 
 platform for running MySQL
 on a multi-processed machine?
 
 I was desperate to try and compile MySQL 4.0.9-gamma on my FreeBSD 
 4.7-stable machine, which is
 dual processed.   I managed to compile fine once, but it gave errors when 
 executing the deamon.
 
 I found some instructions for compiling MySQL with linuxthreads on FreeBSD 
 4.x from one
 Jeremy Zawodny, at the website: 
 http://jeremy.zawodny.com/blog/archives/000458.html
 
 However, my machine complains right at the begining of the configure run 
 that:
 ...
 checking for gcc... cc
 checking for C compiler default output... configure: error: C compiler cannot create 
executables

What's at the bottom of config.log?

-- 
Dan Nelson
[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: TIMESTAMP field is updated unintentionally

2003-02-01 Thread Paul DuBois
At 12:17 +0100 1/31/03, Marco Deppe wrote:

Hi,

I was already questioning my sanity,


Don't.  Reading the manual is more helpful. :-)


 but the problem below is
reproduceable:

This is how my table looks:
mysql describe T_ORDH;
--+--+-+++
Field |Type  |Null |Key |Default |Extra
--+--+-+++
PK_ID |int(10) unsigned  | |PRI |NULL|auto_inc
ERSTELL_DATUM |timestamp(14) |YES  ||NULL|
STATUS|smallint(5) unsigned  | ||0   |

If I do
mysql update T_ORDH set STATUS=2 where PK_ID=26272;
ERSTELL_DATUM is set to the current date. I know that a timestamp
takes the current time, if set it to NULL, but since I'm not touching
it, it shouldn't change, should it?


What does the manual say?



A quick workaround is
mysql update T_ORDH set STATUS=2, ERSTELL_DATUM=ERSTELL_DATUM
- where PK_ID=26272;

The big question: Is it a bug or a feature?


According to the manual, that's how it's supposed to work.
Visit the online manual and type TIMESTAMP into the search box.
It'll give you the answers you're looking for.


(mysql  Ver 11.18 Distrib 3.23.51, for pc-linux-gnu (i686))



--
Best regards,
Marco

mailto:[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: creating update files

2003-02-01 Thread gerald_clark
I use version 2.

Christian Andersson wrote:


Hi there, I have a little question for you in the mysql community..

I was wondering how persons in this community handles changes to the
database when your application that uses the database needs some new
tables, columns, etc...

Do you have an application with a sort of upgrade functionallity that
when started checks the database for incosistency and when it finds some
updates the database? (ie compares the structure of the table in the
database to some template stored in the application or as
datafiles/scripts)

Or do you use some version system where the application instead of
looking for inconsistency just look at the version number of the
database, compares it to some internal version, and updates the database
accordingly? (ie manually creating all the needed updatescripts that
needs to run the application and have the application select between 
these)

Or perhaps you do this update of the database manually when intalling a
new version?

For me, version 1 would be preferable, but unfourtunally this does not
work in every scenario, but i guess that it normally could take care of
about 90% off all my changes...  the second system would be able to take
care of all type of changes, but it requires more labour...

so, how do you all manage this?

/Christian Andersson





-
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 field is updated unintentionally

2003-02-01 Thread gerald_clark
Since that is exactly how the manual describes it, it must be a feature.
If you have more than one timestamp, they will all get set on an insert,
but only the first will be changed on an update.

Marco Deppe wrote:


Hi,

I was already questioning my sanity, but the problem below is
reproduceable:

This is how my table looks:
mysql describe T_ORDH;
--+--+-+++
Field |Type  |Null |Key |Default |Extra
--+--+-+++
PK_ID |int(10) unsigned  | |PRI |NULL|auto_inc
ERSTELL_DATUM |timestamp(14) |YES  ||NULL|
STATUS|smallint(5) unsigned  | ||0   |

If I do
mysql update T_ORDH set STATUS=2 where PK_ID=26272;
ERSTELL_DATUM is set to the current date. I know that a timestamp
takes the current time, if set it to NULL, but since I'm not touching
it, it shouldn't change, should it?

A quick workaround is
mysql update T_ORDH set STATUS=2, ERSTELL_DATUM=ERSTELL_DATUM
   - where PK_ID=26272;

The big question: Is it a bug or a feature?
(mysql  Ver 11.18 Distrib 3.23.51, for pc-linux-gnu (i686))

 

 




-
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




No license to kill...

2003-02-01 Thread harm
Moi,


every now and then my otherwise happely running mysqld has a thread or two
stuck in the state 'statistics'. If I kill it with `mysqladmin kill poor
threads id` it does get registered as 'killed' (According to `mytop`). But
the thread refuses to die. They do die eventually but it can take a few
thousend seconds. I suppose it waits till the 'statistics' state
is over before it accepts its defeat.

The queries which cause this are usually nice  9 table joins. I don`t care
the take lng to execute, but it would by nice if killing them actually helped.


Any thoughts?
This is 4.0.7 but I can remember this has happend in  4.0 as well.


Thanks,

Harmen
(Excuse the subject ;)

-- 
 The Moon is New
 tty.nl - 2dehands.nl: 64837

-
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




Batch mode and stored procedures ?

2003-02-01 Thread bill
Hi all:

I am running MySQL 4.0.9 on Red Hat 7.2
Also using MyODBC to connect to a Win 2K system running a RADIUS server
(Steel Belted Radius)

I have a MySQL database that tracks usage information coming from the
RADIUS server. Everything is working, but the problem is that the RADIUS
server can only send a single SQL statement, this is not sufficient for
the  processing I need to perform.

The RADIUS server can call a SQL stored procedure and pass parameters
with each call...this is what I need.

The MySQL documentation talks about batch files, however I see no mention
of how to pass parameters to the batch file.

Can a MySQL batch file receieve input parameters? If so, how?

Or do I need to wait until stored procedures are implemented in a future
version of MySQL? (I understand this is being worked on).

Thanks in advance,
Bill Brownrigg
Project Manager
DSL Holdings, Inc.
Englewood, Colorado, USA




-
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: Replication Problems/Questions

2003-02-01 Thread Guddack Thorsten ICM MP SCM GO 21


-Ursprngliche Nachricht-
Von: Guddack Thorsten ICM MP SCM GO 21 
Gesendet: Freitag, 31. Januar 2003 20:51
An: 'Gelu Gogancea'; '[EMAIL PROTECTED]'
Betreff: Re: Replication Problems/Questions


Hi,
thank you for you're response,
but in the mysql-manual  version 4.0 they said that the Problems with load
data, load data infile have been solved.

So I'm a little bit confused about that.

Best regards


-Ursprngliche Nachricht-
Von: Gelu Gogancea [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 30. Januar 2003 20:48
An: Guddack Thorsten ICM MP SCM GO 21; [EMAIL PROTECTED]
Betreff: Re: Replication Problems/Questions


Hi,
- Original Message -
From: Guddack Thorsten ICM MP SCM GO 21 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 3:44 PM
Subject: Replication Problems/Questions


 Hi List

 I'm using 2 WinNT-Servers, Sp6 with mysql 4.0.5. max-nt.

 I ve setup a replication between these two servers as discribed in the
 manual and some small problems comes up.

 Maybe someone can give me some help.

 1.) On the Master I create a user repl with the rights 'replication
slave'.
  On the slave I used a user with all possible rights.
  Starting the replication with 'reset slave', 'change master to.'
 and 'start slave', I get an error:
  Show slave status says Slave_IO_running no and some entry in
mysql.err.

  This Problem I could solve using a user in 'change master to '
that
 has also admin rights.
  What could cause the problem?

 2.) The more important Problem:
  If the replication is running, and I try to replicate a table where
 data was inserted on the master with 'LOAD DATA INFILE...' or
 'LOAD DATA LOCAL INFILE' the server process on the slaves
 crushes
  The files on the master, for LOAD DATA.were still there.

 Any Ideas?
IMHO:
...this can happening because on the slave you don't have(...i guess) the
file for LOAD DATA.By REPLICATION the slave trying to copy every movement
of the master and not the data  itself.This means that slave trying to
execute LOAD DATA INFILE YOUR_PATH_TO_FILE .and not copy the data
from the master.



 At Last one question:
 - could anyone explain me the meaning of the fields from show slave status
 (  I'm looking for a way to decide if the slave has replicated all the
data
 from the master )

 Best regards

Best Regards,

Gelu

 [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




Re: Fulltext Index

2003-02-01 Thread R. Hannes Niedner
Thank you Paul and Diana,

I the 6 hours that passed before my message appeared on the list I rechecked
the excellent MySQL documentation and found the answer as indicated by both
of you. I just missed to look for the answer under restrictions... my fault.

Best/h


On 1/31/03 11:12 AM, Diana Soares [EMAIL PROTECTED] wrote:

 Hi, 
 
 The MATCH() column list must exactly match the column list in some
 FULLTEXT index definition for the table, unless this MATCH() is IN
 BOOLEAN MODE.
 
 from:
 http://www.mysql.com/doc/en/Fulltext_Restrictions.html
 
 
 On Thu, 2003-01-30 at 21:40, R. Hannes Niedner wrote:
 If I create a FULLTEXT index for 2 or more columns in a table will I be able
 to use it for a MATCH only against a single column (of the above) or do I
 have to create additional FULLTEXT indices for each of these columns?
 
 Thanks/h
 
On 1/31/03 10:44 AM, Paul DuBois [EMAIL PROTECTED] wrote:

 At 13:40 -0800 1/30/03, R. Hannes Niedner wrote:
 If I create a FULLTEXT index for 2 or more columns in a table will I be able
 to use it for a MATCH only against a single column (of the above) or do I
 have to create additional FULLTEXT indices for each of these columns?
 
 The latter.  When you use MATCH, there must be a FULLTEXT index
 on exactly the columns named in the MATCH.
 
 
 Thanks/h
 
 sql,query,queries,smallint
 


-
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: [OT] linux novice cannot resolve apache-php-mysql linkage 2.

2003-02-01 Thread Diana Soares
This is OT... Seems an Apache configuration problem..

You compiled apache with
 ./configure --prefix=/usr/local/apache --enable-module=so

so i think your DocumentRoot directive in httpd.conf is 
DocumentRoot /usr/local/apache/htdocs

(i'm not shure, but something like that) and that's why you didn't find
a www directory other than /var/www...
Check that. Be shure that DocumentRoot points to /var/www (or change
your test1.php to /usr/local/apache/htdocs/.)

Good luck,

On Wed, 2003-01-29 at 22:31, [EMAIL PROTECTED] wrote:
 dell 4100 256mb, 11gb hd, Redhat 8.0 grub-linux
 linux novice cannot resolve apache-php-mysql linkage.
 
 local closed system (No modem, no www access, no internet)
 
 I have tried to create a database of 7 tables with about 840mb
 of data since the 20th of November 2002.  My own db handler (.cpp's)
 will take years to code and test what the apache-php-mysql combo can do in
 hours.
 I've been able to load all mysql tables with about 30kb each of data as a
 test.
 I've made php test scripts and run them with apache server (local).
 I have n-o-t been able to run apache-php-mysql as a single application.
 
 About the 22nd of January, 2003, I started over with:
 file:/usr/local/src/httpd-2.0.44.tar.gz
 file:/usr/local/mysql-3.23.55.tar.gz
 file:/usr/local/php-4.3.0.tar.gz
 
 Using root, I entered the following commands:
 
 for apache:
 
 cd /usr/local/src
 tar -xzvf httpd-2.0.44.tar.gz
 cd httpd-2.0.44
 ./configure --prefix=/usr/local/apache --enable-module=so
 make
 make install
 
 for mysql:
 
 groupadd mysql
 useradd -g mysql mysql
 cd /usr/local
 gunzip  mysql-3.23.55.tar.gz | tar -xvf -
 ./configure --prefix=/usr/local/mysql
 make
 make install
 /scripts/mysql_install_db
 chown -R root  /usr/local/mysql
 chown -R mysql /usr/local/mysql/var
 chgrp -R mysql /usr/local/mysql
 cp support-files/my-medium.cnf /etc/my.cnf
 /usr/local/mysql/bin/safe_mysqld --user=mysql 
 mysql
 quit;
 
 for php:
 
 cd /usr/local/
 tar -xzvf php-4.3.0.tar.gz
 cd php-4.3.0
 ./configure --with-php=/usr/local/php --with-apxs2=/usr/local/apache/bin/apx
 s
 make
 make install
 
 then changed file:/usr/local/apache/conf/httpd.conf
 ServerAdmin root@localhost
 ServerName root@localhost:80
 
 then added to file:/usr/local/apache/conf/httpd.conf
 LoadModule php4_module modules/libphp4.so
 AddType application/x-httpd-php .php
 AddType application/x-httpd-php-source .phps
 then
 /usr/local/apache/bin/apachectl stop
 /usr/local/apache/bin/apachectl start
 and file:/var/www/test1.php could not be found using the browser.
 note that /var/www/test1.php is the only ?/www/? directory found.
 
 
 changed ServerName root@localhost:80
 to 127.0.0.1:80
 then
 /usr/local/apache/bin/apachectl stop
 /usr/local/apache/bin/apachectl start
 and file:/var/www/test1.php could not be found using the browser.
 
 any help or documentation pointers would be very
 much appreciated.
 
 I've installed RH at least 20 times, and will continue
 to install until I can run my personal scripts to test
 that apache-php-mysql are doing what I want. Any suggestion
 that I should (re)install should include the specific platform
 to be selected.
 
 Thanks
 
 dander
 
 cut and paste of my version of test1.php
 
 html
 head
   titlePHP Test/title
 /head
 body
   ?php echo Hello Worldp;?
 /body
 /html
 
 
 
 -
 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
 
-- 
Diana Soares


-
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: Configure prob with FreeBSD/Linuxthreads

2003-02-01 Thread Maximo Migliari
These are the last two lines in config.log

#define MACHINE_TYPE i386
configure: exit 77

Maximo.

At 01:37 PM 31-01-03 -0600, you wrote:

In the last episode (Jan 31), Maximo Migliari said:
 So, my dear friends, could we conclude that Linux is a more appropriate
 platform for running MySQL
 on a multi-processed machine?

 I was desperate to try and compile MySQL 4.0.9-gamma on my FreeBSD
 4.7-stable machine, which is
 dual processed.   I managed to compile fine once, but it gave errors when
 executing the deamon.

 I found some instructions for compiling MySQL with linuxthreads on FreeBSD
 4.x from one
 Jeremy Zawodny, at the website:
 http://jeremy.zawodny.com/blog/archives/000458.html

 However, my machine complains right at the begining of the configure run
 that:
 ...
 checking for gcc... cc
 checking for C compiler default output... configure: error: C compiler 
cannot create executables

What's at the bottom of config.log?

--
Dan Nelson
[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: Re: Writing a database program in GNU C++ using MySQL.

2003-02-01 Thread Benjamin Pflugmann
Hi.

Accessing MySQL is equally easy in any of the languages (C++, Perl,
PHP, Java). So if that is the main point and it's correct that you,
Prabu, are already comfortable with C++, stick with it.

A reason a lot of people use Perl, PHP or Java is that many use MySQL
in conjunction with web pages and these languages come with built-in
support or ready packages for writing CGI for creating web pages.

So if you do not write CGIs - and it doesn't sound like this - or you
already have appropriate C++ libs for CGI and templates, then the
question of which, C++ or Perl is better, boils down to a simple
language comparison.

In other words, since MySQL is easily accessible in both, put that
point out of the requirements list and decide on the remaining
factors, whatever they may be for you.

HTH,

Benjamin.



On Thu 2003-01-30 at 14:51:08 -0500, [EMAIL PROTECTED] wrote:
 
 Accessing a DB via Java is very easy as well.. IMHO PHP and the like
 scripts are over rated.  You'll have much more flexibility with
 Java.  (If you don't have to worry about firewalls...)  Since it
 sounds like you a C++ person you'll pick up on Java quickly, if you
 don't know it already.
 
 If you have to worry about a firewall then you can still use Java
 with Servlets but there will be an added learning curve.  In that
 case your probably better off using PHP/JSP, etc
 
  
  From: Kamara Eric R-M [EMAIL PROTECTED]
  Date: 2003/01/30 Thu AM 07:34:58 EST
  To: Prabu Subroto [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED] [EMAIL PROTECTED]
  Subject: Re: Writing a database program in GNU C++ using MySQL.
  
  Hi Prabu,
  
  From my own experience I'd say that PHP is the best option since it can be
  compiled with MySQL support and you will find that accessing the database
  is very easy.
  
  Regards,
  Eric
  
  On Wed, 29 Jan 2003, Prabu Subroto wrote:
  
   Dear my friends,
  
   My boss wants a database application running on linux
   machine without XWindows.
  
   Is it easy to make the connection to MySQL with GNU
   C++ .
  
   Is perl better then GNU C++ in this case?
  
   How is Jave ?
  
   TAC.
[...]

-- 
[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




SQL Syntax (JOINS) Help

2003-02-01 Thread Kevin Smith
Hi All,

 Can anyone help me get this query working in MySQL, this was created using
 Access, but it doesn't port well for MySQL syntax:

 SELECT basket.id,
 products.part_code,
 products.product_type,
 products.description,
 product_options_1.options,
 basket.price, basket.quantity,
 basket.price*basket.quantity AS total
 FROM (products LEFT JOIN product_options ON
 products.prod_id=product_options.prod_id)
 RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN (basket_header
 INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON
 product_options_1.po_id=basket.op_id) ON products.prod_id=basket.prod_id
 GROUP BY basket.id, products.part_code, products.product_type,
 products.description, product_options_1.options, basket.price,
 basket.quantity, basket.price*basket.quantity, basket_header.basket_id,
 products.options
 HAVING (((basket_header.basket_id)=4));

 Here is the error message MySQL reports:

 ERROR 1064: You have an error in your SQL syntax near '(product_options AS
 product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9

 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct
 syntax?

Just give you a better idea, here is a graphical schema of the query from MS
Access.

http://www.netsmith.ltd.uk/example.gif

 Thanks,

 Kevin


-
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: sql CSV import

2003-02-01 Thread Sherzod Ruzmetov
I normally do not use PHPMyAdmin. But when I had to do that once
on a client's sites (he didn't have shell access to a shared server ),
i had a similar problem. I couldn't import its own dump.

I believe it was a bug, and should've been resolved in later versions of
PHPMyAdmin. Try to update.

Sherzod

: -Original Message-
: From: Dobromir Velev [mailto:[EMAIL PROTECTED]]
:
: You van use the LOAD DATA INFILE statement
:
: Check this
: http://www.mysql.com/doc/en/LOAD_DATA.html
:
: for more information
:
: HTH
: Dobromir Velev
: [EMAIL PROTECTED]
: www.websitepulse.com
:
:
: - Original Message -
: From: Andrew [EMAIL PROTECTED]
: To: [EMAIL PROTECTED]
: Sent: Thursday, January 30, 2003 12:48
: Subject: RE: sql CSV import
:
:
: 
:  Hi all I am trying to import a csv file from MySQL and keep
: getting an
: error on
:  line one.
:  Is there an alternative way to import a csv file other than using
: phpmyadmin?
: 
:  I exported the file from MySQL but can't import it back in,
: any ideas?
: 
:  Andrew
: 
: 
: 
: 
: 
: 
: -
:  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




test mysql

2003-02-01 Thread Kevin Smith
Sorry guys/gals, just a test for the mysql list.

sql


-
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: How to update the database through an applet?

2003-02-01 Thread Benjamin Pflugmann
Hi.

I am sorry, I am not able to follow you. Maybe you should describe in
more detail what components are involved and what you want to
archieve. (If you simply want to store information you get from a
device, I don't understand where the database related problem is -
just store the data as you would with any other. If it is not this, I
am not able to extract this from the description).

Regards,

Benjamin.



On Thu 2003-01-30 at 19:36:35 -0800, [EMAIL PROTECTED] wrote:

 PHP works fine to update a mysql database on the server.  But I
 would like to access a device connected to the serial port or a USB
 port on the client computer through an applet and store this
 information in the database on the server.  I have tried to find an
 example of such a transaction on the net, unsuccessfully.  Has
 anybody out there experiences with this kind of problem?  It could
 be any solution, such as PHP + javascript, or PHP all by itself.  Is
 there a good publication talking about this issue?  Thank you Mario

-- 
[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




Replication Questions 2

2003-02-01 Thread Guddack Thorsten ICM MP SCM GO 21
Hi List,

again some Questions to replication in mysql:

I test the replication with following setup:

1 Server in Europe as the master, 2 servers in Asia and south america as
slaves.

Both slaves does the replication very fine. 
Every insert, update or delete is replicated very fine, even with binary
data in blob stored.
But If I try to stop the slaves
with stop slave
it takes a very long time until the shell comes back?
Any ideas about that?

Next Questions:
The connection to asia is very slow. Is there a chance to find out when the
slave has all the data replicated?

Thanks

thorsten guddack



-
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: What is faster?..

2003-02-01 Thread Sherzod Ruzmetov
: The fastest way would be to use C.
: But the reason for using a DB would be.
: 1. Access to data. You could use PhPMyAdmin or some thing you
: put together
: to update the policy so making managing the data easy (possibly so non
: tickers should make changes).
: 2. If the data you are getting needs to be retrieved relationally.
:

It depends on the complexity of the policy too. If its has several
sections, and each section needs to stand out, you will either have
to use some markup (doesn't have to be HTML) to tell those sections apart,
or store each section as a different raw of a table using a little more
complex
DB design. This also requires a little more complex SQL query to retrive
them.

I would probably use some minimum markup to mark the sections, and store
the whole policy in a single cell.

Good luck

Sherzod




-
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 Test

2003-02-01 Thread Kevin Smith
Just a test for the MySQL list.

sql


-
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: Question about Table_Options

2003-02-01 Thread Sherzod Ruzmetov
: When creating a table can you use multiple Table_Options?
: 
: The O'Reilly Managing  Using MySQL show on page 288 a 
: table been created 
: with two options ...)AUTO_INCREMENT = 1, TYPE=InnoDB;


No commas used to seperate multiple options. Here is an example I just
tried out, and I am afraid your book may be wrong ;-)

mysql SELECT VERSION();
+---+
| VERSION() |
+---+
| 3.23.54   |
+---+

mysql CREATE TABLE test (
- id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY)
- TYPE=MyISAM AUTO_INCREMENT=10;

mysql INSERT INTo test SET id=NULL;

mysql SELECT * FROM test;
++
| id |
++
| 10 |
++


Good luck

Sherzod


-
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: Question about Table_Options

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 10:39:13 +, [EMAIL PROTECTED] wrote:
 Hi
 
 When creating a table can you use multiple Table_Options?

Yes. How about simply trying out beforehand?

 The O'Reilly Managing  Using MySQL show on page 288 a table been created 
 with two options ...)AUTO_INCREMENT = 1, TYPE=InnoDB;
 
 But the MySQL manual says or:-
 table_options:
   TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
 orAUTO_INCREMENT = #
 .

As it does for create_definition, but that does not mean that you
can only define either a column or a key. The fact that matters is
that one is presented as a list [(create_definition,...)] in the
CREATE TABLE statement, the other is not.

So, yes, the manual is incomplete (especially, because it gives no
indication that you have to seperate the options by comma).

HTH,

Benjamin.


-- 
[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: MySql, PHP and Javascript

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 08:27:11 +, [EMAIL PROTECTED] wrote:
 
 Is it possible to mix javascript and PHP in the same script??

Of course. One (PHP) is run on the server side in order to create a
page which is sent to the client (here: the browser). The other
(Javascript) may be contained in that page and is executed on the
client side. So if you want to use Javascript, you have to write your
PHP pages in a way that they output the needed Javascript. Which
should be easy, if you kept your algorithms and HTML kind of seperated
in PHP.

HTH,

Benjamin.


PS. If you completly mixed printing the HTML into the algorithms, then
it isn't going to be easy, but no change to the HTML would be - so you
didn't do that, right?

 I have a number of web based apps written in PHP/MySql and while they 
 are functionally pretty good they are aesthetically garbage. I'll like 
 to pretty up the interfaces with rollovers etc, but haven't got time to 
 learn JS properly especially if I have to completly re-write the 
 functionality.
[...]

-- 
[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: binary log not recording 4.0.9

2003-02-01 Thread sam
I am not doing that - so maybe that is why I am confused
by your response - sorry.  I am new to mysql so bear with
with

I created a table in the test db called test.  I logged into the
server using db mysql and inserted a record into test.test
and the insert is present in the linux-bin.001 log file.

Is this what you meant.

Thanks
sam

- Original Message -
From: gerald_clark [EMAIL PROTECTED]
To: sam [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 2:40 PM
Subject: Re: binary log not recording 4.0.9


 You can connect to database1, then  update database2.table set
field=value.
 The database being updated is then not the database that was opened.
 Under these conditions, the updates to database2 are not logged.

 sam wrote:

 Hi Gerald,
 
 I do not know what you mean by opening one database?  Medic is a
 database.  Are saying that two database are involved?
 And , why would updates be excluded.  I read the documentation
 about replication and did not see anything about updates not occurring
 under certain situations.
 
 
 





-
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




how to change mysql root password

2003-02-01 Thread Jianping Zhu

How to change mysql root password in redhat 7.3 ?

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




Re: mysql.sock is missing - Please....

2003-02-01 Thread Diana Soares
  Hi, I'm getting the same error message. mysql here is in /etc/rc.d/init.d,
  don't ask me why, I'm new to this things.

That's because the rpm installation puts there a file mysql to be
easier to configure starting services 
If you want mysql to start everytime your machine reboots, have a look
at, for example chkconfig command or:
http://www.mysql.com/doc/en/Automatic_start.html

If you have /etc/rc.d/init.d/mysql i guess you can try the following:

First be shure that mysqld is running (with ps auxw | grep mysql or
netstat -ta | grep mysql...). You may also stop the server with 
/etc/rc.d/init.d/mysql stop

Start the server:
/etc/rc.d/init.d/mysql start

If it gives errors about creating/writing mysql.sock, check the
permissions/ownership of directory /var/lib/mysql.. Check the manual for
the right permissions...

Good luck,

On Tue, 2003-01-28 at 00:38, Pedro Leite wrote:
 Any help from good samaritans? I have no idea to solve this mess!
 
 TIA
 - Original Message -
 From: Pedro Leite [EMAIL PROTECTED]
 To: TdA [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, January 27, 2003 10:23 AM
 Subject: Re: mysql.sock is missing
 
 
  Hi, I'm getting the same error message. mysql here is in /etc/rc.d/init.d,
  don't ask me why, I'm new to this things.
 
  Any more help would be much appreciated.
  TIA
  - Original Message -
  From: TdA [EMAIL PROTECTED]
  To: Pedro Leite [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Monday, January 27, 2003 7:45 AM
  Subject: Re: mysql.sock is missing
 
 
   There are a couple of things you can try, first make sure your process
 is
   started. /etc/rc.d/ mysql start should do the trick.
   TDA
   - Original Message -
   From: Pedro Leite [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Sunday, January 26, 2003 11:04 PM
   Subject: mysql.sock is missing
  
  
Hi,
   
I'm staring mysql with  mysql -u root mysql but I'm geting this error
message: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'. I cannot find Mysql.sock anywhere, but I
  was
running mysql before reboot the linux sytem. What can I do to
recover/reinstall/run the mysql server again? I didn't find
  mysql.server,
but I do have mysql.server* on dir /usr/share/mysql. I'm running
  Mandrake
   9
and Mysql-323.54a (rpm).
   
Thank you in advance
Pedro
   
-- 
Diana Soares


-
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: 4.1 binaries

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 10:05:40 +0100, [EMAIL PROTECTED] wrote:
 any further news about 4.1 binaries release date?

Why the eagerness? 4.1 will be alpha. If you are going to use it
seriously (in your development), you want to compile it yourself
anyhow, because you will have to recompile it in order to incorporate
any fixes for bugs (which hopefully you reported), long before the
next release is available.

If not, you are only playing around and a few days should not matter.

That said, considering the press release is 10 days old, I would have
expected to see binaries already. OTOH, it's the first 4.1 release, so
it's hard to say which problems they may encounter.

HTH,

Benjamin.

-- 
[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




MySQL dies when connecting via TCP/IP

2003-02-01 Thread Michael Skaastrup
I get this message in mysqld.log when trying to access the server via
TCP/IP.
When using sockets it works fine.

Regards
 Michael Skaastrup





-
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 field is updated unintentionally

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 12:17:42 +0100, [EMAIL PROTECTED] wrote:
 
 I was already questioning my sanity, but the problem below is
 reproduceable:
 
[...]
 If I do
 mysql update T_ORDH set STATUS=2 where PK_ID=26272;
 ERSTELL_DATUM is set to the current date. I know that a timestamp
 takes the current time, if set it to NULL, but since I'm not touching
 it, it shouldn't change, should it?
[...]
 The big question: Is it a bug or a feature?

A feature, it is described in detail in the section that explains the
TIMESTAMP column type: http://www.mysql.com/doc/en/DATETIME.html

If you don't want that behaviour, use DATETIME with NOW() instead.

HTH,

Benjamin.

-- 
[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: Question about Table_Options

2003-02-01 Thread Paul DuBois
At 8:12 + 1/31/03, Jonathan Bedford wrote:

Hi

When creating a table can you use multiple Table_Options?

The O'Reilly Managing  Using MySQL show on page 288 a table been created
with two options ...)AUTO_INCREMENT = 1, TYPE=InnoDB;


The comma should be omitted.  You can specify multiple table options, but
you simply list them one after the other, separated by whitespace.


...) AUTO_INCREMENT = 1 TYPE = InnoDB;

(Note that this particular combination of options is a little strange.
You cannot set the initial AUTO_INCREMENT value explicitly for an InnoDB
table.  The initial value will be 1, but then there is little need for
the AUTO_INCREMENT option in the example.)



But the MySQL manual says or:-

table_options:
	TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
or	AUTO_INCREMENT = #
.

Thanks
  Jonathan



-
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 your JDBC driver - mysql connector.

2003-02-01 Thread Mufaddal
PROBLEM with your JDBC driver - mysql connector.

I am developing using jdk1.4.1 on Mac OS X. I am using the mysql
driver - mysql connector java 2.0.14. I am creating a table in  
mysql
thru java ... the code to do this is below:

try
{
Statement stmt = con.createStatement();

stmt.executeUpdate( CREATE TABLE PARTICIPANT (
+
LOGINID		INTEGER NOT NULL, 
+
USERNAME	VARCHAR (20) NOT NULL,   	+
PASSWORD		VARCHAR (20) NOT NULL, 
+
FIRSTNAME		VARCHAR (20) NOT NULL, 
+
LASTNAME		VARCHAR (20) NOT NULL,
+
EMAILADD		VARCHAR (20) NOT NULL,
+	
ORGANIZATION	VARCHAR (20) NOT NULL,		+
ENABLED		BIT NOT NULL,
+
GRADELEVELS	VARCHAR (80),			+
PRIMARY KEY( LOGINID )
+
));

stmt.close();
}
catch(SQLException ex)
{
ex.printStackTrace();
}

The table gets created properly. I check this from the mysql  
prompt.


Now i insert 2 records in the table above thru my java code . The
code
that does that is below:

try
{
Statement stmt = con.createStatement();

PreparedStatement pstmt = con.prepareStatement(INSERT
INTO PARTICIPANT VALUES
  +
(?,?,?,?,?,?,?,?,?));
pstmt.setInt(1, p.getLoginId());
pstmt.setString(2, p.getUserName());
pstmt.setString(3, p.getPassword());
pstmt.setString(4, p.getFirstName());
pstmt.setString(5, p.getLastName());
pstmt.setString(6, p.getEmailAdd());
pstmt.setString(7, p.getOrganizationName());
pstmt.setBoolean(8, p.isEnabled());
pstmt.setString(9, (new
DataTypeConverter()).getString(p.getGradeLevels()));

pstmt.executeUpdate();

pstmt.close();

}
catch(SQLException ex)
{
ex.printStackTrace();
}

For both the above sniplets of code i am using a connection object
from a pool of connections that i create to the database at start  
of
application startup. These connections are closed when the
application
exits.

PROBLEM:

The records get inserted in a blank table when i use my java code  
to
do so. When i delete a record from the table from the mysql prompt  
 and
then go back to my java code to insert the same record it gives me
the following error:

java.sql.SQLException: Invalid argument value: Duplicate entry '1'  
for
key 1
at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
at com.mysql.jdbc.Connection.execSQL(Unknown Source)
at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown
Source)
at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown
Source)
at

com.wavesinmotion.cw.classes.db.DBWriter.setParticipant(DBWriter.java:8 
5
)
at
com.wavesinmotion.cw.classes.db.DBWriter.main(DBWriter.java:36)

This i dont understand since the record with that primary key i  
have
already deleted from the mysql prompt.

When i try to enter a record with the same key using the mysql
prompt
the record successfully gets inserted into the table;

I suspect a bug in your jdbc driver .. .whats the solution or fix  
to
this ?

regards,
Mufaddal.


-
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: partitionong MyISAM tables??

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 04:36:05AM -0700, Prasanth Krishna wrote:
 Is there any way to partition MyISAM tables in mysql? i have a huge
 table and want to partition it. 

  Good Day Prasanth,

  The MERGE table handler allows multiple MyISAM tables with identical
  structure (but different data) to be presented as a single database.

  This is similar to range partitioning.

  Visit http://www.mysql.com/doc/en/MERGE.html for more information.

 Do InnoDB tables support partitioning?
 thanks.

  AFAIK InnoDB does not support partitioning.

-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Developing Dynamic Web Applications with MySQL and PHP
  MySQL Training: Nuernburg, June 02-06, 2003
  Visit http://mysql.com/training for more information

Debian: Yep, that's GNU/Linux (http://debian.org)

-
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: timing

2003-02-01 Thread David Brodbeck
Have you checked for network problems?  You might try FTPing a file to and
from the production server, or something similar, just to rule this out.

I've had slowness problems with various apps that were driving me *nuts*
until I found a network issue causing them.  In a few cases I had a duplex
mismatch -- an ethernet card set to full duplex connected to a half-duplex
hub/switch, or vice versa.  This results in a connection that appears fine
when you ping and works great under light traffic, but bogs down with
massive numbers of collisions as soon as you do anything that involves
moving lots of data.  The collisions may not show up in the statistics since
the end that's set to full duplex won't notice them.  Letting the card
auto-detect the duplex setting does *not* always work right...

This is a subtle, easy trap to fall into.  Easy enough that I've done it
multiple times. ;)

 -Original Message-
 From: Mary Stickney [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 30, 2003 9:08 AM
 To: [EMAIL PROTECTED]
 Subject: timing
 
 
 
 I have 2 Crystal Reports 8.5 (for the record I didn't make 
 these reports)
 that draw straight from the MYSQL
 database. They use only 1 table. I am calling them to print 
 from VB 6.0
 Theses reports have lots of complex calculations in them, 
 counts , sums and
 groups.
 
 My test server has the same code , same database , same indexes , same
 amount of memory as the Production server,
 My test server has MYSQL 3.23.51 and MYODBC 3.51 , and I have Crystal
 installed on my test server.
 
 The Production server has MYSQL 3.23 and an older version of 
 MYODBC then I
 have.
 No Crystal Reports installed. And the server is a faster 
 machine then mine.
 
 
 They run in 8 minutes on my test server , about 4 minutes 
 each. Printing to
 a PDF driver.
 
 On the Production Server they take HOURS to run and print.
 
 Any ideas...
 
 
 
 
 Mary Stickney
 TAG-TMI
 Data Warehouse Programmer
 402-474-7612 x 3099
 [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




RE: timing

2003-02-01 Thread Mary Stickney

It doesn't run over the network.
The reports are requested from a website , and a record is inserted into the
ReportQueue.
And then the reports are run local on the Production machine and then
emailed to the recipient.

At this time only 2 people order reports.



Mary Stickney
TAG-TMI
Data Warehouse Programmer
402-474-7612 x 3099
[EMAIL PROTECTED]

-Original Message-
From: David Brodbeck [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 3:09 PM
To: 'Mary Stickney'; [EMAIL PROTECTED]
Subject: RE: timing


Have you checked for network problems?  You might try FTPing a file to and
from the production server, or something similar, just to rule this out.

I've had slowness problems with various apps that were driving me *nuts*
until I found a network issue causing them.  In a few cases I had a duplex
mismatch -- an ethernet card set to full duplex connected to a half-duplex
hub/switch, or vice versa.  This results in a connection that appears fine
when you ping and works great under light traffic, but bogs down with
massive numbers of collisions as soon as you do anything that involves
moving lots of data.  The collisions may not show up in the statistics since
the end that's set to full duplex won't notice them.  Letting the card
auto-detect the duplex setting does *not* always work right...

This is a subtle, easy trap to fall into.  Easy enough that I've done it
multiple times. ;)

 -Original Message-
 From: Mary Stickney [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 30, 2003 9:08 AM
 To: [EMAIL PROTECTED]
 Subject: timing



 I have 2 Crystal Reports 8.5 (for the record I didn't make
 these reports)
 that draw straight from the MYSQL
 database. They use only 1 table. I am calling them to print
 from VB 6.0
 Theses reports have lots of complex calculations in them,
 counts , sums and
 groups.

 My test server has the same code , same database , same indexes , same
 amount of memory as the Production server,
 My test server has MYSQL 3.23.51 and MYODBC 3.51 , and I have Crystal
 installed on my test server.

 The Production server has MYSQL 3.23 and an older version of
 MYODBC then I
 have.
 No Crystal Reports installed. And the server is a faster
 machine then mine.


 They run in 8 minutes on my test server , about 4 minutes
 each. Printing to
 a PDF driver.

 On the Production Server they take HOURS to run and print.

 Any ideas...




 Mary Stickney
 TAG-TMI
 Data Warehouse Programmer
 402-474-7612 x 3099
 [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




Re: Newbie Q: Booleans??

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 10:16:05PM +1030, David Hefford wrote:
 Have used many databases but am just getting into MySQL and am totally rapt
 about it :) I am writing a front end in realBasic that needs to be able to
 run on various backends, MySQL being the main one. All of the others have a
 boolean type of column. What is the general practice to ?mimic? a BOOLEAN
 field in MySQL? PS: I do not need NULL or date for example, I just need true
 or false, yes or no etc...

  Hello David,

  Column types BIT/BOOL are available. (However, they are mappings to
  TINYINT(1). :)

  Perhaps check the list archives - this question has been asked in the
  past as well. IIRC, there are discussions on whether or not it should
  be implemented.

  Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

MySQL Tip: Use your favorite editor to edit queries within the mysql client
  mysql \e

While we are postponing, life speeds by.--Lucius Annaeus Seneca

-
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: Configure prob with FreeBSD/Linuxthreads

2003-02-01 Thread Maximo Migliari
OK, here goes the whole thing:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.53.  Invocation command line was

  $ ./configure --with-mit-threads=no --with-comment=Yahoo SMP 
--enable-assembler --with-innodb 
--with-named-thread-libs=-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R\
-D_THREAD_SAFE -DHAVE_BROKEN_REALPATH\
-I/usr/local/include/pthread/linuxthreads -L/usr/local/lib   \
-llthread -llgcc_r --prefix=/usr/local/mysql --enable-thread-safe-client 
--with-server-suffix=-Yahoo-SMP --with-libwrap --with-raid 
--with-extra-charsets=complex

## - ##
## Platform. ##
## - ##

hostname = server1.cheathouse.com
uname -m = i386
uname -r = 4.7-STABLE
uname -s = FreeBSD
uname -v = FreeBSD 4.7-STABLE #2: Wed Dec 18 15:50:46 EST 
2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/CHEATHOUSE

/usr/bin/uname -p = i386
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
hostinfo   = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /usr/local/mysql/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/X11R6/bin


## --- ##
## Core tests. ##
## --- ##

configure:1482: checking build system type
configure:1500: result: i386-unknown-freebsd4.7
configure:1510: checking host system type
configure:1524: result: i386-unknown-freebsd4.7
configure:1534: checking target system type
configure:1548: result: i386-unknown-freebsd4.7
configure:1578: checking for a BSD-compatible install
configure:1632: result: /usr/bin/install -c
configure:1643: checking whether build environment is sane
configure:1661: result: yes
configure:1695: checking for gawk
configure:1724: result: no
configure:1695: checking for mawk
configure:1724: result: no
configure:1695: checking for nawk
configure:1711: found /usr/bin/nawk
configure:1721: result: nawk
configure:1731: checking whether make sets ${MAKE}
configure:1751: result: yes
configure:1952: checking whether to enable maintainer-specific portions of 
Makefiles
configure:1961: result: no
configure:1976: checking whether build environment is sane
configure:1994: result: yes
configure:1997: checking whether make sets ${MAKE}
configure:2017: result: yes
configure:2067: checking for gawk
configure:2093: result: nawk
configure:2149: checking for gcc
configure:2175: result: cc
configure:2175: result: cc
configure:2419: checking for C compiler version
configure:2422: cc --version /dev/null 5
2.95.4
configure:2425: $? = 0
configure:2427: cc -v /dev/null 5
Using builtin specs.
gcc version 2.95.4 20020320 [FreeBSD]
configure:2430: $? = 0
configure:2432: cc -V /dev/null 5
cc: argument to `-V' is missing
configure:2435: $? = 1
configure:2461: checking for C compiler default output
configure:2464: cc -O -pipe -march=pentiumpro -D__USE_UNIX98\
-D_REENTRANT -D_THREAD_SAFE -DHAVE_BROKEN_REALPATH   \
-I/usr/local/include/pthread/linuxthreadsconftest.c  5
cc: \: No such file or directory
cc: \: No such file or directory
configure:2467: $? = 1
configure: failed program was:
#line 2438 configure
#include confdefs.h

#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
 extern C
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

  ;
  return 0;
}
configure:2494: error: C compiler cannot create executables

##  ##
## Cache variables. ##
##  ##

ac_cv_build=i386-unknown-freebsd4.7
ac_cv_build_alias=i386-unknown-freebsd4.7
ac_cv_env_CC_set=set
ac_cv_env_CC_value=cc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O -pipe -march=pentiumpro 
-D__USE_UNIX98\
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-O -pipe -march=pentiumpro   \
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=cc
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i386-unknown-freebsd4.7
ac_cv_host_alias=i386-unknown-freebsd4.7
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=nawk
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_make_make_set=yes
ac_cv_target=i386-unknown-freebsd4.7
ac_cv_target_alias=i386-unknown-freebsd4.7
lt_cv_sys_path_separator=:

## --- ##
## confdefs.h. ##
## --- ##

#define PACKAGE_NAME 
#define PACKAGE_TARNAME 
#define PACKAGE_VERSION 
#define PACKAGE_STRING 
#define PACKAGE_BUGREPORT 
#define PACKAGE mysql
#define VERSION 4.0.9-gamma
#define PROTOCOL_VERSION 10
#define DOT_FRM_VERSION 6
#define SYSTEM_TYPE unknown-freebsd4.7
#define 

Re: Configure prob with FreeBSD/Linuxthreads

2003-02-01 Thread Dan Nelson
In the last episode (Jan 31), Maximo Migliari said:
 OK, here goes the whole thing:
 
 configure:2461: checking for C compiler default output
 configure:2464: cc -O -pipe -march=pentiumpro -D__USE_UNIX98
 \
 -D_REENTRANT -D_THREAD_SAFE -DHAVE_BROKEN_REALPATH   \
 -I/usr/local/include/pthread/linuxthreadsconftest.c  5
 cc: \: No such file or directory
 cc: \: No such file or directory
 configure:2467: $? = 1

Get rid of the backslashes.

-- 
Dan Nelson
[EMAIL PROTECTED]
sql table

-
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: creating update files

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 12:32:51 +0100, [EMAIL PROTECTED] wrote:
 Hi there, I have a little question for you in the mysql community..
 
 I was wondering how persons in this community handles changes to the
 database when your application that uses the database needs some new
 tables, columns, etc...

I think this always depends on your use case, but since you wanted to
know how we handle this...

 Do you have an application with a sort of upgrade functionallity that
 when started checks the database for incosistency and when it finds some
 updates the database? (ie compares the structure of the table in the
 database to some template stored in the application or as
 datafiles/scripts)
 
 Or do you use some version system where the application instead of
 looking for inconsistency just look at the version number of the
 database, compares it to some internal version, and updates the database
 accordingly? (ie manually creating all the needed updatescripts that
 needs to run the application and have the application select between these)
 
 Or perhaps you do this update of the database manually when intalling a
 new version?

Effectively that is what I do. Using the development database, I write
the application and change the database accordingly (and save the
statements I use for this). When the program is ready, I write a
script with the SQL commands needed to update the database to the new
version (most times that involves only slightly correcting the
statements I saved beforehand) and test that it results indeed in the
wanted table structure. Then I take both, the new program and the SQL
script and install them in parallel on the production machine.

 For me, version 1 would be preferable, but unfourtunally this does not
 work in every scenario, but i guess that it normally could take care of
 about 90% off all my changes...  the second system would be able to take
 care of all type of changes, but it requires more labour...

Huh? I am not sure why you think #2 is more work. I think an
application which tries to make consistency checks and do the correct
SQL statements (#1) is much more complex than one that simply executes
some script based on a version number (#2). Especially since you
probably already have those SQL scripts as side product of your
testing (if you are using a GUI, I sincerly hope it is able to log the
commands it executes for you. Or use the update log of MySQL).

IMHO, the real (potential) drawback of #2 is that it relies on the
version number being correct and therefore fragile against change.
E.g. my experience shows that emergencies sometimes require to make
changes by hand, which invalidates the version, and it being an
emergency, the change is high that the version is not changed
accordingly. So I think that #1 has the advantage of being adaptive
while being a lot of work.

I am also not sure, why you think that #1 would be only able to handle
90% of the cases, theoretically it can dump the whole database
structure to find out about types and whatever. Hm. Maybe that's why
you don't think it is much work - only concentrating on the common
cases?

 so, how do you all manage this?

I don't use the first two solutions, because I am around when I do
updates anyhow (and I wouldn't want the application to change the
production system significantly when I am not around), so I prefer
doing the version check myself. Maybe that is, because I only have a
handful of machines to take care of.

If I had to roll out changes to several hundreds of machines (possibly
clients) and couldn't be sure which version is running, I would use a
of variation of #2: write a little script additionally to the SQL
update-script, which makes a SQL dump of the existing database
structure, compares (maybe via MD5 sum to safe space) that with one
that I made on the test system and bails out, if they differ.

That can be made to work with several versions. In other words, it
would not check a version number saved in the database, but determine
the version by the database structure itself.

That would give #2 with the assurance that an update script is only
run, if the database structure is as expected, no matter happened to
the database in-between (it is fascinating what clients can do to
files they are not supposed to even know about ;-).

HTH,

Benjamin.

-- 
[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




mysqldump issue (table named group)

2003-02-01 Thread btallman
Description:
One of our customers had a table named group, admitedly a bad design
but still not something that should cause mysqldump to fail hard!
How-To-Repeat:
Name a table group and run mysqldump, even with --opt
Fix:
Quick workaround is to rename the table, but actually, mysqldump should
surround columns and tables with `` marks when creating sql code

Submitter-Id:  submitter ID
Originator:root
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.54 (Source distribution)

Environment:

System: Linux x.com 2.4.18-19.7.x #1 Thu Dec 12 09:00:42 EST 2002 i686 
unknown
Architecture: i686

Some paths:  /usr/local/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.3 2.96-113)
Compilation info: CC='gcc'  CFLAGS='-O2 -march=i386 -mcpu=i686 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'  CXX='gcc'  CXXFLAGS='-O2 -march=i386 
-mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-rtti 
-fno-exceptions'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Nov 18 21:03 /lib/libc.so.6 - libc-2.2.5.so
-rwxr-xr-x1 root root  1260480 Oct 10 10:16 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2312442 Oct 10 09:51 /usr/lib/libc.a
-rw-r--r--1 root root  178 Oct 10 09:46 /usr/lib/libc.so
lrwxrwxrwx1 root root   10 Jan  6 20:45 /usr/lib/libc-client.a - 
c-client.a
Configure command: ./configure '--prefix=/usr' '--exec-prefix=/usr' 
'--bindir=/usr/bin' '--datadir=/usr/share' '--libdir=/usr/lib' 
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--without-debug' 
'--without-readline' '--enable-shared' '--with-extra-charsets=complex' '--with-bench' 
'--localstatedir=/var/lib/mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' 
'--with-mysqld-user=mysql' '--with-extra-charsets=all' '--with-innodb' 
'--with-berkeley-db' '--enable-large-files=yes' '--enable-largefile=yes' 
'--with-thread-safe-client' '--enable-assembler' 'CFLAGS=-O2 -march=i386 -mcpu=i686 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' 'CXXFLAGS=-O2 -march=i386 
-mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-rtti 
-fno-exceptions' 'CXX=gcc'


-
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: partitionong MyISAM tables??

2003-02-01 Thread Stefan Hinz, iConnect \(Berlin\)
Prasanth,

 Is there any way to partition MyISAM tables in mysql? i have a huge
 table and want to partition it.

An easy way to slice it into chunk would be:

CREATE TABLE tblPart_1 SELECT * FROM tblFull LIMIT 0,1000;
CREATE TABLE tblPart_2 SELECT * FROM tblFull LIMIT 1000,1000;
CREATE TABLE tblPart_3 SELECT * FROM tblFull LIMIT 2000,1000;
etc.

With InnoDB tables, you can do exactly the same.

If you need the tables to look like one big table later on you can use
the MERGE table format (if your tblPart_* are MyISAM tables).

CREATE TABLE tblFullMerge (col1 ..., col2 ..., ...) TYPE=MERGE
UNION(tblPart_1,tblPart2,...);

With InnoDB, you cannot use MERGE tables.

I don't know if that's what you want.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Prasanth Krishna [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 12:36 PM
Subject: partitionong MyISAM tables??


 Is there any way to partition MyISAM tables in mysql? i have a huge
 table and want to partition it.
 Do InnoDB tables support partitioning?
 thanks.
 Prasanth

 -
 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: User Accounts...

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 10:55:18AM -0300, Alejandro C. Garrammone wrote:
 How can I create different user accounts for a table?. (I've just installed
 the MySQL, and the root just don't have a password yet..how can assign one?

  Hey Alex,

  Check out the user account management section of the manual:
  http://www.mysql.com/doc/en/User_Account_Management.html

  Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Using and Managing MySQL
  MySQL Training: Toronto, March 24-28, 2003
  Visit http://mysql.com/training for more information

My punctuality is well known. When the revolution takes place, I'll be late
and I'll be shot as a traitor.
--Traitor by the SugarCubes

-
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: 4.1 binaries

2003-02-01 Thread Heikki Tuuri
Natale,

- Original Message - 
From: Natale Babbo [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Friday, January 31, 2003 5:10 PM
Subject: 4.1 binaries


 any further news about 4.1 binaries release date?

Lenz has now completed the build of 4.0.10.

I do not know, but 4.1.0 might the the next in line.

 TIA

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com

sql query




-
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 : Dropping foreing key without losing data

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 08:46:53AM +0100, Webmaster LLBfrance wrote:
 Hello Zak,
 
 Thanks for your response.
 I try the way you told me, but it seems there is
 another problem :
 The old foreign keys always exist.
 In consequence, there are double references.
 
 How can i resolve that problem ?

 Ah... e... let me do some testing. In the past, simply running
 alter table would drop the foreign keys.  Now that things are
 different, I will have to see what works (or ask Heikki about it)

 Cheers!

-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

MySQL Tip: Show the configuration options set in the server
  % mysqld --print-defaults

Sincere Choice: Supporting a Fair Software Market (http://sincerechoice.org)

-
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: Question about Table_Options

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 10:39:13AM +, Jonathan Bedford wrote:
 Hi
 
 When creating a table can you use multiple Table_Options?

  Heh. Why not just try it? :)

 The O'Reilly Managing  Using MySQL show on page 288 a table been created 
 with two options ...)AUTO_INCREMENT = 1, TYPE=InnoDB;

  No comma is needed.

 
 But the MySQL manual says or:-
 
 table_options:
   TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
 orAUTO_INCREMENT = #
 .

  Hrm. It does not look like we explicitly state that you can use
  multiple options anywhere on the CREATE TABLE page in the manual.

  I will ask our documentation team to fix it.

  Thanks!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Using and Managing MySQL
  MySQL Training: Stuttgart, May 19-23, 2003
  Visit http://mysql.com/training for more information

Sincere Choice: Supporting a Fair Software Market (http://sincerechoice.org)

-
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 with INNODB table

2003-02-01 Thread Grover Cussi N.
Hello!!

I have various databases, one  with a table with more than 3 millions 
of registers, and other has 250 MB, 50MB. My ibdata1 grow to more than 
1 G, well I do not want my big database, I drop the database but the 
size of the ibdata continues with the same size, what can I do?? I 
waant my ibdata with only the small databases, but I want with the 
correct size not 1 G!, 

How can restore to minium size the ibdata file? without making 
mysqldump of all the databases and creating a new one, if it is 
posible??  

Grover Cussi 
-- 
InfoSis - Webmail
http://www.cs.umss.edu.bo/cgi-bin/neomail.pl

-
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: # of connected user

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 01:49:24PM +0200, Mustafa Yelmer wrote:
 How i list connected users(active) to mysql server?
 
 it is important to know connected users for me?
 Mysql runs in server-client system, and each host of clients are different
 (i assume)

Good Day Mustafa!

  You can get a list of the various connections and connection states
  using SHOW FULL PROCESSLIST.

  See http://www.mysql.com/doc/en/SHOW_PROCESSLIST.html in the manual.


  Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

MySQL Tip: Upgrading your servers to 4.0.8? Make sure to upgrade your
  clients to 4.0.8 as well! See http://mysql.com/doc/en/News-4.0.8.html

Gosh, Batman. The nobility of the almost-human porpoise.
  --Robin, the Boy Wonder

-
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: # of connected user

2003-02-01 Thread Lopez David E-r9374c
Mustafa

Try this command from the client window: 

  show processlist;

You must be logged in from root to list all connections.
If you are logged in as normal user, only those connections
which you have privileges are listed.

David

 
 How i list connected users(active) to mysql server?
 

-
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 field is updated unintentionally

2003-02-01 Thread Steve Edberg
At 12:17 PM +0100 1/31/03, Marco Deppe wrote:

Hi,

I was already questioning my sanity, but the problem below is
reproduceable:

This is how my table looks:
mysql describe T_ORDH;
--+--+-+++
Field |Type  |Null |Key |Default |Extra
--+--+-+++
PK_ID |int(10) unsigned  | |PRI |NULL|auto_inc
ERSTELL_DATUM |timestamp(14) |YES  ||NULL|
STATUS|smallint(5) unsigned  | ||0   |

If I do
mysql update T_ORDH set STATUS=2 where PK_ID=26272;
ERSTELL_DATUM is set to the current date. I know that a timestamp
takes the current time, if set it to NULL, but since I'm not touching
it, it shouldn't change, should it?

A quick workaround is
mysql update T_ORDH set STATUS=2, ERSTELL_DATUM=ERSTELL_DATUM
- where PK_ID=26272;

The big question: Is it a bug or a feature?
(mysql  Ver 11.18 Distrib 3.23.51, for pc-linux-gnu (i686))



From:

	http://www.mysql.com/doc/en/DATETIME.html

Automatic updating of the first TIMESTAMP column occurs under any of 
the following conditions:

snip

# You explicitly set the TIMESTAMP column to NULL


...so that means it's a feature.

	-steve

--
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| SETI@Home: 1001 Work units on 23 oct 2002  |
| 3.152 years CPU time, 3.142 years SETI user... and STILL no aliens...  |
++

-
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: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Adolfo Bello
On Fri, 2003-01-31 at 10:48, Robert Mena wrote:
 Hi, I have been using autoincrement fields for some
 time but was wondering how does it work in some
 special situations.
 
 Ex. suppose I have an autoincrement field called num
 and the last one has value of 10.
 
 I delete the last on and insert a new one.  Which
 value will it have ? 10 or 11

11


 
 I read that if I issue a query delete * from table and
 delete from table I have diferent results (in regards
 to the auto increment field). Is this correct ?

Try both. I don't know what you mean. Sorry.

 Thanks.
 PS. plese CC me directly since for some reason the
 messages from the list are taking a while to get in my mailbox.

Done!

-- 
__   
   / \\   @   __ __@   Adolfo Bello [EMAIL PROTECTED]
  /  //  // /\   / \\   // \  //   Bello Ingenieria S.A, ICQ: 65910258
 /  \\  // / \\ /  //  //  / //cel: +58 416 609-6213
/___// // / _/ \__\\ //__/ // fax: +58 212 952-6797
www.bisapi.com   //pager: www.tun-tun.com (# 609-6213)


-
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: # of connected user

2003-02-01 Thread Giorgos Gaganis
try using the command:

mysqladmin -v processlist

Gaganis

Mustafa Yelmer wrote:

How i list connected users(active) to mysql server?

it is important to know connected users for me?
Mysql runs in server-client system, and each host of clients are different
(i assume)


Mustafa Yelmer
Software Engineer
+90 212 2128200-1228
[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




Re: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 06:48:45AM -0800, Robert Mena wrote:
 Hi, I have been using autoincrement fields for some
 time but was wondering how does it work in some
 special situations.
 
 Ex. suppose I have an autoincrement field called num
 and the last one has value of 10.
 
 I delete the last on and insert a new one.  Which
 value will it have ? 10 or 11

  Hi Robert,

  Why not test them on your own? :)

  Anyhow...

  11

 I read that if I issue a query delete * from table and
 delete from table I have diferent results (in regards
 to the auto increment field). Is this correct ?

  For MyISAM tables, if you run DELETE FROM table, the AUTO_INCREMENT
  field will be reset to default.
  
  There is an exception: if you set AUTO_INCREMENT in a secondary column
  in a multi-value primary key, then deleting the highest value in the
  secondary column will allow that value to be reused in the
  auto-increment sequence.

  i.e.

  CREATE TABLE user_log (
id  SMALLINT UNSIGNED NOT NULL,
event   MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (user_name, event)
  );

  mysql INSERT user_log (id) VALUES (1),(1),(1);
  Query OK, 3 rows affected (0.00 sec)
  
  mysql SELECT * FROM user_log;
  ++---+
  | id | event |
  ++---+
  |  1 | 1 |
  |  1 | 2 |
  |  1 | 3 |
  ++---+
  3 rows in set (0.00 sec)
  
  mysql DELETE FROM user_log WHERE id=1 AND event=3;
  Query OK, 1 row affected (0.01 sec)
  
  mysql SELECT * FROM user_log;
  ++---+
  | id | event |
  ++---+
  |  1 | 1 |
  |  1 | 2 |
  ++---+
  2 rows in set (0.00 sec)
  
  mysql INSERT user_log (id) VALUES (1);
  Query OK, 1 row affected (0.00 sec)
  
  mysql SELECT * FROM user_log;
  ++---+
  | id | event |
  ++---+
  |  1 | 1 |
  |  1 | 2 |
  |  1 | 3 |
  ++---+
  3 rows in set (0.00 sec)
  


  Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Using and Managing MySQL
  MySQL Training: Hamburg, March 24-28, 2003
  Visit http://mysql.com/training for more information

While we are postponing, life speeds by.--Lucius Annaeus Seneca

-
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: Making Lin/Win share DataSource

2003-02-01 Thread Sherzod Ruzmetov
Wow, one hell of a discussion! :-)

: Now, let's say DATADIR is in /var/lib/mysql/ under Linux, and under
: Windows this is c:\mysql\data\ (I'm not informed how paths will look
: like when you share them between OS's).
:

Guys, are you sure you can share files between two absolutely different file
systems
just like that? I don't think it's gonna be as easy as you want it to be.
There should be some midleware solutions that may help you do that.

In any event, I'm curious to find out myself.

Sherzod






-
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: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 06:48:45 -0800, [EMAIL PROTECTED] wrote:
 Hi, I have been using autoincrement fields for some
 time but was wondering how does it work in some
 special situations.

Most of this depends on which MySQL version you use and which table
type, unfortunately. OTOH, for the common case all just work fine and
relying too much on the edge cases is not a good idea anyhow. 

Some relevant manual pages are:

1: http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html
2: http://www.mysql.com/doc/en/SEC471.html
3: http://www.mysql.com/doc/en/CREATE_TABLE.html 
4: http://www.mysql.com/doc/en/ALTER_TABLE.html

 Ex. suppose I have an autoincrement field called num
 and the last one has value of 10.
 
 I delete the last on and insert a new one.  Which
 value will it have ? 10 or 11

With the ISAM and BDB table handler, you will get 10 [see 3]. With
MyISAM 11 [3]. With InnoDB 11, except if you restart MySQL in-between,
then you will get 10 [2,3]. 

The common part is: You will get a new number, which is at least
greater than the current maximum value, but numbers may be reused.

If you ignore older table handlers (ISAM,BDB) and ignore server
restarts (my last was about 100 days before): You will get a new,
never-used-before number that is greater than the current maximum
value with MyISAM or InnoDB.

 I read that if I issue a query delete * from table and
 delete from table I have diferent results (in regards
 to the auto increment field). Is this correct ?

The difference is whether you specify a WHERE clause (delete * is not
correct syntax, AFAIK), i.e. with

  DELETE FROM table_name (without a WHERE)

the sequence starts over (for any table handler) if you are in
auto-commit mode. [3] With a WHERE clause, nothing special happens.

You can also set the value explicitly by using [see 4]

  ALTER TABLE table_name AUTO_INCREMENT = #


HTH,

Benjamin.


-- 
[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




mysqldump --allow-keywords has no effect. Alias for -Q?

2003-02-01 Thread ch
Description:
The --allow-keywords option has no effect if the server can
use the SHOW CREATE INFO command (it's the other else branch).
All the new code only make use of opt_quoted which is set by
the -Q option and quotes illegal table/column names instead of 
prepending them with the database name like --allow-keywods would do.
How-To-Repeat:
CREATE TABLE `by` (`char` char(30)); and then try to dump it using
--allow-keywords and -Q.
Fix:
If it is backwards compatible to e.g. version 3.21 which didn't know
the SHOW CREATE TABLE command, then make --allow-keywods just an
alias for opt_quoted (-Q).

Submitter-Id:  submitter ID
Originator:Christian Hammers
Organization:
 Debian Project
MySQL support: none
Synopsis:  mysqldump --allow-keywods has no effect
Severity:  non-critical
Priority:  low
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.55 (Source distribution)

Environment:

System: Linux app109 2.4.20-app109-3 #3 Sat Jan 25 14:55:31 CET 2003 i686 unknown 
unknown GNU/Linux
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib 
--enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu 
--enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.2 20030124 (Debian prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 2003-01-23 13:49 /lib/libc.so.6 - 
libc-2.3.1.so
-rwxr-xr-x1 root root  1102984 2003-01-21 23:15 /lib/libc-2.3.1.so
-rw-r--r--1 root root  2337952 2003-01-21 23:15 /usr/lib/libc.a
-rw-r--r--1 root root  178 2003-01-21 23:15 /usr/lib/libc.so
-rw-r--r--1 root root   716080 2002-01-13 21:06 
/usr/lib/libc-client.so.2001
Configure command: ./configure  --prefix=/usr --exec-prefix=/usr 
--libexecdir=/usr/sbin --datadir=/usr/share --sysconfdir=/etc/mysql 
--localstatedir=/var/lib/mysql --includedir=/usr/include --infodir=/usr/share/info 
--mandir=/usr/share/man --enable-shared --with-libwrap --enable-assembler 
--with-berkeley-db --with-innodb --enable-static --enable-shared --enable-local-infile 
--with-raid --enable-thread-safe-client --without-readline 
--with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql 
--without-bench --without-docs --with-client-ldflags=-lstdc++ --with-extra-charsets=all


-
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




New user on OS X

2003-02-01 Thread Gary Reimer
I'm a new mysql user running on OS X. I have set up a test database and am
trying to use mysqldump to create a backup. However here is what happens:

[h24-85-217-157:/usr/local/bin] garydr% mysqldump -h localhost -u root
bpw_dbbpw_db_backup.sql

bpw_db_backup.sql: Permission denied.

I have no idea what's going on. I understand that this command should create
an sql file with my database structure and data in it. Sounds good. However,
I can't run the command.

I read in a manual I could get help as follows:

[h24-85-217-157:/usr/local/bin] garydr% mysqldump --help
mysqldump: Command not found.

But as you can see, it doesn't work.

Can anyone help me, or direct me to a good source of information related to
running mysql on OS X? For example, I can't figure out where in my system
the mysql database files are located. If I could, at least I could just make
backup copies to CD.

Any help would be greatly appreciated.

Thanks in advance,
Gary

-- 
Gary Reimer
Winnipeg MB Canada


-
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: (SQL) Count Distincts

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 10:44:58 -0500, [EMAIL PROTECTED] wrote:
 I am trying to get a count of Distinct IP's from my homemade hit-log
 database (don't ask).  The db is MySQL.  I'm trying this:
 
 SELECT DISTINCT ClientIP, COUNT(*), Month(TimeStamp),
 DayOfMonth(TimeStamp) FROM RedirectLog WHERE (TimeStamp BETWEEN
 '2003013000' AND '2003013100') GROUP BY Month(TimeStamp),
 DayOfMonth(TimeStamp)
 
 But it doesn't appear to be doing what I want.  The Count per day is the
 same as it was when I didn't have DISTINCT ClientIP,  in there, and I
 know from looking at the raw data that there are some duplicate
 ClientIP's in the data.

I am not sure what your query is supposed to do, because having
ClientIP without a grouping function doesn't make sense (you will get
a random ClientIP from each day and the chance is high, that it will
be distinct from the others).

But from your description it sounds as if you want something like

SELECT   COUNT(DISTINCT ClientIP) AS amount,
 MONTH(TimeStamp) AS month,
 DAYOFMONTH(TimeStamp) AS day
FROM RedirectLog
WHERETimeStamp BETWEEN 2003013000 AND 2003013100
GROUP BY month, day

The relevant part is using DISTINCT with COUNT, the other changes
(like the GROUP BY clause) were just cleanups while I was parsing
your query.

HTH,

Benjamin.


PS: Removed [EMAIL PROTECTED] from CC, because 
#1 cross-posting is bad bad bad, and
#2 I don't want to post to a list that I don't know.

-- 
[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: (SQL) Count Distincts

2003-02-01 Thread Sherzod Ruzmetov
:
: I am trying to get a count of Distinct IP's from my homemade hit-log
: database (don't ask).  The db is MySQL.  I'm trying this:
:
: SELECT DISTINCT ClientIP, COUNT(*), Month(TimeStamp),
: DayOfMonth(TimeStamp) FROM RedirectLog WHERE (TimeStamp BETWEEN
: '2003013000' AND '2003013100') GROUP BY Month(TimeStamp),
: DayOfMonth(TimeStamp)


Looks like you are working on a project similar to
http://traffic.handalak.com
(login: demo password: demo).

In the above example, you're trying to retrieve how many times a unique user
(arguably) visited a site on certain month? In that case, you need to drop
distinct
and group it by IP address and specify the date inside WHERE clause.
Simplified version
would look something like:

 SELECT ClientIP, COUNT(*)
FROM redirectLog
WHERE MONTH(timeStamp) = MONTH(CURDATE())
GROUP BY clientIP;


Good luck

Sherzod



-
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: SQL Syntax

2003-02-01 Thread Sherzod Ruzmetov
That is one bloody complex query :).

As far as I know, MySQL does not support RIGHT JOIN leyword, so that's where
it's failing. Someone slap me if I'm wrong.

It may be possible to fetch the results you want without such a hairy query.
Just include a partial dump of involved tables and concise desctiption of
what you're trying to select. Otherwise, I don't have guts to look into that
huge query myself! Hopefully someone will! :-P

Sherzod

:
:
:  Hi All,
: 
:  Can anyone help me get this query working in MySQL, this
: was created using
:  Access, but it doesn't port well for MySQL syntax:
: 
:  SELECT basket.id,
:  products.part_code,
:  products.product_type,
:  products.description,
:  product_options_1.options,
:  basket.price, basket.quantity,
:  basket.price*basket.quantity AS total
:  FROM (products LEFT JOIN product_options ON
:  products.prod_id=product_options.prod_id)
:  RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN
: (basket_header
:  INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON
:  product_options_1.po_id=basket.op_id) ON
: products.prod_id=basket.prod_id
:  GROUP BY basket.id, products.part_code, products.product_type,
:  products.description, product_options_1.options, basket.price,
:  basket.quantity, basket.price*basket.quantity,
: basket_header.basket_id,
:  products.options
:  HAVING (((basket_header.basket_id)=4));
: 
:  Here is the error message MySQL reports:
: 
:  ERROR 1064: You have an error in your SQL syntax near
: '(product_options AS
:  product_options_1 RIGHT JOIN (basket_header INNER JOIN
: baske' at line 9
: 
:  Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas
: to the correct
:  syntax?
: 
:  Thanks,
: 
:  Kevin
: 
:
:
: -
: 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: setting auto increment start value

2003-02-01 Thread Nasser Ossareh
This actually is more tricky than it sounds.  

Firstly the table already exists.  So create table is
an option only if you were going to recreate a new
table with an auto_increment column, then move the
rest of the data (except for the index column) in to
the new table, drop the old table and re-name the new
table.

a shorter approach maybe to drop the column and add a
new auto_increment column with auto_increment of 1000
or whatever you like. 

and secondly SET INSERT_ID works for values greater
than LAST_INSERT_ID as expect but for values less than
LAST_INSERT_ID (e.g. gaps created by delete command)
only works for the next generated value.  

for instance if LAST_INSERT_ID is 7 and you delete the
last 5 records... then

SET INSERT_ID = 3;
INSERT INTO table values (null, ..), (null, ..);

will result in:

1
4  // first inserted record
8  // second inserted record -- id is 8 not 5!

but

SET INSERT_ID = 60;
INSERT INTO table values (null, ..), (null, ..);

will result in

1
61  // first inserted record after set
62  // second inserted record -- follows the first

The logic of AUTO_INCREMET is consistent but its
realization is somewhat unexpected at the beginning.




--- Sherzod Ruzmetov [EMAIL PROTECTED] wrote:
 : Am Donnerstag, 30. Januar 2003 20:15 schrieb
 Mike Doanh Tran:
 :  Hi all,
 : 
 :  I am creating a new table with an
 auto_increment primary key.
 :  How do i tell mysql to start incrementing at
 a certain 
 : value, let say
 :  1000 instead of 1?
 : 
 :  Thanks,
 : 
 :  MT
 : 
 : SET INSERT_ID=1000 does it.
 
 
 Tabels have AUTO_INCREMENT option, which you will
 need to set while
 creating the table. In the following example id will
 start with 1000:
 
 CREATE TABLE test (
   id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
 ) AUTO_INCREMENT=1000;
 
 Good luck
 
 Sherzod
 
 
 
 
 

-
 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
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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




Making Lin/Win share DataSource

2003-02-01 Thread JD
On Fri, 2003-01-31 at 06:39, Stefan Hinz, iConnect (Berlin) wrote:

Hallo Stefan,
Thanks for your kind reply. But anyway, me too,I've solved the problem
as well...:) :)

So, here is what I did in term of commands:

1- $ mount /home/myfiles
   [this /home/myfiles is the D:\ partition in my dual-boot laptop. I'm
now mounting it simply still as a normal user -- NOT as root]
2- $ mkdir /home/myfiles/MySQL
3- $ su 
   [obvious..., accessing the root privilege] 
4- $ mv /var/lib/mysql/* /home/myfiles/MySQL/
5- $ vi /etc/my.cnf 
   [surely..., changing the datadir line to become and to look like:
datadir:/home/myfiles/MySQL/
6- $ safe_mysqld 

And all done! 

The only mistake that I did earlier was that I as a normal-user
copied/moved the data to the vfat partition. This way, when I started
mysqld as root, I had no privilege at all over the datasource.

But..., wait..., I am now still in Linux and haven't gone to or tried it
in Windows [kind of allergic..., you know :)]. But, assuming the core
datasource for Lin-Win is not different at all, I believe that in
Windows it wouldn't be a big deal at all.

Nice! So now no matter I'm in Windows or Linux, my data can always be
intact...:)

BTW..., if one tries this way too, please inform the success/failure.


JD


 JD,
 
 my answer may seem ridiculous, too, but with the following setup you
 should be able to use MySQL databases and tables both under Linux and
 Windows on the same machine.
 
 About the only thing you need is access to the MySQL data directory from
 both Linux and Windows. Regardless of the operating system,
 
  mysqladmin variables
 
 will show you where DATADIR is. Of course (though it may sound even more
 ridiculous), you have to have MySQL installed both under Linux and under
 Windows.
 
 Whether you've started mysqld or not, you can issue
 
  mysqld --print-defaults
 
 to find out the location of DATADIR. However, this will not show you
 DATADIR if it's not in my.cnf / my.ini.
 
 Now, let's say DATADIR is in /var/lib/mysql/ under Linux, and under
 Windows this is c:\mysql\data\ (I'm not informed how paths will look
 like when you share them between OS's).
 
 In this case, you would edit /etc/my.cnf under Linux and fill in:
 
 [mysqld]
 datadir=/var/lib/mysql
 
 And, under Windows, this would be the following in c:\winnt\my.ini
 (assuming you boot Win NT/2000/XP):
 
 [mysqld]
 datadir=c:\mysql\data
 
 Now, I suggest you start the MySQL server (both OS's) as follows:
 
 shell mysqld --standalone --console
 
 This will output a lot of start information, so you can find out what's
 going wrong at startup.
 
 HTH,
 --
   Stefan Hinz [EMAIL PROTECTED]
   Geschäftsführer / CEO iConnect GmbH http://iConnect.de
   Heesestr. 6, 12169 Berlin (Germany)
   Tel: +49 30 7970948-0  Fax: +49 30 7970948-3
 
 - Original Message -
 From: JD [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 
 
  Hallo list,
  this might sound ridiculous. But, because my computer is dual booting
  Linux/Windows, I'm looking for ways to put the datasource in windows
  D:\
  or vfat, so that the data can be shared mutually by the two OS. But
  until now I still cannot do that.
 
  I have tried to:
 - change the owner to mysql;
 - change the /etc/my.cnf
 
  Well, does somebody out there do something like this already?
 
  Thank you.
 
 
  JD
 
 
  -
  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: SQL Syntax

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 15:46:37 -, [EMAIL PROTECTED] wrote:
 Hi All,
 
 Can anyone help me get this query working in MySQL, this was created using
 Access, but it doesn't port well for MySQL syntax:
 
 SELECT basket.id,
 products.part_code,
 products.product_type,
 products.description,
 product_options_1.options,
 basket.price, basket.quantity,
 basket.price*basket.quantity AS total
 FROM (products LEFT JOIN product_options ON
 products.prod_id=product_options.prod_id)
 RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN (basket_header
 INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON
 product_options_1.po_id=basket.op_id) ON products.prod_id=basket.prod_id
 GROUP BY basket.id, products.part_code, products.product_type,
 products.description, product_options_1.options, basket.price,
 basket.quantity, basket.price*basket.quantity, basket_header.basket_id,
 products.options
 HAVING (((basket_header.basket_id)=4));

Reformatting for readability that is:

SELECT   basket.id,
 products.part_code,
 products.product_type,
 products.description,
 product_options_1.options,
 basket.price,
 basket.quantity,
 basket.price*basket.quantity AS total
FROM ( products
   LEFT JOIN product_options
   ON product_options.prod_id = products.prod_id )
 RIGHT JOIN
 ( product_options AS product_options_1
   RIGHT JOIN
   ( basket_header
 INNER JOIN basket
 ON basket.basket_id = basket_header.basket_id )
   ON product_options_1.po_id = basket.op_id )
 ON products.prod_id = basket.prod_id
GROUP BY basket.id, products.part_code, products.product_type,
 products.description, product_options_1.options,
 basket.price, basket.quantity, total,
 basket_header.basket_id, products.options
HAVING   basket_header.basket_id=4;


 Here is the error message MySQL reports:
 
 ERROR 1064: You have an error in your SQL syntax near '(product_options AS
 product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9
 
 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct
 syntax?

Oh, RIGHT JOINs are fine. What it doesn't like are the parenthesis, I
think. So simply reordering the joins (and by that replacing RIGHT
JOINs with LEFT JOINs were appropriate and vice versa) should do the
trick.

FROM ( ( basket_header
 INNER JOIN basket
 ON basket.basket_id = basket_header.basket_id )
   LEFT JOIN product_options AS product_options_1
   ON product_options_1.po_id = basket.op_id )  
 LEFT JOIN
 ( products
   LEFT JOIN product_options
   ON product_options.prod_id = products.prod_id )
 ON products.prod_id = basket.prod_id

Now, a lot of the parenthesis are redundant.

Written this way, it becomes more obvious, that product_options (not
product_options_1) is neither referenced by a other table in an ON
clause nor used in the select part, so what is the reason to include
it to begin with? It's redundant.

Additionally, I don't see the reason for the HAVING clause. IMHO the
condition would be as good in the WHERE clause (where the optimizer
can make better use of it).

Aside from that, I prefer table aliases to get rid of the long names,
so the end result would look like

SELECT   basket.id,
 p.part_code, p.product_type, p.description,
 po1.options,
 b.price, b.quantity,
 b.price*b.quantity AS total
FROM basket_header bh
 INNER JOIN basket b ON b.basket_id = bh.basket_id
 LEFT JOIN products p ON p.prod_id = b.prod_id
 LEFT JOIN product_options po1 ON po1.po_id = b.op_id
HAVING   bh.basket_id = 4;
GROUP BY b.id, p.part_code, p.product_type, p.description, po1.options,
 b.price, b.quantity, total, bh.basket_id, p.options

(I did not rename po1 to po in order to avoid confusion.)

HTH,

Benjamin.

-- 
[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: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Nasser Ossareh
Auto_Increment will increment the last_INSERT_ID
(which in your case is 10)... so the num field of the
new entry will be 11.


--- Robert Mena [EMAIL PROTECTED] wrote:
 Hi, I have been using autoincrement fields for some
 time but was wondering how does it work in some
 special situations.
 
 Ex. suppose I have an autoincrement field called num
 and the last one has value of 10.
 
 I delete the last on and insert a new one.  Which
 value will it have ? 10 or 11
 
 I read that if I issue a query delete * from table
 and
 delete from table I have diferent results (in
 regards
 to the auto increment field). Is this correct ?
 
 Thanks.
 PS. plese CC me directly since for some reason the
 messages from the list are taking a while to get in
 my mailbox.
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.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
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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




FW: line breaks

2003-02-01 Thread Sherzod Ruzmetov

: 
: - what is the stored character code of the enter key in the 
: text field, i am
: figuring out to find that character and replace it with the 
: br element,
: for the exact display,

That's what's normally done. Line breaks are usually represented by \n
escape character. So all you should do is replace all the instances of \n
with br /. The following substitution will do the trick:

s/\n/br/g;

: - do you have a shorter way to do this?

There's no quite shorter way, there is however a dirty way. Simply wrap the
text between pre and /pre tags while outputing to the browser.

Sherzod


sql, query


-
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: SQL Syntax Help

2003-02-01 Thread Bob Hall
On Fri, Jan 31, 2003 at 02:07:11PM -, Kevin Smith wrote:
 Hi All,
 
 Can anyone help me get this query working in MySQL, this was created using
 Access, but it doesn't port well for MySQL syntax:
 
 SELECT b.id, p.part_code, p.product_type, p.description, po1.options,
 b.price, b.quantity, b.price*b.quantity AS total
 FROM (products AS p LEFT JOIN product_options AS po ON p.prod_id =
 po.prod_id) RIGHT JOIN (product_options AS po1 RIGHT JOIN (basket_header AS
 bh INNER JOIN basket AS b ON bh.basket_id = b.basket_id) ON po1.po_id =
 b.op_id) ON p.prod_id = b.prod_id
 GROUP BY b.id, p.part_code, p.product_type, p.description, po1.options,
 b.price, b.quantity, b.price*b.quantity, bh.basket_id, p.options
 HAVING (((bh.basket_id)=4));

Try
FROM (((basket_header AS bh INNER JOIN basket AS b 
ON bh.basket_id = b.basket_id)
LEFT JOIN product_options AS po1 
ON po1.po_id = b.op_id) 
LEFT JOIN products AS p 
ON p.prod_id = b.prod_id)
LEFT JOIN product_options AS po 
ON p.prod_id = po.prod_id

MySQL tends to be more finicky than Jet about how you group things.
I haven't tried this, but I think it will avoid confusing the MySQL 
optimizer.

Bob Hall

-
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: line breaks

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 06:22:50PM +0200, Tarik Kutluca wrote:
 Hi,
 
 From a web form I am collecting information to a table. On the form there is
 a textarea element storing to a text field on the mysql table. Since the
 textarea can hold the enter key, it's stored in to the field also, but when
 i try to call that cell and display it on the web page, i see that line
 breaks are ignored. But the sentences must be displayed as they are entered.
 
 - what is the stored character code of the enter key in the text field, i am
 figuring out to find that character and replace it with the br element,
 for the exact display,
 
 - do you have a shorter way to do this?

When HTML agents display text, they are supposed to fold all
whitespace characters (newlines, tabs, spaces) into a single space
character unless the text is contained in a
pre/pre block.

The characters that make up a new line sequence vary depending on
the operating system of the client. Unix-like OSs use ASCII
character code 10, Windows uses 13 followed by 10 and Macs (but
likely not OS X+) use 13.

If you are using PHP, just call nl2br() on the text before you
display the text.

Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

MySQL Tip: Show the configuration options set in the server
  % mysqld --print-defaults

My punctuality is well known. When the revolution takes place, I'll be late
and I'll be shot as a traitor.
--Traitor by the SugarCubes

-
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: line breaks

2003-02-01 Thread Benjamin Pflugmann
Hi.

In which way is this a MySQL related problem? Please choose a more
appropriate forum next time.

On Fri 2003-01-31 at 18:22:50 +0200, [EMAIL PROTECTED] wrote:
 Hi,
 
 From a web form I am collecting information to a table. On the form there is
 a textarea element storing to a text field on the mysql table. Since the
 textarea can hold the enter key, it's stored in to the field also, but when
 i try to call that cell and display it on the web page, i see that line
 breaks are ignored. But the sentences must be displayed as they are entered.
 
 - what is the stored character code of the enter key in the text field, i am
 figuring out to find that character and replace it with the br element,
 for the exact display,

Depends on the browser used to enter the text. Usually it's '\n'
(i.e. the character with code 10 resp. hex 0x0A)

 - do you have a shorter way to do this?

Not really, except if you are happy with using PRE

Bye,

Benjamin.

-- 
[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




One Column in fulltext or more

2003-02-01 Thread amr salah
hi all
I want to know if adding 14 fulltext indexes on 14 columns would be faster , or adding 
all the words in the 14 fields to one big text column and then fulltext index it is 
better ? 
i dont know how mysql keeps the fulltext indexes, but if each index is kept on a file 
then 1 big column is better ,as only one file is opened .
On the other side , if MySQL considers covered queries ,then 14 full text indexes are 
gona be better . 
Thats my opinion , but i wanna hear yours .

_
Get your FREE, Private email today - [EMAIL PROTECTED] 
http://www.msexpert.com

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP  more! http://www.everyone.net/selectmail?campaign=tag

-
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: Percentile calculations

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 17:22:37 -, [EMAIL PROTECTED] wrote:
[...]
 select count(*) from percentile where criteria;
 
 Work out 95% or this value.
 
 create temporary table percentile (id int unsigned auto_increment
 primary key, scantime decimal(20,10));
 
 insert into percentile (scantime) select processingtime from emails
 where same criteria order by processingtime desc limit value from
 above;
 
 select min(scantime) from percentile;

If I am not mistaken, you can pick the row in question without a
separat table:

Basically you limit the query to the first n rows (in descending
order) and then pick the one with the lowerst value, which should have
been the last in the limited range. So you could pick that row
directly, I think:

  SELECT processingtime FROM emails
  WHERE blah ORDER BY processingtime DESC LIMIT value,1

Second, why use 95% of the table, if you can do with 5%? In other
words, calculate the remainder, sort ascending and limit by the
remainder you calculated. The difference should especially in your
case, where you copy those rows and can avoid to do so for 90% of the
columns.

HTH,

Benjamin.

-- 
[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: How to insert an Image in a table with libmysqlclient and API C ?

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 18:56:19 +0100, [EMAIL PROTECTED] wrote:
 Hi all, 
 
 my problem is the following, it's possible to insert an image in a table
 with the libmysqlclient ?

Yes.

 My language is C 
 
 i'm working with GNU/Linux

Bye,

Benjamin.



PS: In explanation: if you want a more specific answer, you have to
provide more details... MySQL doesn't care whether you store text
or binary data, so what is the problem?

-- 
[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: Making Lin/Win share DataSource

2003-02-01 Thread Stefan Hinz, iConnect \(Berlin\)
Sherzod,

 : Now, let's say DATADIR is in /var/lib/mysql/ under Linux, and
under
 : Windows this is c:\mysql\data\ (I'm not informed how paths will
look
 : like when you share them between OS's).
 :

 Guys, are you sure you can share files between two absolutely
different file
 systems
 just like that? I don't think it's gonna be as easy as you want it to
be.

The only problem is that you have to make your disk mountable both under
Linux and Windows. If you succeed with this, there's no problem at all
to use MySQL data across those plattforms. MySQL's MyISAM tables are
platform independent, and so are MERGE and HEAP. I'm not sure about BDB
and InnoDB, but I guess they are platform independent, too.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Sherzod Ruzmetov [EMAIL PROTECTED]
To: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED]; JD
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, February 01, 2003 2:04 AM
Subject: RE: Making Lin/Win share DataSource


 Wow, one hell of a discussion! :-)

 : Now, let's say DATADIR is in /var/lib/mysql/ under Linux, and
under
 : Windows this is c:\mysql\data\ (I'm not informed how paths will
look
 : like when you share them between OS's).
 :

 Guys, are you sure you can share files between two absolutely
different file
 systems
 just like that? I don't think it's gonna be as easy as you want it to
be.
 There should be some midleware solutions that may help you do that.

 In any event, I'm curious to find out myself.

 Sherzod







-
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: line breaks

2003-02-01 Thread Stefan Hinz, iConnect \(Berlin\)
Tarik,

 - what is the stored character code of the enter key in the text
field, i am
 figuring out to find that character and replace it with the br
element,
 for the exact display,

The character is \n (the new line character).

If you use PHP and have magic_quotes=on in your php.ini, PHP will
automatically escape certain characters like \n. If magic_quotes=off,
you can use the addslashes() function to accomplish this.

When retrieving the data out of MySQL to display them in a textarea
field once again, you have to do nothing. The web browser will take care
of converting \n into something the operating thinks is a new line
(Unix: \n, Windows: \r\n, MacOS: \r). If you want to display the data
outside of form fields, you will have to convert \n into something HTML
knows is a new line. HTML uses for example br or p for this. In PHP,
you can use the nl2br() function that will convert \n into br.

If you don't use PHP, things might be a bit more complicated.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Tarik Kutluca [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 5:22 PM
Subject: line breaks


 Hi,

 From a web form I am collecting information to a table. On the form
there is
 a textarea element storing to a text field on the mysql table. Since
the
 textarea can hold the enter key, it's stored in to the field also, but
when
 i try to call that cell and display it on the web page, i see that
line
 breaks are ignored. But the sentences must be displayed as they are
entered.

 - what is the stored character code of the enter key in the text
field, i am
 figuring out to find that character and replace it with the br
element,
 for the exact display,

 - do you have a shorter way to do this?

 thank you


 -
 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




The little girl

2003-02-01 Thread Ming
Hello sql member,

The fund of the help collects donations for the little girl.
If you know that mercy and compassion means, visit our website please:
http://www.kathelp.boom.ru

-- 
Best regards,
 Ming  mailto:[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: SQL Syntax

2003-02-01 Thread Kevin Smith
Hi Benjamin,

Wow, that sure sorted that problem out... I had to rejig it slightly to
get it to work, but this is the final working version:

SELECT
b.id,
p.part_code, p.product_type, p.description,
po.options,
b.price, b.quantity,
b.price*b.quantity AS total
FROM basket_header bh
INNER JOIN basket b ON b.basket_id = bh.basket_id
LEFT JOIN products p ON p.prod_id = b.prod_id
LEFT JOIN product_options po ON po.po_id = b.op_id
WHERE bh.basket_id = 4
GROUP BY b.id, p.part_code, p.product_type, p.description, po.options,
b.price, b.quantity, total, bh.basket_id, p.options

Many thanks, now I'll work out why I couldn't do that so I can better
understand it.

Kevin

- Original Message -
From: Benjamin Pflugmann [EMAIL PROTECTED]
To: Kevin Smith [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, February 01, 2003 4:32 AM
Subject: Re: SQL Syntax


 Hi.

 On Fri 2003-01-31 at 15:46:37 -, [EMAIL PROTECTED] wrote:
  Hi All,
 
  Can anyone help me get this query working in MySQL, this was created
using
  Access, but it doesn't port well for MySQL syntax:
 
  SELECT basket.id,
  products.part_code,
  products.product_type,
  products.description,
  product_options_1.options,
  basket.price, basket.quantity,
  basket.price*basket.quantity AS total
  FROM (products LEFT JOIN product_options ON
  products.prod_id=product_options.prod_id)
  RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN
(basket_header
  INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON
  product_options_1.po_id=basket.op_id) ON
products.prod_id=basket.prod_id
  GROUP BY basket.id, products.part_code, products.product_type,
  products.description, product_options_1.options, basket.price,
  basket.quantity, basket.price*basket.quantity,
basket_header.basket_id,
  products.options
  HAVING (((basket_header.basket_id)=4));

 Reformatting for readability that is:

 SELECT   basket.id,
 products.part_code,
 products.product_type,
 products.description,
 product_options_1.options,
 basket.price,
 basket.quantity,
 basket.price*basket.quantity AS total
 FROM ( products
LEFT JOIN product_options
ON product_options.prod_id = products.prod_id )
 RIGHT JOIN
 ( product_options AS product_options_1
RIGHT JOIN
( basket_header
  INNER JOIN basket
  ON basket.basket_id = basket_header.basket_id )
ON product_options_1.po_id = basket.op_id )
 ON products.prod_id = basket.prod_id
 GROUP BY basket.id, products.part_code, products.product_type,
  products.description, product_options_1.options,
 basket.price, basket.quantity, total,
 basket_header.basket_id, products.options
 HAVING   basket_header.basket_id=4;


  Here is the error message MySQL reports:
 
  ERROR 1064: You have an error in your SQL syntax near
'(product_options AS
  product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at
line 9
 
  Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the
correct
  syntax?

 Oh, RIGHT JOINs are fine. What it doesn't like are the parenthesis, I
 think. So simply reordering the joins (and by that replacing RIGHT
 JOINs with LEFT JOINs were appropriate and vice versa) should do the
 trick.

 FROM ( ( basket_header
  INNER JOIN basket
  ON basket.basket_id = basket_header.basket_id )
LEFT JOIN product_options AS product_options_1
ON product_options_1.po_id = basket.op_id )
 LEFT JOIN
 ( products
LEFT JOIN product_options
ON product_options.prod_id = products.prod_id )
 ON products.prod_id = basket.prod_id

 Now, a lot of the parenthesis are redundant.

 Written this way, it becomes more obvious, that product_options (not
 product_options_1) is neither referenced by a other table in an ON
 clause nor used in the select part, so what is the reason to include
 it to begin with? It's redundant.

 Additionally, I don't see the reason for the HAVING clause. IMHO the
 condition would be as good in the WHERE clause (where the optimizer
 can make better use of it).

 Aside from that, I prefer table aliases to get rid of the long names,
 so the end result would look like

 SELECT   basket.id,
 p.part_code, p.product_type, p.description,
 po1.options,
 b.price, b.quantity,
 b.price*b.quantity AS total
 FROM basket_header bh
 INNER JOIN basket b ON b.basket_id = bh.basket_id
 LEFT JOIN products p ON p.prod_id = b.prod_id
 LEFT JOIN product_options po1 ON po1.po_id = b.op_id
 HAVING   bh.basket_id = 4;
 GROUP BY b.id, p.part_code, p.product_type, p.description,
po1.options,
 b.price, b.quantity, total, bh.basket_id, p.options

 (I did not rename po1 to po in order to avoid confusion.)

 HTH,

 Benjamin.

 --
 [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: 

tab-delimited text file import

2003-02-01 Thread Bill Whitacre
Does anyone have any hints on how to or where to look to find out how 
to import a number of tab-delimited text files with some header info 
that reside on a ftp server into a MySQL database using PHP?

How about doing this on a daily basis, automagically?

Thanks.

bw

---
Bill Whitacre
[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