Re: Formatting Large amounts of Text into Mysql

2001-10-24 Thread Carl Troein


tim gales writes:

 Hi.  I am trying to have type in a story into a form textfield and
 submit it using PHP into blob formatted field mysql database.
 
 When I submit, all the returns are removed and all the text runs
 together like on ebig paragraph.  Is there a way to have mysql or PHP
 recognize the returns and empty lines from the textarea field and
 rememeber them so when I call them up from the database the formatting
 looks just like when I typed it in the text field?

Ah, an *HTML question.
You get it the way it was in the TEXTAREA. The user agent might have
word wrapped it, but that's something you'll have to do too when you
present it. If you really want it to look just like the user saw it
(although there are of course no guarantees that in will look _good_),
look at the non-standard WRAP attribute to the TEXTAREA tag.
WRAP=hard outght to work in most browsers.

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
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: journaled file system

2001-10-24 Thread Andrew Braund

 We've had good luck with ReiserFS.
 
 Jeremy
 -- 
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936
 



 MySQL 3.23.41-max: up 48 days, processed 1,051,983,004 queries (253/sec. avg)

^^
Are these stats from a box running on ReiserFS? 


-
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: select stmt problem

2001-10-24 Thread Carl Troein


Teddy A Jasin writes:

 Hi,
 I have this mysql statement:
 select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
 where counts  10 and datesent between '2001-09-24' and '2001-10-24' and 
 (returncode  0 and returncode  10) group by hpnumber order by counts DESC
 
 and i Get this following error:
 Unknown column 'counts' in 'where clause'
 
 why is that so??? it works before and now give me this problem.

If that worked before, something was very wrong. If you take a
look at how WHERE and GROUP BY work, you'll see that the grouping
is done _after_ it's known what rows there are to group and what
they should be grouped on. What you probably want to use is HAVING
for the 'counts = 10' part.

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
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: into outfile error

2001-10-24 Thread Carl Troein


Avelino F writes:

 I managed to set the file permission and managed to send the output to the 
 mysql database directory used. Do you know if there is a way to make mysql 
 write to a remote directory?

As in on any machine in the world? No. As in on the client machine?
Not really, since there's no equivalent of LOAD LOCAL DATA INFILE.
What you can do is either use the mysql command line client and 
to a file, or just loop over the result and save it in whatever
format you wish in your favourite language.

 Is there a global or local configuration that 
 can be specified where mysql will write to?

It will write where you tell it to, if that location fulfils the
criteria listed in the manual. I think mysql chdir()s to the
data directory, but I wouldn't rely on it. Entering the full
path isn't all that work anyway.

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
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: journaled file system

2001-10-24 Thread Jeremy Zawodny

On Wed, Oct 24, 2001 at 04:12:27PM +0930, Andrew Braund wrote:
  We've had good luck with ReiserFS.
  
  Jeremy
  -- 
  Jeremy D. Zawodny, [EMAIL PROTECTED]
  Technical Yahoo - Yahoo Finance
  Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936
  
 
 
 
  MySQL 3.23.41-max: up 48 days, processed 1,051,983,004 queries (253/sec. avg)
 
 ^^
 Are these stats from a box running on ReiserFS? 

Yes, they are.

ReiserFS, Software RAID-5, Linux 2.4.9.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 48 days, processed 1,054,409,444 queries (253/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




Printing

2001-10-24 Thread Wix,Christian XCW

Hi!

How print the result from a query on my printer? I'm using the command line
on linux.
Lets say that I want to print everything from the table Mercedes in the
database Cars.

How do I adjust the lenght of the lines?

// Christian  



-
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: Question about left join.

2001-10-24 Thread Matthias Ragaz

This is the second time out of three that I get filtered out.
Couldn't this filter be made a little bit smarter?

At 10:00 24.10.2001, you wrote:
Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

database,sql,query,table

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

Hi Jeff

I think that I had the same problem once. The problem is
that in a row containing NULLs almost every statement is FALSE.

In your case:

d.entrydate  date_add(now(), interval -7 day )

try:

d.entrydate is null or (d.entrydate  date_add(now(), interval -7 day ))

instead.

Sorry, I didnt try this myself. No time at the moment.

Hope it helps anyay.

Matthias


 Example 1. - Nulls returned.
 -
 select u.username Who, ifnull(count(d.username),0) Logs
 from users as u natural left join details as d
 where u.disabled='N'
 group by u.username
 order by 2 desc
 
 Who  Logs
 ---   
 bob  9
 sarah 8
 frank 3
 jane 0
 jack 0
 
 Example 2. - No Nulls returned.
 -
 select u.username Who, ifnull(count(d.username),0) Logs
 from users as u natural left join details as d
 where u.disabled='N'
 and d.entrydate  date_add(now(), interval -7 day )
 group by u.username
 order by 2 desc
 
 Who  Logs
 ---   
 bob  7
 sarah 3
 frank 1


Matthias Ragaz
Informatik - Entwicklung
Schweizerische Bibliothek für Blinde und Sehbehinderte
Albisriederstasse 399
CH-8047 Zürich
Schweiz
Tel.:   +41 1 491 25 55
Fax:+41 1 492 64 75
--

--
Matthias Ragaz
Informatik - Entwicklung
Schweizerische Bibliothek für Blinde und Sehbehinderte
Albisriederstasse 399
CH-8047 Zürich
Schweiz
Tel.:   +41 1 491 25 55
Fax:+41 1 492 64 75
--


-
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-Front can't open some InnoDb tables ***

2001-10-24 Thread Heikki Tuuri

Ansgar,

what could cause the problem Brent reports in MySQL-Front?

InnoDB returns the error Can't open file mytable.InnoDB
when it cannot find the table in its internal data
dictionary. Maybe the case of letters in the database name
is wrong?

Brent,

if you look at the MySQL server error log, something like
'hostname'.err, what does InnoDB say in it?

You could try the MySQL-4.0.0 with your database. Then you could
do

mysql create table innodb_table_monitor (a int) type = innodb;

which makes the MySQL server mysqld (not the client mysql)
to print the contents of InnoDB internal data dictionary
to the standard output.

To see it it is best that you start mysqld-max.exe from the
MS-DOS prompt, not as a service, or not inside a safe_mysqld
wrapper. Actually, when debugging, it is always best to start
mysqld from the MS-DOS prompt because then you see what is
happening.

Regards,

Heikki
http://www.innodb.com/ibman.html

I'm trying out MySQL-Front on a Win2k machine and it  is having a problem 
opening some of my InnoDb tables.

I can open any of my InnoDb tables if I explicitly specify the database 
name in the Connection window. But if I leave the database name blank I'll 
see the database tree in the pane on the left. If I try and select one of 
my InnoDb tables from underneath the database node, I'll get an error 
window saying MySQL Error - 1016 Can't open file mytable.InnoDB'. (errno: 
1).  Clicking on the database name says one or more of the InnoDb tables 
are 0KB.  I know there is data in the tables because I can access them in 
MySQL.  This is the same table that I was able to open in MySQL-Front when 
I specified the database explicitly in the Connection window.

So why does MySQL-Front sometimes have a problem opening InnoDb tables? TIA

Brent 




-
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: Formatting Large amounts of Text into Mysql

2001-10-24 Thread Kodrik

I use this function to cleanup my text.
It converts any weird characters that may cause problems when outputting to 
html with php.
It also converts end of line to br or br / depending on your version of 
php

function cleanup($copy) 
{ 
$copy=trim($copy); 
$copy=htmlspecialchars($copy, ENT_QUOTES); 
$copy=eregi_replace (%, #37;, $copy);  
$copy=eregi_replace (, lt;, $copy); 
$copy=eregi_replace (, gt;, $copy);  
$copy=eregi_replace (amp;, , $copy); 
$copy=nl2br($copy); 
$copy=StripSlashes($copy); 
return($copy); 
} 


On Wednesday 24 October 2001 02:04 am, Steve Meyers wrote:
 Are you sure it doesn't have the line feeds in the database?  Neither MySQL
 nor PHP will strip them out, unless you do some fancy work to make it do
 that.  I would guess that your real problem is that when you display it in
 your HTML, it shows up without returns.  This is standard HTML practice
 -- try running the PHP function nl2br() on the data before displaying it.

 Steve Meyers

  -Original Message-
  From: tim gales [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 23, 2001 9:31 PM
  To: [EMAIL PROTECTED]
  Subject: Formatting Large amounts of Text into Mysql
 
 
  Hi.  I am trying to have type in a story into a form textfield and
  submit it using PHP into blob formatted field mysql database.
 
  When I submit, all the returns are removed and all the text runs
  together like on ebig paragraph.  Is there a way to have mysql or PHP
  recognize the returns and empty lines from the textarea field and
  rememeber them so when I call them up from the database the formatting
  looks just like when I typed it in the text field?
 
  Any help would be very much appreciated.Thank you
  Tim Gales
 
 
  -
  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




Pictures in mysql

2001-10-24 Thread denis . menezes

Hello friends.

I am a newbie in mysql and web programming.

Can someone please tell me where I can find some info on putting pictures
into mysql fields and also how I can use a web interface to add the
pictures to the database.

Thanks
Denis


-
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: select stmt problem

2001-10-24 Thread Kodrik

for one, counts is not a colums, it aggreate values. In your case, since you 
didn't group, all record retrieved will have the same value for count(*), the 
number of record.
So of course you can't order by counts, it's a single value.

On Wednesday 24 October 2001 02:43 am, Carl Troein wrote:
 Teddy A Jasin writes:
  Hi,
  I have this mysql statement:
  select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
  where counts  10 and datesent between '2001-09-24' and '2001-10-24' and
  (returncode  0 and returncode  10) group by hpnumber order by counts
  DESC

-
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: Pictures in mysql

2001-10-24 Thread Kodrik

You should just enter the path to the picture in the database, in a varchar 
field.

On Wednesday 24 October 2001 08:09 am, [EMAIL PROTECTED] wrote:
 Hello friends.

 I am a newbie in mysql and web programming.

 Can someone please tell me where I can find some info on putting pictures
 into mysql fields and also how I can use a web interface to add the
 pictures to the database.

 Thanks
 Denis


 -
 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




Apostrophe In SELECT

2001-10-24 Thread John Abel

Hi,

I am having bother trying to perform a select, that has an apostrophe in 
the value I’m looking for.  Below is the Perl code I’m using.

$SQLStatement = SELECT ID FROM Albums WHERE Name = 
'.$DBHandle-quote($Name).';;
$STLookUpHandle=$DBHandle-prepare($SQLStatement);
$RVSelect=$STLookUpHandle-execute();

$SQLStatement contains the following:

SELECT ID FROM Albums WHERE Name = ''Kill \'Em All'';

And I receive this error:

DBD::mysql::st execute failed: You have an error in your SQL syntax near 
'Kill \'Em All''' at line 1 

Any help would be appreciatred.

Thanks

John

-
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: select stmt problem

2001-10-24 Thread Teddy A Jasin

I did the grouping too... ...group by hpnumber

so what could be wrong?

regards,

Teddy

At 02:13 AM 10/24/2001 -0400, Kodrik wrote:
for one, counts is not a colums, it aggreate values. In your case, since you
didn't group, all record retrieved will have the same value for count(*), the
number of record.
So of course you can't order by counts, it's a single value.

On Wednesday 24 October 2001 02:43 am, Carl Troein wrote:
  Teddy A Jasin writes:
   Hi,
   I have this mysql statement:
   select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
   where counts  10 and datesent between '2001-09-24' and '2001-10-24' and
   (returncode  0 and returncode  10) group by hpnumber order by counts
   DESC

-
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

Teddy A Jasin
Systems Analyst / Administrator
45B, Circular Road
Singapore 049400
Tel: 438 2418
DID: 4386924
Fax: 438 4803
email: [EMAIL PROTECTED]
w w w . e f u s i o n . c o m . s g


-
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: Apostrophe In SELECT

2001-10-24 Thread Patrik Wallstrom

On Wed, 24 Oct 2001, John Abel wrote:

 Hi,

 I am having bother trying to perform a select, that has an apostrophe in
 the value I’m looking for.  Below is the Perl code I’m using.

   $SQLStatement = SELECT ID FROM Albums WHERE Name =
 '.$DBHandle-quote($Name).';;
   $STLookUpHandle=$DBHandle-prepare($SQLStatement);
   $RVSelect=$STLookUpHandle-execute();

 $SQLStatement contains the following:

   SELECT ID FROM Albums WHERE Name = ''Kill \'Em All'';

 And I receive this error:

   DBD::mysql::st execute failed: You have an error in your SQL syntax near
 'Kill \'Em All''' at line 1

 Any help would be appreciatred.

$DBHandle-quote adds the quotes for you, remove them in your
SQL-statement.

--
patrik_wallstrom-foodfight-[EMAIL PROTECTED]+46-706355528


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

2001-10-24 Thread Sommai Fongnamthip

Hi,
If I install mysql-4.0 to upgrade in mysql-3.23.xx with old setting value 
(use myisam type), Could I need to change or re-load my old db?

SF


-
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




Query Analyzer

2001-10-24 Thread Moshe Gurvich

Are there tools for MySQL like MS SQL Query Analyzer, that can analyze and
estimate effectivity of a query?

Or is it possible to approximate execution plan of queries that will be run
on MySQL with above mentioned utility?

Thank you.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001



-
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




Uneven replication nodes??

2001-10-24 Thread Tony

I am looking for a creative way to optimize my web application (largely 
reads) with a transaction firehose on the data input side.  Batch vs. OLTP, 
if you will.

Is there any technical reason why I could not configure the master database 
without indices and the slave(s) _with_ indices?  The intent being to isolate 
the inbound transactions from the reads _and_ make the database inserts as 
simple as possible (e.g. few or no indices).  

Several slaves could be configured to throttle performance on the web side 
(more reads, move slaves, etc.), which could gain a performance edge by 
indexing.  

For disaster recovery of the master, one slave could be untouched and not 
indexed.

I'd be interested to hear comments.

Thanks in advance,
/Tony


-
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




Question about Encrypt function and Windows 2000 (Help a Newbie!)

2001-10-24 Thread Jeb



I am working on a password scheme, however I read in the MySql manual that
if encrypt isn't available, it will return a null set.
This is causing a problem with something I am working on using a windows
2000 machine (with the recent version of MySql for windows platforms),   is
there a similar function that I can use?  or any other suggestions?  or I'm
a just doing something wrong?

The statement I am using is:

mysql select ENCRYPT(hello);
+--+
| ENCRYPT(hello) |
+--+
| NULL |
+--+
1 row in set (0.00 sec)

I may have found a solution using the PASSWORD function, however de-crypting
it may be handy


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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




Re: select stmt problem

2001-10-24 Thread Kodrik

On Wednesday 24 October 2001 05:43 am, you wrote:
 I did the grouping too... ...group by hpnumber

 so what could be wrong?

select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
where counts  10 and datesent between '2001-09-24' and '2001-10-24'
and (returncode  0 and returncode  10) group by hpnumber order by
counts DESC

Well, count(*) is not a column, it is a function of a column.
When it searches, it doesn't know the result of count so you cannot specify 
it in the where clause.

This would work, but you have all the records retrieved, not only the ones 
who have more than 10 in the group:

select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
where datesent between '2001-09-24' and '2001-10-24'
and (returncode  0 and returncode  10) group by hpnumber order by
counts DESC

To do what you want, you would need to do a subquery. That's where 
PostgresSQL has an advantage over it.

Right now, you need to do two steps:
Get all the records with the counts associated to them.
When processing the data, ignores those having a count under 10.

-
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 Encrypt function and Windows 2000 (Help a Newbie!)

2001-10-24 Thread Andrew Murphy

How about using only one-way passwords.   You could check that the encrypted
version of their entry matches the stored password data.   Its much safer
not decrypting anything like passwords.

Andrew

-Original Message-
From: Jeb [mailto:[EMAIL PROTECTED]]
Sent: 24 October 2001 10:41 am
To: mysql_mailing List
Subject: Question about Encrypt function and Windows 2000 (Help a
Newbie!)




I am working on a password scheme, however I read in the MySql manual that
if encrypt isn't available, it will return a null set.
This is causing a problem with something I am working on using a windows
2000 machine (with the recent version of MySql for windows platforms),   is
there a similar function that I can use?  or any other suggestions?  or I'm
a just doing something wrong?

The statement I am using is:

mysql select ENCRYPT(hello);
+--+
| ENCRYPT(hello) |
+--+
| NULL |
+--+
1 row in set (0.00 sec)

I may have found a solution using the PASSWORD function, however de-crypting
it may be handy


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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

-
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




Slow multi-column index

2001-10-24 Thread Philip White

Hello all

Grateful for any help on this -

I have a table (definition for MAIN below) with a number of indexes
corresponding to various frequently used queries.
A SELECT statement using one of the multi-column indexes is running very
slow if it retrieves data that is not in in the index itself. For example, a
SELECT count(*) FROM MAIN WHERE... takes 0.04 seconds, but SELECT
fileName from MAIN WHERE... takes 20 seconds. The table currently has
around 18000 rows, and the DB is around 400MB.

I'm wondering whether this has something to do with the following words of
wisdom in the reference manual:
For tables that changes a lot you should try to avoid all VARCHAR or BLOB
columns. You will get dynamic row length as soon as you are using a single
VARCHAR or BLOB columns.

but I don't see why this should matter. Why does it matter that row lengths
are dynamic ? Surely the index doesn't just specify a row index that is
multiplied by the row length ? Surely it contains some sort of row data
offset to allow for variable row lengths.

If any use, here's the table definition:

CREATE TABLE MAIN
(
 idINT(4) AUTO_INCREMENT PRIMARY KEY,
 addedDateTime DATETIME NOT NULL,
 filePath  VARCHAR(100) NOT NULL,
 fileDateTime DATETIME NOT NULL,
 fileDate  DATE NOT NULL,
 fileName  VARCHAR(255) NOT NULL,
 mediaType  VARCHAR(100) NOT NULL,
 key1   CHAR(32),
 key2   CHAR(32),
 language  CHAR(4),
 headline  BLOB,
 enStory   TEXT,
 searchSlug  TEXT,
 searchCodes  TEXT,
 fileData  LONGBLOB,

 INDEX (filePath, mediaType),
 INDEX (addedDateTime, fileDateTime, fileDate, mediaType, filePath),
 INDEX (fileDate, filePath, mediaType),
 INDEX (fileDate),
 INDEX (fileName),
 INDEX (mediaType),
 INDEX (key1),
 INDEX (key2),
 FULLTEXT (enStory),
 FULLTEXT (searchSlug),
 FULLTEXT (searchCodes)
) TYPE=MYISAM;

and the slow query is something like:

SELECT fileName FROM MAIN WHERE (fileDate='20011021') AND
(filePath='OLWWPICGLSP) AND (mediaType='TEXT');
(~20 seconds)

EXPLAIN says this will use the 3rd index (fileDate, filePath, mediaType)
which looks fine. If the query is changed to:

SELECT fileDate FROM MAIN WHERE (fileDate='20011021') AND
(filePath='OLWWPICGLSP) AND (mediaType='TEXT');
(0.02 seconds)

This is fine because it can get 'fileDate' from the index itself.

So, is it *really* the variable length row lookup that's taking all the time
here ?

Thanks for any help on this,
Phil White



-
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: Pictures in mysql

2001-10-24 Thread johnlucas-Arluna

Yes this is what we're doing.

Just put the pathname to the file into a VarChar field.

As for using the web to add them, I would suggest using ASPUpload(if you are
using ASP), or other similar utility, which allows you to create an upload
form then stores the uploaded file into a directory structure of your
choice.

This works well for us.

-Original Message-
From: Kodrik [mailto:[EMAIL PROTECTED]]
Sent: 24 October 2001 07:16
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Pictures in mysql


You should just enter the path to the picture in the database, in a varchar
field.

On Wednesday 24 October 2001 08:09 am, [EMAIL PROTECTED] wrote:
 Hello friends.

 I am a newbie in mysql and web programming.

 Can someone please tell me where I can find some info on putting pictures
 into mysql fields and also how I can use a web interface to add the
 pictures to the database.

 Thanks
 Denis


 -
 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




looping

2001-10-24 Thread Christian Andersson

Hi there, I have a small question for you all (and yes I have searched the
documents but not be able to found what I want)

Lets say that I have a table with these values 1, 5 and 7
is it possible to create an sql query that will loop through these values
a certain amount of time for example if i wanted 8 rows I would get 1, 5, 7,
1, 5, 7, 1, 5  as output..

I'm currently doing this looping in my application but it would speed things
up if mysql could do this for me..

since I could then do some joins and retrieve values from other tables
faster.

/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: looping

2001-10-24 Thread Kodrik

You can't at this point.
But anyway, it is usually better to make your application do the work than 
your database.
MySQL doesn't process functions faster than you would with arrays (which is 
what it would have to do ) and it's better to take as much load off from your 
database.
Even if you could do it, it wouldn't be faster and it would take a toll on 
your DB, making other simultaneous queries slower, and your whole project 
would be slower.
Whenever possible, have your application process functions for your database. 
A database should concentrate on queryiong the data and your program should 
perform as many functions as possible.


On Wednesday 24 October 2001 07:14 am, Christian Andersson wrote:
 Hi there, I have a small question for you all (and yes I have searched the
 documents but not be able to found what I want)

 Lets say that I have a table with these values 1, 5 and 7
 is it possible to create an sql query that will loop through these values
 a certain amount of time for example if i wanted 8 rows I would get 1, 5,
 7, 1, 5, 7, 1, 5  as output..

 I'm currently doing this looping in my application but it would speed
 things up if mysql could do this for me..

 since I could then do some joins and retrieve values from other tables
 faster.

 /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

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

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




Re: Problem compiling MySQL 4.0 with GCC 3.0.1

2001-10-24 Thread Sinisa Milivojevic

Fournier Jocelyn [Presence-PC] writes:
 Hi,
 
 I know this problem has already been reported (but I don't remember the
 solution :( ) :
 
 I encounter the following error after installing gcc 3.0.1 and trying to
 compile MySQL 4.0 :
 
 mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x14): undefined reference to
 `__cxa_pure_virtual'
 mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x18): undefined reference to
 `__cxa_pure_virtual'
 mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x30): undefined reference to
 `__cxa_pure_virtual'
 collect2: ld returned 1 exit status
 gmake[2]: *** [mysqlbinlog] Error 1
 
 What should I do to make MySQL compile ?
 
 Thank you !
 
 Jocelyn Fournier
 Presence-PC

Hi!

Edit client/Makefile and sql/Makefile and set 

CXXLD=g++

That is all.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


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

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




Re: Slow multi-column index

2001-10-24 Thread Philip White


 So, is it *really* the variable length row lookup that's taking all the
time
 here ?

 I don't see how. 18000 record is nothing and varchar searches are pretty
fast.
 On top of that, you first search is on the date which would be extremelly
 fast and narrow the next searches to many less records.

 Are you sure it is the database that is slow to retrieve your result or
could
 it be with other code you have around the database but within you time
 markers?

Hi - yes, it really is the SELECT statement that's taking the time. The
timings I gave are directly from the mysql command line, ie. reported by
mysql.exe itself, not my code. By the way, only around 60 rows are returned
by the query.

I'm sure you're right, that VARCHAR searches are fast, since the 2nd query
(SELECT fileDate...) is near instantaneous and is searching on the same
VARCHAR columns as the slow one.
The difference between the slow  fast queries seems to be the fact that the
slow one is having to retrieve the row data from the table rather than the
index itself.

When an index 'returns' a query match, does it also contain some sort of
lookup into the table to allow the row itself to be retrieved ? Or, if rows
are variable length, does MySQL have to do a linear scan through the
database to find the row ? That's what I'm wondering because of the
reference manual warning about variable length rows.

Thanks



 On Wednesday 24 October 2001 06:52 am, Philip White wrote:
  Hello all
 
  Grateful for any help on this -
 
  I have a table (definition for MAIN below) with a number of indexes
  corresponding to various frequently used queries.
  A SELECT statement using one of the multi-column indexes is running very
  slow if it retrieves data that is not in in the index itself. For
example,
  a SELECT count(*) FROM MAIN WHERE... takes 0.04 seconds, but SELECT
  fileName from MAIN WHERE... takes 20 seconds. The table currently has
  around 18000 rows, and the DB is around 400MB.
 
  I'm wondering whether this has something to do with the following words
of
  wisdom in the reference manual:
  For tables that changes a lot you should try to avoid all VARCHAR or
BLOB
  columns. You will get dynamic row length as soon as you are using a
single
  VARCHAR or BLOB columns.
 
  but I don't see why this should matter. Why does it matter that row
lengths
  are dynamic ? Surely the index doesn't just specify a row index that
is
  multiplied by the row length ? Surely it contains some sort of row data
  offset to allow for variable row lengths.
 
  If any use, here's the table definition:
 
  CREATE TABLE MAIN
  (
   idINT(4) AUTO_INCREMENT PRIMARY KEY,
   addedDateTime DATETIME NOT NULL,
   filePath  VARCHAR(100) NOT NULL,
   fileDateTime DATETIME NOT NULL,
   fileDate  DATE NOT NULL,
   fileName  VARCHAR(255) NOT NULL,
   mediaType  VARCHAR(100) NOT NULL,
   key1   CHAR(32),
   key2   CHAR(32),
   language  CHAR(4),
   headline  BLOB,
   enStory   TEXT,
   searchSlug  TEXT,
   searchCodes  TEXT,
   fileData  LONGBLOB,
 
   INDEX (filePath, mediaType),
   INDEX (addedDateTime, fileDateTime, fileDate, mediaType, filePath),
   INDEX (fileDate, filePath, mediaType),
   INDEX (fileDate),
   INDEX (fileName),
   INDEX (mediaType),
   INDEX (key1),
   INDEX (key2),
   FULLTEXT (enStory),
   FULLTEXT (searchSlug),
   FULLTEXT (searchCodes)
  ) TYPE=MYISAM;
 
  and the slow query is something like:
 
  SELECT fileName FROM MAIN WHERE (fileDate='20011021') AND
  (filePath='OLWWPICGLSP) AND (mediaType='TEXT');
  (~20 seconds)
 
  EXPLAIN says this will use the 3rd index (fileDate, filePath, mediaType)
  which looks fine. If the query is changed to:
 
  SELECT fileDate FROM MAIN WHERE (fileDate='20011021') AND
  (filePath='OLWWPICGLSP) AND (mediaType='TEXT');
  (0.02 seconds)
 
  This is fine because it can get 'fileDate' from the index itself.
 
  So, is it *really* the variable length row lookup that's taking all the
  time here ?
 
  Thanks for any help on this,
  Phil White
 
 
 
  -
  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 

Re: Slow multi-column index

2001-10-24 Thread DL Neil

Hi Phil,
I suspect you have already answered your own question!
Warning: high ignorance factor - am currently researching indexes for myself - if I 
can't figure it out for myself, you
can help me with that later...

When the SELECT can, it will answer a query from a scan-of/data-retrieval-from the 
index file(s) alone. Under such
conditions it will respond v.quickly - this applies to two of your examples:

   SELECT count(*) FROM MAIN WHERE...
   SELECT fileDate...

the latter being fulfilled from your

   INDEX (fileDate),

- which incidentally looks superfluous because wouldn't any query on the fileDate 
index be equally well covered under
the previously defined

   INDEX (fileDate, filePath, mediaType),

You point to the above being fine and dandy, but performance problems resulting 
whenever the actual data table is
required/accessed to provide the data. In this there is only evidence from one 
data-selecting query (ie a SELECT that
cannot be entirely satisfied by data held in the indexes). Do you experience 
equivalently long response times from other
such queries?

Another part that you may have self-answered was to do with variable length 
fields/rows and rate of inserts. Is it worth
trying a reorg (ie to produce a 'state' of zero inserts) and then comparing 'before' 
and 'after' response times? [really
high ig-factor here! such an action is usually designed to improve the b-trees in the 
indexes, and I'm not at all sure
of its effect on the layout of a data table with heavy use of variable length fields]

Because of exactly this 'fear' (if not 'issue') a device I have used in the past (but 
not in MySQL) was to move the
variable length stuff to a separate table, and keep the rest/not too much variable-len 
in the 'main table'. Ok the
absolute one-to-one relationship means that this involves de-normalising the database, 
but such would be 'legitimised'
if it helps cope with a performance bind (don't tell the RDB-police though!)

Make any sense?
=dn


  So, is it *really* the variable length row lookup that's taking all the
 time
  here ?
 
  I don't see how. 18000 record is nothing and varchar searches are pretty
 fast.
  On top of that, you first search is on the date which would be extremelly
  fast and narrow the next searches to many less records.
 
  Are you sure it is the database that is slow to retrieve your result or
 could
  it be with other code you have around the database but within you time
  markers?

 Hi - yes, it really is the SELECT statement that's taking the time. The
 timings I gave are directly from the mysql command line, ie. reported by
 mysql.exe itself, not my code. By the way, only around 60 rows are returned
 by the query.

 I'm sure you're right, that VARCHAR searches are fast, since the 2nd query
 (SELECT fileDate...) is near instantaneous and is searching on the same
 VARCHAR columns as the slow one.
 The difference between the slow  fast queries seems to be the fact that the
 slow one is having to retrieve the row data from the table rather than the
 index itself.

 When an index 'returns' a query match, does it also contain some sort of
 lookup into the table to allow the row itself to be retrieved ? Or, if rows
 are variable length, does MySQL have to do a linear scan through the
 database to find the row ? That's what I'm wondering because of the
 reference manual warning about variable length rows.

 Thanks

 
 
  On Wednesday 24 October 2001 06:52 am, Philip White wrote:
   Hello all
  
   Grateful for any help on this -
  
   I have a table (definition for MAIN below) with a number of indexes
   corresponding to various frequently used queries.
   A SELECT statement using one of the multi-column indexes is running very
   slow if it retrieves data that is not in in the index itself. For
 example,
   a SELECT count(*) FROM MAIN WHERE... takes 0.04 seconds, but SELECT
   fileName from MAIN WHERE... takes 20 seconds. The table currently has
   around 18000 rows, and the DB is around 400MB.
  
   I'm wondering whether this has something to do with the following words
 of
   wisdom in the reference manual:
   For tables that changes a lot you should try to avoid all VARCHAR or
 BLOB
   columns. You will get dynamic row length as soon as you are using a
 single
   VARCHAR or BLOB columns.
  
   but I don't see why this should matter. Why does it matter that row
 lengths
   are dynamic ? Surely the index doesn't just specify a row index that
 is
   multiplied by the row length ? Surely it contains some sort of row data
   offset to allow for variable row lengths.
  
   If any use, here's the table definition:
  
   CREATE TABLE MAIN
   (
idINT(4) AUTO_INCREMENT PRIMARY KEY,
addedDateTime DATETIME NOT NULL,
filePath  VARCHAR(100) NOT NULL,
fileDateTime DATETIME NOT NULL,
fileDate  DATE NOT NULL,
fileName  VARCHAR(255) NOT NULL,
mediaType  VARCHAR(100) NOT NULL,
key1   CHAR(32),
key2   CHAR(32),
language  CHAR(4),

Re: Length limit of 500 on primary keys?

2001-10-24 Thread Dan Nelson

In the last episode (Oct 23), Jeremy Zawodny said:
 On Mon, Oct 22, 2001 at 11:42:23AM -0600, Steve Meyers wrote:
  If you use a good 64-bit hash, I doubt you'll run into any
  uniqueness problems.  MySQL will support that as a 64-bit BIGINT.
  You especially should not have any problems if you hash each column,
  then do the primary key across the four hashes.
 
 Good to know.  I wonder how many collisions I'd find if I ran it over
 every URL listed in the directory www.yahoo.com.
 
 Which 64 bit hash function did you use?  Invent your own, or something
 off the shelf?

I use md5.  128 bits (use the first 64 if that's all you need), and
there's a mysql builtin so if you're using a language that doesn't have
an MD5 routine, you can still generate the hash.

-- 
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: Tree in SQL

2001-10-24 Thread Dan Nelson

In the last episode (Oct 22), Daniel _a_ said:
 I have a table in database which describes tree structure of article groups.
 In this table I have:
 1. group_id - group identifier
 2. parent_group_id - identifier of parent group
 I need to select history, from top to wanted group.
 I can't change the database design and ofcourse this is MySQL 3.23 database.
 Can somebody help me ?

You'll have to do multiple selects.  Loop:

select parent_group_id from table where group_id = :myid
:myid = parent_group_id

Stop when myid == the ID of the top of the tree.

-- 
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: Query Analyzer

2001-10-24 Thread Sinisa Milivojevic

Moshe Gurvich writes:
 Are there tools for MySQL like MS SQL Query Analyzer, that can analyze and
 estimate effectivity of a query?
 
 Or is it possible to approximate execution plan of queries that will be run
 on MySQL with above mentioned utility?
 
 Thank you.
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
 
 
 

Hi!

In order to find out how MySQL will process a query, run EXPLAIN on
the query.

If you would like to know how to improve stuff, add ..procedure
analyse at the end of your query.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


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

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




Re: GNU question

2001-10-24 Thread Sinisa Milivojevic

Anthony Evans writes:
 Hi all,
 
 I am using the MySQL book by Paul DuBois. Apparently on page 74 mysql has
 the GNU Readline library built in. When trying an input edit command such as
 'Up arrow, Ctrl-P' to recall the previous line when I am at the Dos prompt
 within MySQL all I ever get is a right triangle. None of the commands seem
 to work, they only ever come up with the right triangle.
 
 What am I doing wrong ?
 
 Your help would be most appreciated.
 
 Regards,
 
 Anthony

Use mysqlc.exe, while first copying cygwin.dll to DLL directory.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.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




Problems Compiling 4.0.0-alpha (fwd)

2001-10-24 Thread Ed Coates


I submitted this back on the 6th of October, and never got a reply to it,
so I'll try one more time in hopes that someone can help me with this
compilation problem.

I've got a Dual Pentium 233MHz with 64MB of RAM loaded with SuSE Linux 7.1
and gcc-2.95.2.  I'm running the 2.4.7 kernel, and I have no problems
compiling the 3.23.x version of MySQL, but with the new alpha version,
I'm having the following problem.  Here are the config options for it,
followed by the errors:

./configure --prefix=/usr/local/mysql --with-innodb
--with-berkeley-db=/usr/local/BerkeleyDB.3.2

Here is the error that I get when it's compiling in the libmysql
directory:

gcc -O3 -DDBUG_OFF -mcpu=pentiumpro -march=pentiumpro -DCPU=pentiumpro
-rdynamic -o conf_to_src conf_to_src.o -lz -lcrypt -lnsl -lm
./conf_to_src ..  latin1  \
  ./ctype_extra_sources.c
make[2]: *** [ctype_extra_sources.c] Error 132
make[2]: Leaving directory `/usr/src/mysql-4.0.0-alpha/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mysql-4.0.0-alpha'
make: *** [all-recursive-am] Error 2

If I type make again, here's what comes up:

gcc -DDEFAULT_CHARSET_HOME=\/usr/local/mysql\
-DDATADIR=\/usr/local/mysql/var\
-DSHAREDIR=\/usr/local/mysql/share/mysql\ -DUNDEF_THREADS_HACK
-DDONT_USE_RAID -I./../include -I../include -I./.. -I.. -I.. -O3
-DDBUG_OFF -mcpu=pentiumpro -march=pentiumpro -DCPU=pentiumpro -c ctype.c
-fPIC -DPIC -o .libs/ctype.lo
In file included from ctype.c:27:
ctype_autoconf.c:9: `ctype_latin1' undeclared here (not in a function)
ctype_autoconf.c:9: initializer element is not constant
ctype_autoconf.c:9: (near initialization for `compiled_charsets[0].ctype')
ctype_autoconf.c:10: `to_lower_latin1' undeclared here (not in a function)
ctype_autoconf.c:10: initializer element is not constant
ctype_autoconf.c:10: (near initialization for
`compiled_charsets[0].to_lower')
ctype_autoconf.c:11: `to_upper_latin1' undeclared here (not in a function)
ctype_autoconf.c:11: initializer element is not constant
ctype_autoconf.c:11: (near initialization for
`compiled_charsets[0].to_upper')
ctype_autoconf.c:12: `sort_order_latin1' undeclared here (not in a
function)
ctype_autoconf.c:12: initializer element is not constant
ctype_autoconf.c:12: (near initialization for
`compiled_charsets[0].sort_order')
make: *** [ctype.lo] Error 1

Can anyone tell me why this won't compile in my machine?

Ed


-
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 question.

2001-10-24 Thread Tran, Quoc B.

Hello,
I am using phpMyAdmin which is MySQL database to create database. My OS is
windows 2000.
For example, I have a table City. It generates for me 3 files: City.frm,
City.MYD, City.MYI
My question is how I can connect to this table to do query, insert.by
using Java or Visual basic.
Thanks for your help.

Quoc Tran


-
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 question.

2001-10-24 Thread alec . cawley




 I am using phpMyAdmin which is MySQL database to create database. My OS
is
 windows 2000.
 For example, I have a table City. It generates for me 3 files: City.frm,
 City.MYD, City.MYI
 My question is how I can connect to this table to do query, insert.by
 using Java or Visual basic.

For Java, download the mm.mysql JDBC driver from
http://sourceforge.net/projects/mmmysql/. This is an implementation for
MySQL of the java.sql package which is documented in the in the standard
Sun distribution.

 Alec Cawley



-
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:MySQL-Front can't open some InnoDb tables ***

2001-10-24 Thread Ansgar Becker

Hi *.*

 what could cause the problem Brent reports in MySQL-Front?

 InnoDB returns the error Can't open file mytable.InnoDB
 when it cannot find the table in its internal data
 dictionary. Maybe the case of letters in the database name
 is wrong?

Sorry, I don't know..
On win32-hosts letter case doesn't matter, but I don't know if his server
runs on win32 or something else.

Greetings,
Ansgar Becker


-
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: select ... on empty innobase tables crashes MySQL-Server

2001-10-24 Thread Heikki Tuuri

Hi!

At 10:38 PM 10/23/01 -0700, you wrote:
On Tue, Oct 23, 2001 at 01:43:32PM +0300, Heikki Tuuri wrote:
 Hi!
 
 Thank you for a detailed bug report.  This bug is already fixed in
 the source release 3.23.43b available from http://www.innodb.com

Is there now a test case for it in the MySQL test suite, too?

Sorry, not yet. I test InnoDB with a bunch of multithreaded
randomized stress tests which I have written in Perl.

The idea behind MySQL's standard tests is that they prevent
an old bug from reappearing when source code is changed. But
my experience is that old bugs do not reappear. It is
completely new bugs which are introduced into the source
code when new code is written. Randomized stress tests will
catch some of new bugs.

There is a lot of validation and assertion code when you compile
InnoDB with the debug options switched on in
/innobase/include/univ.i. Then InnoDB spends 99 % of CPU time
running the validations. These validations will also catch
some of new bugs. For example, if UNIV_SYNC_DEBUG is defined,
then InnoDB checks the latching order of semaphores during
execution. Each semaphore is assigned a rank, and the semaphores
must be acquired in the order of a descending rank.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 48 days, processed 1,051,760,607 queries (253/sec. avg)

Regards,

Heikki
http://www.innodb.com



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

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




RE: Pictures in mysql

2001-10-24 Thread Mike Grabski

as someone suggested, if you have ASP, you can get an upload module. if you
have php 4, you already have full capability to upload images, either using
FTP, or if your server will let you copy from the temporary directories, for
instance:

page 1 has a form that allows you to select an image on your harddrive, in a
variable called fileupload.

the form target has a script similar to this:
if(!$fileupload = none) {
copy($fileupload,[target]);
unlink($fileupload);
}

at the same time, you can simply insert [target] reference into your mySQL
database. the above will only work, of course, if you have the correct
permissions on the server's temp folder.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 8:10 AM
To: [EMAIL PROTECTED]
Subject: Pictures in mysql


Hello friends.

I am a newbie in mysql and web programming.

Can someone please tell me where I can find some info on putting pictures
into mysql fields and also how I can use a web interface to add the
pictures to the database.

Thanks
Denis


-
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




SCO OpenServer 5.0.x and Mysql DBI Driver

2001-10-24 Thread Scott Powell

Hello all,

I'm the poor guy trying to get Perl talking to a MySQL database on SCO
OpenServer 5.0.5. I've managed to get the binary distributions of MySQL
3.23.43 working, as well as DBI-1.20 installed. However, I cannot get
the MySQL driver working. It compiles, but the 'make test' returns the
following:

PERL_DL_NONLAZY=1 /usr/bin/perl -I../blib/arch -I../blib/lib
-I/usr/loca
l/lib/perl5/5.00503/i386-sco -I/usr/local/lib/perl5/5.00503 -e 'use
Test::Harnes
s qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/00baseinstall_driver(mysql) failed: Can't load
'../blib/arch/auto/
DBD/mysql/mysql.so' for module DBD::mysql: dynamic linker:
/usr/bin/perl: reloca
tion error: symbol not found: getrusage at
/usr/local/lib/perl5/5.00503/i386-sco
/DynaLoader.pm line 169.

 at (eval 1) line 3
Perhaps a required shared library or dll isn't installed where expected
 at t/00base.t line 38
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay

All of the tests fail this way. I've tried recompiling different version
of Perl, as well as using the skunware binary version from SCO (I've
tried skunkware 5.005_03 and 5.005_04, as well as a freshly compiled
version of 5.6.1). Additionally I've tried cc vs gcc and dynamic vs
static linking. I've seen several references to this problem on various
newsgroups, but can not find a solution. If anybody knows a workaround,
then I would be greatly appreciative.

Thanks,

Scott Powell
Unix Systems Engineer
H.O. Systems, Inc.


-
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




Link error : where is compress ?

2001-10-24 Thread M. A. Alves

Hello.

I am linking with libmysqlclient as told by the MySQL Manual. However I am
getting the following linker error messages:

/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
`my_compress_alloc':
my_compress.o(.text+0xbb): undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
`my_uncompress':
my_compress.o(.text+0x12a): undefined reference to `uncompress'

What am I missing?

Thanks a lot,

-- 
   ,
 M A R I O   data miner, LIACC, room 221   tel 351+226078830, ext 121
 A M A D O   Rua Campo Alegre, 823 fax 351+226003654
 A L V E S   P-4150 PORTO, Portugalmob 351+939354002



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

2001-10-24 Thread Bill Adams

Sommai Fongnamthip wrote:

 Hi,
 If I install mysql-4.0 to upgrade in mysql-3.23.xx with old setting value
 (use myisam type), Could I need to change or re-load my old db?

AFAIK, If you are keeping the table type, you can just copy the .MYI, .MYD, and .frm
files to the new location.  Or leave them where they are and point 4.0 to them.

b.



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

2001-10-24 Thread Bill Adams

Wix,Christian XCW wrote:

 Hi!

 How print the result from a query on my printer? I'm using the command line
 on linux.
 Lets say that I want to print everything from the table Mercedes in the
 database Cars.

Pipes.

 How do I adjust the lenght of the lines?

man nenscript

Basically:
echo SELECT * FROM Mercedes |mysql Cars |nenscript




-
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




Spontaneous restarting of mysqld

2001-10-24 Thread Andrey Zhiblovsky

Hello All.
Advise, plz.

When some inquires, mysql says:

ERROR 2013: Lost Connection to MySQL server during query

I repeat my query and result is good after follow message:

ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database: database

In log file at this time:

/usr/local/mysql/bin/mysqld, Version: 3.22.32-log, Started with:
Tcp port: 3306 Unix socket: /tmp/mysql.sock
Time Id Command Argument

Why? May be some starting variables can help? I have external program, which
call mysql and at that moment (I think) that program getting stuck.

Andrey.


-
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




Table Crashes Constantly on prod server!!

2001-10-24 Thread Michael Blood

I am running 3.23.40 on a dual pentium III 800 with 1 GB Ram.

I have been getting an table handler returns error 127 error

If I fix the table with myisamchk -r or -o it will work for a while and then
I will get the same error again.

Here are some of the stats on the table
rows:1126904
index len 48091136
auto inc:1819060

table size(MYD):166 MB
index size(MYI):48 MB


The table has a big int, primary key, auto increment

here is the out put from a myisamchk -r

- recovering (with sort) MyISAM-table '../var/table.MYI'
Data records: 1126904
- Fixing index 1
Found link that points at 166818084 (outside data file) at 73992880
Found link that points at 166818044 (outside data file) at 83991788
Found link that points at 166818064 (outside data file) at 125436372
- Fixing index 2
- Fixing index 3
Data records: 1126901

Index 1 is the primary key on the bigint, auto increment column.



Another point I have a varchar field which has an index on it.

I have heard that this can cause some problems but it has never been an
issue before.

Load average on the server is low 90-95% idle cpu.
However mysqld is consistently using about 30% of the Memory and total
utilization of memory on the server is holding about 85% of standard memory
but 0.2% of swap used.

Could this have anything to do with the settings for the server?


Thanks for any help
Michael Blood


+--+---+
| Variable_name| Value |
+--+---+
| Aborted_clients  | 2491  |
| Aborted_connects | 5 |
| Bytes_received   | 153499291 |
| Bytes_sent   | 482722726 |
| Connections  | 3012  |
| Created_tmp_disk_tables  | 8 |
| Created_tmp_tables   | 54|
| Created_tmp_files| 2 |
| Delayed_insert_threads   | 1 |
| Delayed_writes   | 114   |
| Delayed_errors   | 0 |
| Flush_commands   | 20|
| Handler_delete   | 76317 |
| Handler_read_first   | 9743  |
| Handler_read_key | 7400844   |
| Handler_read_next| 8428214   |
| Handler_read_prev| 0 |
| Handler_read_rnd | 29873 |
| Handler_read_rnd_next| 190413426 |
| Handler_update   | 123277|
| Handler_write| 6176687   |
| Key_blocks_used  | 249376|
| Key_read_requests| 80361241  |
| Key_reads| 173557|
| Key_write_requests   | 15295279  |
| Key_writes   | 1161751   |
| Max_used_connections | 27|
| Not_flushed_key_blocks   | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables  | 40|
| Open_files   | 78|
| Open_streams | 0 |
| Opened_tables| 1163  |
| Questions| 398056|
| Select_full_join | 744   |
| Select_full_range_join   | 0 |
| Select_range | 758   |
| Select_range_check   | 0 |
| Select_scan  | 4916  |
| Slave_running| OFF   |
| Slave_open_temp_tables   | 0 |
| Slow_launch_threads  | 0 |
| Slow_queries | 65|
| Sort_merge_passes| 0 |
| Sort_range   | 226   |
| Sort_rows| 29639 |
| Sort_scan| 753   |
| Table_locks_immediate| 674329|
| Table_locks_waited   | 74|
| Threads_cached   | 5 |
| Threads_created  | 114   |
| Threads_connected| 14|
| Threads_running  | 1 |
| Uptime   | 34266 |



-
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: DATA DIRECTORY bug on Win32

2001-10-24 Thread Miguel Angel Solórzano

At 14:24 24/10/2001 +0400, Mike Blazer wrote:
Hi Mike,

Thanks for the bug report.
The explanation why the insert command doesn't works on Win32,
is because the link file pointing for the DATA DIRECTORY wasn't
created in the create table command, like the Unix version does.
The Win32 OSs don't have a native symbolic link feature and the
today symbolic link support on Win32 is made creating a plain text
file with the extension *.sym on \data directory and contains the
path of the whole database.
Then DATA DIRECTORY feature should be handled in a different way
on Win32 than is made on Unix.

Regards,
Miguel
Hello guys!
I'm sorry to report a small problem with the newest MySQL-4.0.0 that
looks like a bug for me.
This is a very-very nice and awaited feature DATA/INDEX DIRECTORY in the
CREATE TABLE statement. On my Win95 it creates .MYD file but
immediatelly fails in the 1st INSERT statement reporting

g:\mysql-4.0.0\binmysqlc ranks  G:\_patrick\test1.sql
ERROR 1105 at line 32: File '.\ranks\test1.MYD' not found (Errcode: 2)

Line 32 is the first INSERT.

I tried to import an SQL file with

CREATE TABLE test1 (
...
)TYPE=MyISAM MAX_ROWS=4294967295 PACK_KEYS=1
   DATA DIRECTORY=G:\\mysql-4.0.0\\data\\r2;

INSERT INTO test1 VALUES ('referer - pages per
visitor',998092800,1,1,28,38,6,26);
etc.

The file was created by mysqldump - so, no errors, I just added

   DATA DIRECTORY=G:\\mysql-4.0.0\\data\\r2;

Yes, I tried it both in Win32 and forward-slash form like

   DATA DIRECTORY=G:/temp;

same error.

And it kinda could not understand any relative path at all

   DATA DIRECTORY=./r2;
gives
ERROR 1103 at line 11: Incorrect table name './r2'

   DATA DIRECTORY=r2;
gives
ERROR 1103 at line 11: Incorrect table name 'r2'

In the last two cases even .MYD file has never been created.

That's it.

Thanks... and many thanks - to all of you at Mysql AB

Mike Blazer /Perl developer/

-
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

-- 
For technical support contracts, goto https://order.mysql.com/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Miguel A. Solórzano [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Mogi das Cruzes - São Paulo, Brazil
___/   www.mysql.com


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

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




RE: select stmt problem

2001-10-24 Thread Steve Meyers

 Well, count(*) is not a column, it is a function of a column.
 When it searches, it doesn't know the result of count so you 
 cannot specify 
 it in the where clause.
 
 This would work, but you have all the records retrieved, not only 
 the ones 
 who have more than 10 in the group:
 
 select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
 where datesent between '2001-09-24' and '2001-10-24'
 and (returncode  0 and returncode  10) group by hpnumber order by
 counts DESC
 
 To do what you want, you would need to do a subquery. That's where 
 PostgresSQL has an advantage over it.
 
 Right now, you need to do two steps:
 Get all the records with the counts associated to them.
 When processing the data, ignores those having a count under 10.
 

Usually, when somebody suggests that you need a subquery in a SELECT statement, 
they're just plain wrong.  In my experience, I've never run across a real-world nested 
SELECT that couldn't be expressed a different (and more efficient) way.  For deletes 
and updates, the nested SELECT's are much more useful.

In this case, you need to put your clause counts  10 in a HAVING clause.  Try this:

select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs
where datesent between '2001-09-24' and '2001-10-24' and 
(returncode  0 and returncode  10) group by hpnumber HAVING counts  10 order by 
counts DESC

Steve Meyers



-
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




Sessions

2001-10-24 Thread Ing. Gustavo Edelstein


 Dear members,

 How to know how many connections are established using the MySQL ODBC
driver ?

 Thanks.

 Ing. Gustavo A. Edelstein
 Tech. Mgr.
 Equiplus Argentina S.A.
 __
 Visit us On Line at www.equiplus.com
 Email addresses:
 Operations: [EMAIL PROTECTED]
 Consulting: [EMAIL PROTECTED]
 Technical: [EMAIL PROTECTED]
 Web related: [EMAIL PROTECTED]
 General: [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




Creating InnoDB tables

2001-10-24 Thread Demirchyan Oganes-AOD098

Hello everyone, 

I really need your help.  I have been stuck for couple of days on trying to setup 
MySQL server such, that it supports InnoDB tables.  First of all I copy the following 
into my.ini after [mysqld]

innodb_data_file_path = ibdata1:2000M
innodb_data_home_dir = c:\ibdata
set-variable = innodb_mirrored_log_groups=1
innodb_log_group_home_dir = c:\iblogs
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=30M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_arch_dir = c:\iblogs
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=80M
set-variable = innodb_additional_mem_pool_size=10M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50

I manually create iblogs and ibdata folders.  I save the .ini file.  Then I try to 
install mysqld-max-nt service by 
Typing c:\program files\mysql\bin\mysqld-max-nt --install  It fails to install the 
service.

In addition if I shut down my server, and fire it up again it won't start.  As soon As 
I get rid of the new parameters except the innodb data file path, it starts working 
again.

Does anyone knows what is going on.  I'm using mysql 3.23.39 on Win2000.  All I want 
is to be able to make it so that I can work with InnoDB as oppose to MYISAM as default.

Regards,


Oganes Demirchyan
Motorola Life Science
757 S.Raymond
Pasadena, CA  91105
Tel: 626-584-5900
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




RE: Slow multi-column index

2001-10-24 Thread Steve Meyers

 I'm wondering whether this has something to do with the following words of
 wisdom in the reference manual:
 For tables that changes a lot you should try to avoid all VARCHAR or BLOB
 columns. You will get dynamic row length as soon as you are using a single
 VARCHAR or BLOB columns.
 
 but I don't see why this should matter. Why does it matter that 
 row lengths
 are dynamic ? Surely the index doesn't just specify a row index that is
 multiplied by the row length ? Surely it contains some sort of row data
 offset to allow for variable row lengths.
 
 

I've seen it happen -- we had a table that was taking 2-3 seconds for a keyed lookup, 
and it should have been in the miniscule range.  We OPTIMIZEd the table, and after 
that the queries in question executed in 0.1 or 0.2 sec.  However, this was after 
several months of abuse -- it shouldn't be the case on a newly created table.

Steve Meyers



-
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




Sessions

2001-10-24 Thread Ing. Gustavo Edelstein

Dear members,
How to know how many sessions are currently open against a MySQL database ?
Thanks.

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com 
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [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 InnoDB tables

2001-10-24 Thread Butch Bean


First try:

mysqld-max-nt -remove

When its the first time running use:

mysqld-max-nt --standalone

-So you can see what is happening...

Shutdown

Then:
mysqld-max-nt -install

Restart as a service.

I just went through this last night...

Butch Bean


-Original Message-
From: Demirchyan Oganes-AOD098 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: Creating InnoDB tables


Hello everyone,

I really need your help.  I have been stuck for couple of days on trying to
setup MySQL server such, that it supports InnoDB tables.  First of all I
copy the following into my.ini after [mysqld]

innodb_data_file_path = ibdata1:2000M
innodb_data_home_dir = c:\ibdata
set-variable = innodb_mirrored_log_groups=1
innodb_log_group_home_dir = c:\iblogs
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=30M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_arch_dir = c:\iblogs
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=80M
set-variable = innodb_additional_mem_pool_size=10M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50

I manually create iblogs and ibdata folders.  I save the .ini file.  Then I
try to install mysqld-max-nt service by
Typing c:\program files\mysql\bin\mysqld-max-nt --install  It fails to
install the service.

In addition if I shut down my server, and fire it up again it won't start.
As soon As I get rid of the new parameters except the innodb data file path,
it starts working again.

Does anyone knows what is going on.  I'm using mysql 3.23.39 on Win2000.
All I want is to be able to make it so that I can work with InnoDB as oppose
to MYISAM as default.

Regards,


Oganes Demirchyan
Motorola Life Science
757 S.Raymond
Pasadena, CA  91105
Tel: 626-584-5900
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: Sessions

2001-10-24 Thread Woolsey, Fred

A quick check of a MyODBC connection made from Access 2000 to a MySQL
database (with 5 tables open) shows as a single process in WinMySQLAdmin...
the total connections show up as 3 (including the WinMySQLAdmin connection,
I assume).  Bumping that up to ten open tables and one open query increases
the connections to 5... opening 4 more queries leaves the number of
connections at 5...

Not very scientific, but I hope it helps.

Cheers,
Fred Woolsey

-Original Message-
From: Ing. Gustavo Edelstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 11:56 AM
To: [EMAIL PROTECTED]
Subject: Sessions



 Dear members,

 How to know how many connections are established using the MySQL ODBC
driver ?

 Thanks.

 Ing. Gustavo A. Edelstein
 Tech. Mgr.
 Equiplus Argentina S.A.
 __
 Visit us On Line at www.equiplus.com
 Email addresses:
 Operations: [EMAIL PROTECTED]
 Consulting: [EMAIL PROTECTED]
 Technical: [EMAIL PROTECTED]
 Web related: [EMAIL PROTECTED]
 General: [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




quotes

2001-10-24 Thread Gregory Jon Welling/Parts Trading Inc.

This is more of a php problem than mysql, but since I am using them in
combo...

I have a database for people from the former Soviet Union that have
participated in a certain program.  One of the fields represents the name of
their company.  It is common (although not universal) practice to use quotes
when writing the name of your company, (i.e.  Limited Liability Company
Widgetron).  Anyhow, one of the scripts that I am using has ? echo
$companyname;?
It works great when the person isn't using quotes in the company name, but
when they are the quoted part disappears.  If everyone was using quotes, I
think I could deal with the problem (however, that the quotes don't include
the whole field is somewhat troubling).  If no one was using quotes, there
would be no problem.  How do I write a script that detects the presence of
quotes and based on their presence or absence decides how to format them.

Thanks in advance,

GW



-
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_errno: 1015, can't lock file(errno: -30989)

2001-10-24 Thread Kalok Lo

I've encountered this problem several times on complicated queries that
return no rows.
mysql_errno:1015
mysql_error:Can't lock file (errno: -30989)

After this error, I can't run queries to any associated tables, and the only
I know how to get around it is to restart mysqld.

Does anyone know why this is ?


-
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: Length limit of 500 on primary keys?

2001-10-24 Thread Shankar Unni

Steve Meyers wrote:

  In a previous message, I failed to mention one of the main reasons you
  would NOT want to use a 500-character primary key.  MySQL uses a key
  buffer to keep as much index information in memory as possible.  The
  longer the key, the less info it can keep in memory, and the more
  often it will have to swap to disk.  If your key doesn't fit in the
  key buffer, my tests have shown that there is a HUGE performance loss.

That's a very good point - thanks for bringing it up.  I'll bring it to the 
attention of the table's owner. Thanks for the ammo..

(Fortunately, this table isn't very big..)
--
Shankar.


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

2001-10-24 Thread DL Neil

 How to know how many sessions are currently open against a MySQL database ?


Gustavo,

MySQL manual 7.28 SHOW Syntax

Regards,
=dn



-
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: SCO OpenServer 5.0.x and Mysql DBI Driver

2001-10-24 Thread Boyd Lynn Gerber

On Wed, 24 Oct 2001, Scott Powell wrote:
 Hello all,
 I'm the poor guy trying to get Perl talking to a MySQL database on SCO
 OpenServer 5.0.5. I've managed to get the binary distributions of MySQL
 3.23.43 working, as well as DBI-1.20 installed. However, I cannot get
 the MySQL driver working. It compiles, but the 'make test' returns the
 following:

I have found the best solution is to compile your own perl using gcc
and then edit the files as described below as I posted to...

From [EMAIL PROTECTED] Wed Oct 24 10:42:49 2001
Date: Tue, 9 Oct 2001 15:53:35 -0600 (MDT)
From: Boyd Lynn Gerber [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Msql-Mysql-modules-1.2216 missing symbols problem solved...
__deregister_frame_info

I finally tracked down what was missing trying to get this to compile with
SCO OpenServer 5.0.X with mysql and gcc.

t/00baseinstall_driver(mysql) failed: Can't load
'../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: dynamic linker: 
/usr/bin/perl:
relocation error: symbol not found: __deregister_frame_info at
/usr/lib/perl5/5.6.0/i486-pc-sco3.2v5.0/DynaLoader.pm line 200.
 at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at t/00base.t line 38
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5

This symbol is in the -lgthreads library so after you have done a
perl Makefile.PL

You need to cd to the mysql and edit the Makefile add -lgthreads to these
two below.

EXTRALIBS = -L/usr/local/mysql/lib/mysql -lgthreads -lmysqlclient -lm -lz
-L/usr/local/gcc-2.95.3/lib/gcc-lib/i386-pc-sco3.2v5.0.6/2.95.3 -lgcc
LDLOADLIBS = -L/usr/local/mysql/lib/mysql -lgthreads -lmysqlclient -lm -lz
-L/usr/local/gcc-2.95.3/lib/gcc-lib/i386-pc-sco3.2v5.0.6/2.95.3 -lgcc

This may also be needed.

Perl 5.005_03 builds cleanly with OSR 5.0.5 cc. Make sure you have
installed rs505a, oss497a, and oss499a. I have found you need
ftp://ftp.zenez.com/pub/zenez/perl5/h2ph.PL. This file needs to be placed
in the utils directory instead of the one there.  Then do a perl h2ph.PL
and copy the file to /usr/local/bin.

I have found that this patch to Config.pm in
/usr/local/lib/perl5/5.00503/i386-sco/Config.pm
will allow a person to build perl with SCO cc and then use gcc to build
all the other modules. This is needed for MySQL. The SCO cc will not work
with MySQL. The patch is at
ftp://ftp.zenez.com/pub/zenez/perl5/Config.pm.patch .

Good Luck,

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







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




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

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




Re: install

2001-10-24 Thread Boyd Lynn Gerber

On Wed, 24 Oct 2001, Allen Tang wrote:
  I have sco-unix  3.2v5.0.4.
 Now, install mysql-3.23.43-pc-sco3.2v5.0.6-i386

 Seems the mysql server can't start.
 The error message as follow.
 Please  give me a hint.

 Thanks.

 $ ./bin/mysql -h ed -u allen -p
 Enter password:
 dynamic linker: ./bin/mysql: symbol not found: bzero
 Killed

This one is usually because all the patches to SCO 5.0.4 are not
installed.  There are a few library changes that are made in the changes.
The patches are on ftp.caldera.com in the pub/openserver5 directory.
There is a README... file that will help.

Good Luck,

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


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

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




forgot manager password

2001-10-24 Thread Oscar Castaneda V.

Hi,

i ran into a pretty boxy problem this morning, as I tried to login as mysql manager
with 
#mysql -u root -p 
# (i forgot the password) 

its either this, or the other administrator, whom i cannot contact right now, changed 
the password without my knowledge of it.

What can i do? is there some kind of recovery procedure? Or can i reinstall without 
affecting already present databases?


thanks to all,

oscar
-- 
PGP Key fingerprint =  87 83 5F D3 8D D4 B9 DC  4F 15 B1 68 4E FE 2D AE


-
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: concatenating fields

2001-10-24 Thread Bill Adams

Harpreet wrote:

 I am using concat in my sql and it runs fine on mysql client. But when use
 din php it gives me an error:
 Supplied argument is not a valid MySQL result resource in
 b/var/www/html/scripts/cfg_code_delete.php/b on line 

 $ssql=select concat(category, -, code) as fill_column, code_id as
 submit_column from sys_code_tbl order by category;
 echo OPTION  selected value=\\/OPTION;
 $result = mysql_query($ssql);
 while ($row = mysql_fetch_array($result))
   {
   echo OPTION
 value='.$row[submit_column].''.$row[fill_column].'/OPTION;
   }



 Help is appreciated.

1) Check your return values:
$result = mysql_query( $ssql );
if( ! $result ){
  print Query Failed: $querybr\n;
  exit;
}
while( ... )


2) You did not escape the quote in the query string. It shold be like:
$ssql=select concat(category, \-\, code) as fill_column, code_id as

b.



-
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




Install help

2001-10-24 Thread Tom Hicks


I am thinking of running MySQL on my box for some work with PHP. I am
concerned about the mods to the directory structure. I can't seem to
find a list for mods it will make on RedHat7.1
Could you please help me out with that?


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: Table Crashes Constantly on prod server!!

2001-10-24 Thread Bill Adams

Michael Blood wrote:

 I am running 3.23.40 on a dual pentium III 800 with 1 GB Ram.

 I have been getting an table handler returns error 127 error

 If I fix the table with myisamchk -r or -o it will work for a while and then
 I will get the same error again.

Try dumping and restroing the table.
(backup your database files)
mysqldump --add-drop-table -q db table tmp.sql
(possibly remove the table.* files here)
mysql db tmp.sql

You may also want to either start mysqld with the flush option or run the SQL
FLUSH TABLES before a program exit or occasionally while running.

b.



-
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: forgot manager password

2001-10-24 Thread Bill Adams

Oscar Castaneda V. wrote:

 Hi,

 i ran into a pretty boxy problem this morning, as I tried to login as mysql manager
 with
 #mysql -u root -p
 # (i forgot the password)

 its either this, or the other administrator, whom i cannot contact right now, 
changed the password without my knowledge of it.

 What can i do? is there some kind of recovery procedure? Or can i reinstall without 
affecting already present databases?

The searchable documentation and/or the searchable faq on the mysql.com website will 
answer your question.  Try searching on
forgot password.

b.



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

2001-10-24 Thread Ing. Gustavo Edelstein

Thanks for your answer, but I need to know the names of the users currently
logged in the database.
Regards,

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [EMAIL PROTECTED]

- Original Message -
From: DL Neil [EMAIL PROTECTED]
To: Ing. Gustavo Edelstein [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 1:52 PM
Subject: Re: Sessions


  How to know how many sessions are currently open against a MySQL
database ?


 Gustavo,

 MySQL manual 7.28 SHOW Syntax

 Regards,
 =dn



 -
 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: Install help

2001-10-24 Thread Bill Adams

Tom Hicks wrote:

 I am thinking of running MySQL on my box for some work with PHP. I am
 concerned about the mods to the directory structure. I can't seem to
 find a list for mods it will make on RedHat7.1
 Could you please help me out with that?

Not sure what you mean by 'mod', but you can either:

o run 'rpm -qlp /path/to/therpm.rpm' to see what files are going to get
installed before installing it.

o D/L the binary from mysql.com and put the tar in a single directory.

o Compile the source with ./configure --prefix=/usr/local/mysql to keep all
of the mysql files in one location.

RPMs are probably your best bet.

b.



-
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 NULLs where they shouldn't be in mysql.user

2001-10-24 Thread Daniel Grace

Under MySQL 3.23.40/Win32 and 3.23.33/Linux, neither mysql.user.user nor
mysql.user.password are permitted to have NULL values:

mysql insert into mysql.user set user=NULL,password=NULL;
ERROR 1048: Column 'User' cannot be null

However, the default 'guest' user has NULLs for both of these values. In
addition, GRANT can create NULL values for passwords (and possibly users).

This causes an interesting problem using certain select queries, notably
this one and similiar variants:

SELECT user FROM mysql.user WHERE user IS NOT NULL

will return all of the users, even the NULL values.

I believe this is caused by the optimizer happily taking the user IS NOT
NULL part out of the query, because it sees that the user column doesn't
support NULL, and thus obviously everything will be NOT NULL.



- Daniel Grace - [EMAIL PROTECTED]
  http://dewin.oldbattery.com/ and http://dewin.venura.net/


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

2001-10-24 Thread mickalo

On Wed, 24 Oct 2001 14:36:45 -0300, Ing. Gustavo Edelstein
[EMAIL PROTECTED]   wrote:

Thanks for your answer, but I need to know the names of the users currently
logged in the database.
Regards,


check your log files, normally found in the DATADIR, this will tell you who's
doing what and when.

database mysql
 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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

2001-10-24 Thread Bill Adams

Ing. Gustavo Edelstein wrote:


 Thanks for your answer, but I need to know the names of the users currently
 logged in the database.
 Regards,

SHOW will do that as will 'mysqladmin processlist'.
http://www.mysql.com/doc/S/H/SHOW_PROCESSLIST.html

b.



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

2001-10-24 Thread Woolsey, Fred

I believe WinMySQLAdmin (if running on Windows) or the Unix/Linux/Solaris
equivalent (I assume there is one) shows in its Processes window all users
connected to the server and their associated process IDs.

Cheers,
Fred Woolsey

-Original Message-
From: Ing. Gustavo Edelstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 1:37 PM
To: DL Neil; [EMAIL PROTECTED]
Subject: Re: Sessions


Thanks for your answer, but I need to know the names of the users currently
logged in the database.
Regards,

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [EMAIL PROTECTED]

- Original Message -
From: DL Neil [EMAIL PROTECTED]
To: Ing. Gustavo Edelstein [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 1:52 PM
Subject: Re: Sessions


  How to know how many sessions are currently open against a MySQL
database ?


 Gustavo,

 MySQL manual 7.28 SHOW Syntax

 Regards,
 =dn



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

2001-10-24 Thread Steve Meyers

   How to know how many sessions are currently open against a MySQL
 database ?
 
  MySQL manual 7.28 SHOW Syntax
 
 Thanks for your answer, but I need to know the names of the users 
 currently
 logged in the database.
 Regards,
 

And he told you exactly where to find it.  Try SHOW PROCESSLIST
http://www.mysql.com/doc/S/H/SHOW_PROCESSLIST.html

Steve Meyers



-
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




LEFT JOIN?

2001-10-24 Thread Guitar Man

I have these 3 tables:
T1: T2:
Service  Application  |  Application  Machine
---
network  DHCP   DHCP mach1
Database SQLSQL  mach2
EmailExchange   SNMP mach2
network  SNMP   Exchange mach5
=
T3:
Service  Doc/notes
--
Network  www.google.com
Database Test
Traning  test

As you can see , some service do not provide any application so they do not 
have any servers associated with them. First of all is these a good table 
structure? My actual tables has more columns. The data I am interested in is 
Service and the application running (if) and the machine related with it (if 
there's a machine) if not return nothing.

here's my query:

$query= select distinct T3.service, T1.application,
T2.machine from T3,T1 LEFT JOIN T2 ON
T1.application=T2.application where T1.service=T3.service;


This works and I can format it with php very nicely. But it doesn;t return 
the data traning in T3. Do i need another join?

Any hint? let me know if its not clear enough. Thanks for your help.


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-
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: Table Crashes Constantly on prod server!!

2001-10-24 Thread Heikki Tuuri

Hi!

Michael Blood wrote:

 I am running 3.23.40 on a dual pentium III 800 with 1 GB Ram.

 I have been getting an table handler returns error 127 error

 If I fix the table with myisamchk -r or -o it will work for a while and then
 I will get the same error again.

Try dumping and restroing the table.
(backup your database files)
mysqldump --add-drop-table -q db table tmp.sql
(possibly remove the table.* files here)
mysql db tmp.sql

You may also want to either start mysqld with the flush option or run the SQL
FLUSH TABLES before a program exit or occasionally while running.

b.

What is your operating system version?

Linux kernel 2.2.14 probably has bugs in its i/o system.
Upgrading to a newer kernel version might help, though
people have reported disk corruption also from newer
kernels.

Are you using a binary compiled by MySQL AB? Some gcc
versions require right compiler flags to produce stable
code.

Regards,

Heikki



-
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




Query help...

2001-10-24 Thread David Wolf

I'm trying to come up with a query to do the following... I'm not having
lots of luck :(

The table is a user database. The columns I'm interested in are: username,
lastip. I'm interested in pulling information out that would show usernames
for each IP that appears more than once in the database.. i.e.

usernameip
persona1.1.1.1
personb1.2.3.4
personc1.1.1.1

I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)

I've tried..

SELECT lastip,count(*) FROM users GROUP BY lastip;

but that only gives me an unordered list of the # of times an IP is used..

SELECT distinct(count(*)) FROM users GROUP BY lastip;

but that doesn't join the info -- nor give me the ip's -- just frequency
(when I add 'lastip' to the select I get an error)

I'm thinking that I'm going about this the wrong way.. But, I can't quite
get a clue.

Can anyone help me out here?

Thanks!

David Wolf



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

2001-10-24 Thread listgetter


- Original Message -
From: Gregory Jon Welling/Parts Trading Inc. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 10:38 AM
Subject: quotes


 This is more of a php problem than mysql, but since I am using them in
 combo...

 I have a database for people from the former Soviet Union that have
 participated in a certain program.  One of the fields represents the name
of
 their company.  It is common (although not universal) practice to use
quotes
 when writing the name of your company, (i.e.  Limited Liability Company
 Widgetron).  Anyhow, one of the scripts that I am using has ? echo
 $companyname;?
 It works great when the person isn't using quotes in the company name, but
 when they are the quoted part disappears.  If everyone was using quotes, I
 think I could deal with the problem (however, that the quotes don't
include
 the whole field is somewhat troubling).  If no one was using quotes, there
 would be no problem.  How do I write a script that detects the presence of
 quotes and based on their presence or absence decides how to format them.

 Thanks in advance,

 GW



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

2001-10-24 Thread listgetter

Sorry bout the blank one.
try this
?=htmlspecialchars($companyname)?

Jim Lucas

- Original Message -
From: Gregory Jon Welling/Parts Trading Inc. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 10:38 AM
Subject: quotes


 This is more of a php problem than mysql, but since I am using them in
 combo...

 I have a database for people from the former Soviet Union that have
 participated in a certain program.  One of the fields represents the name
of
 their company.  It is common (although not universal) practice to use
quotes
 when writing the name of your company, (i.e.  Limited Liability Company
 Widgetron).  Anyhow, one of the scripts that I am using has ? echo
 $companyname;?
 It works great when the person isn't using quotes in the company name, but
 when they are the quoted part disappears.  If everyone was using quotes, I
 think I could deal with the problem (however, that the quotes don't
include
 the whole field is somewhat troubling).  If no one was using quotes, there
 would be no problem.  How do I write a script that detects the presence of
 quotes and based on their presence or absence decides how to format them.

 Thanks in advance,

 GW



 -
 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: What is MySQL-max?

2001-10-24 Thread Yiu Wing

 
 
  I saw this (mysql-max) on the MySQL Website but no where (at least no
where
  obvious) can the description be found.

 Its here...

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Adm
ini
 stration.html#mysqld-max

I just tried that, it gave me a page not found error.


-
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 MySQL-max?

2001-10-24 Thread Steve Meyers

  http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Da
  tabase_Administration.html#mysqld-max
  
 I just tried that, it gave me a page not found error.
 

That's because the link is too long for one line -- try copy and pasting, making sure 
to get the entire link.

Steve Meyers



-
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: Query help...

2001-10-24 Thread David Hugh-Jones


Try

SELECT lastip,username FROM users HAVING count(*)  1 GROUP BY lastip;

(or possibly 

SELECT lastip,username FROM users GROUP BY lastip HAVING count(*)  1;

)

david

On Wednesday 24 October 2001  2:21 pm, David Wolf wrote:
 I'm trying to come up with a query to do the following... I'm not having
 lots of luck :(

 The table is a user database. The columns I'm interested in are: username,
 lastip. I'm interested in pulling information out that would show usernames
 for each IP that appears more than once in the database.. i.e.

 usernameip
 persona1.1.1.1
 personb1.2.3.4
 personc1.1.1.1

 I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)

 I've tried..

 SELECT lastip,count(*) FROM users GROUP BY lastip;

 but that only gives me an unordered list of the # of times an IP is used..

 SELECT distinct(count(*)) FROM users GROUP BY lastip;

 but that doesn't join the info -- nor give me the ip's -- just frequency
 (when I add 'lastip' to the select I get an error)

 I'm thinking that I'm going about this the wrong way.. But, I can't quite
 get a clue.

 Can anyone help me out here?

 Thanks!

 David Wolf



 -
 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

-- 
Dave

-
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




Absolutely Cannot Do Anything

2001-10-24 Thread Esther Yu


Hi 

I've installed MySQL  3.23.43 binaries on Solaris 2.5.8 without UNIX
root privilege.   During installation, someone else with UNIX root
privileges ran mysql_install_db, added a normal user xxx and an admin
yyy.  At this point I do not see yyy owns all directories and all files. 
  

 Following bullets describe what I have got right now. 

 Scenario I 
 .Start mysql  using  ./safe_mysqld -user=xxx 
 .Cannot connect to mysql  through ./mysql -u root with or without
password. 
 .Can connect to mysql  using ./mysql -u xxx 
 .Cannot select anything from mysql database as user xxx 
 .Cannot create database, tables,  as xxx or yyy .  Absolutely
nothing 
 .Can kill mysql as yyy or xxx. 

 Scenario II 
 .Start mysql using  ./safe_mysqld -user=yyy 
 .Cannot connect to mysql  through ./mysql -u root with or without
password. 
 .Can connect to mysql  using ./mysql -u xxx 
 .Cannot select anything from mysql database as user yyy. 
 .Cannot create database, tables,  as xxx or yyy .  Absolutely
nothing 
 .Can kill mysql as yyy or xxx. 


When I ran ./yyy variables, it showed datadir is  /usr/local/mysql/var/. 
After I start mysql using ./safe_mysqld -u=xxx or yyy,   shell command
ps -ef shows/usr/local/mysql/libexec/mysqld
--basedir=/usr/local/mysql --datadir=/usr/local.   What is my true
datadir?I tried to do chown -R ... in either /usr/local/mysql/var/
or /usr/local/ .  It only showed that I was not a owner of anything. 

Here is what I need.   How do I get there?  Should I reinstall MySQL
with UNIX root privilege?  

   1.Normal user xxx to be able to be able to use MySQL DML and
grant/revoke privileges per his ownership. 
   2.Admin user yyy to own all directories and all files, including
system files and execute all MySQL DDL. 
   3.I can start mysql as myself and chown all directories and files.

Thanks, 
E

-
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




relational DBMS vs object-relational DBMS

2001-10-24 Thread Matthew Patterson

Everything that I have read describes MySQL as a Relational DataBase
Management System (RDBMS). PostGreSQL bills itself as an  Object-Relational
DataBase Management System. Is there a difference between the two and, if
so, come someone either explain the difference or point me to a resource
that explains the difference?

Thank you.

Matthew Patterson
IS Department
National Support Center, LLC
Naperville, IL, USA
http://www.nsc-support.com

***Privacy and Confidentiality Notice***
The information contained in this E-Mail is intended for the named
recipients only. It may contain privileged and confidential information and
if you are not the intended recipient, you must not copy, distribute or take
any action or reliance on it.
If you have received this E-Mail in error, please notify the sender
immediately by using the E-Mail address.



-
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: Query help...

2001-10-24 Thread David Wolf

Not quite what I need.. Though, it's very close :)  The problem is that with
the query given, it only shows one username for each IP.. I actually want to
show ALL usernames for each IP with the IP occurs more than once... (and
ignore the users who have a distinct IP address).

David

- Original Message -
From: David Hugh-Jones [EMAIL PROTECTED]
To: David Wolf [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 6:19 PM
Subject: Re: Query help...



 Try
 SELECT lastip,username FROM users GROUP BY lastip HAVING count(*)  1;



-
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




foreign keys and innodb

2001-10-24 Thread Tore Van Grembergen

Hi,


if you want to enjoy the foreign keys from innodb in mysql 4 then you
can't use binaries from  the rpm files.
The rpm files contain innodb  .43, not .43b!

But the source 4.0.0 and the .tar.gz binary 4.0.0 (non-rpm)
contains .43b which supports foreign keys.


Kind regards

Tore


-
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: relational DBMS vs object-relational DBMS

2001-10-24 Thread Guitar Man

http://searchdatabase.techtarget.com/sDefinition/0,,sid13_gci213671,00.html

An object-oriented database management system (OODBMS), sometimes shortened 
to ODBMS for object database management system), is a database management 
system (DBMS) that supports the modelling and creation of data as objects. 
This includes some kind of support for classes of objects and the 
inheritance of class properties and methods by subclasses and their objects. 
There is currently no widely agreed-upon standard for what constitutes an 
OODBMS, and OODBMS products are considered to be still in their infancy. In 
the meantime, the object-relational database management system (ORDBMS), the 
idea that object-oriented database concepts can be superimposed on 
relational databases, is more commonly encountered in available products. An 
object-oriented database interface standard is being developed by an 
industry group, the Object Data Management Group (ODMG). The Object 
Management Group (OMG) has already standardized an object-oriented data 
brokering interface between systems in a network.

From: Matthew Patterson [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Mysql list [EMAIL PROTECTED]
Subject: relational DBMS vs object-relational DBMS
Date: Wed, 24 Oct 2001 14:33:58 -0500

Everything that I have read describes MySQL as a Relational DataBase
Management System (RDBMS). PostGreSQL bills itself as an  Object-Relational
DataBase Management System. Is there a difference between the two and, if
so, come someone either explain the difference or point me to a resource
that explains the difference?

Thank you.

Matthew Patterson
IS Department
National Support Center, LLC
Naperville, IL, USA
http://www.nsc-support.com

***Privacy and Confidentiality Notice***
The information contained in this E-Mail is intended for the named
recipients only. It may contain privileged and confidential information and
if you are not the intended recipient, you must not copy, distribute or 
take
any action or reliance on it.
If you have received this E-Mail in error, please notify the sender
immediately by using the E-Mail address.



-
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



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-
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




Connecting to a remote database.

2001-10-24 Thread Jason Whitlow


Sorry for for the dumb question buuut.


I have been connecting to a database on my localhost using perl's DBI.pm


This is how I currently do it.

use DBI;
$data = databasename;
$driver = DBI:mysql;
my $dbh = DBI-connect($driver:database=$data, username, password)
or die Can't connect;


How would I connect to the same database on a remote server.

Thank you

Jason

-
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: Connecting to a remote database.

2001-10-24 Thread Bill Adams

Jason Whitlow wrote:

 Sorry for for the dumb question buuut.

 I have been connecting to a database on my localhost using perl's DBI.pm

 This is how I currently do it.

 use DBI;
 $data = databasename;
 $driver = DBI:mysql;
 my $dbh = DBI-connect($driver:database=$data, username, password)
 or die Can't connect;

 How would I connect to the same database on a remote server.

From the top of 'man DBD::mysql':
   use DBI;


   $driver = mysql;
   $dsn =
DBI:$driver:database=$database;host=$hostname;port=$port;


You can also do $dbh= DBI-connect( dbi:mysql:$db;host=$host, ...);

b.



-
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-Front can't open some InnoDb tables ***

2001-10-24 Thread Heikki Tuuri

Hi!

Ok, it was probably how Brent had moved .frm files
around. MySQL-Front is not to blame.

Regards,

Heikki
http://www.innodb.com

At 02:25 PM 10/24/01 -0500, you wrote:
At 03:25 AM 10/24/2001 , you wrote:
Ansgar,

what could cause the problem Brent reports in MySQL-Front?

InnoDB returns the error Can't open file mytable.InnoDB
when it cannot find the table in its internal data
dictionary. Maybe the case of letters in the database name
is wrong?

Brent,

if you look at the MySQL server error log, something like
'hostname'.err, what does InnoDB say in it?

You could try the MySQL-4.0.0 with your database. Then you could
do

mysql create table innodb_table_monitor (a int) type = innodb;

I'm running Win2k and (as far as I know) these MySQL v4 binaries aren't out 
yet.

which makes the MySQL server mysqld (not the client mysql)
to print the contents of InnoDB internal data dictionary
to the standard output.

To see it it is best that you start mysqld-max.exe from the
MS-DOS prompt, not as a service, or not inside a safe_mysqld
wrapper. Actually, when debugging, it is always best to start
mysqld from the MS-DOS prompt because then you see what is
happening.

I'll make a note of that the next time something goes awry.

But I did find out the problem to my Can't open file mytable.InnoDB 
problem. It was operator error.g The .frm files were to blame. I think I 
may have created the tables with a redirected MySQL data directory. Even 
though there was a duplicate set of .frm files in the original directory, 
they may not have been in sync with the InnoDb internal settings for the 
table. So I dropped the tables and rebuilt the databases involved and it 
seems to work fine now.

Your suggestion in the MySQL.Err file:

Cannot find table iSample/event from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you have deleted
and created again an InnoDB database but forgotten to delete the
corresponding .frm files of old InnoDB tables?

was a nice touch. That pointed me in the right direction. I guess I should 
have looked at that first. Oh well, there's always next time.g Thanks for 
your help.

Brent




-
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




Solaris 2.6

2001-10-24 Thread Sam Cao

I am running Solaris 2.6 (on Sparc) and would like to install
mysql, dose new version mysql 3.23.43 support Solaris 2.6? I
only see 2.7 and 2.8 in binary download and notes.

Thanks,

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: Query help...

2001-10-24 Thread Steve Meyers

I think you're looking for:

SELECT username, ip, count(*) FROM users GROUP BY 1, 2
 
Steve Meyers


 -Original Message-
 From: David Wolf [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 12:21 PM
 To: [EMAIL PROTECTED]
 Subject: Query help...
 
 
 I'm trying to come up with a query to do the following... I'm not having
 lots of luck :(
 
 The table is a user database. The columns I'm interested in are: username,
 lastip. I'm interested in pulling information out that would show 
 usernames
 for each IP that appears more than once in the database.. i.e.
 
 usernameip
 persona1.1.1.1
 personb1.2.3.4
 personc1.1.1.1
 
 I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)
 
 I've tried..
 
 SELECT lastip,count(*) FROM users GROUP BY lastip;
 
 but that only gives me an unordered list of the # of times an IP is used..
 
 SELECT distinct(count(*)) FROM users GROUP BY lastip;
 
 but that doesn't join the info -- nor give me the ip's -- just frequency
 (when I add 'lastip' to the select I get an error)
 
 I'm thinking that I'm going about this the wrong way.. But, I can't quite
 get a clue.
 
 Can anyone help me out here?
 
 Thanks!
 
 David Wolf
 
 
 
 -
 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: relational DBMS vs object-relational DBMS

2001-10-24 Thread Siomara Pantarotto

In Relational Database you usually create tables where the columns are 
primitive datatypes such as number, varchar2, date (these are oracle 
primitive dataypes).

So... to create a table Customer, for example, you would do something like:

create table customer (
customerID  number(10),
customerNamevarchar2(100),
customerStreet  varchar2(50),
customerCityvarchar2(30),
customerState   char(2),
customerZipCode varchar2(10)
);

In an object-Oriented database you can create your own datatypes like:

create type ADDRESS_TY as object(
Street   VARCHAR2(50),
City VARCHAR2(30),
StateCHAR(2),
Zip  varchar2(10)
);

Then you can create another object that uses this address object like:

create type PERSON_TY as object(
Name VARCHAR2(100),
Address  ADDRESS_TY
);

Then finally you can create your table like:

create table CUSTOMER(
CustomerID   NUMBER,
Person   PERSON_TY
);

or

create table EMPLOYEE(
EmployeeID   NUMBER,
Person   PERSON_TY
Department   NUMBER
);

See the difference now? The dataype address can be used separatelly in other 
tables directly, or it can be agregated to an object like person_Ty and this 
can be used for many different tables.

The power of this is that your company would define certain datatypes 
instead of expect developer to do it. Work with standards is the first key 
to do a clean job.

Now, imagine different people creating tables as they want. How many 
different words would exist for the same concept.

Street, streetName, address, complement, etc (just for street)
zipCode, zip, zCode (etc...)
What a mess, and this is actually what we see in the market. I consider this 
no professional at all. I always like to tell people that work like that the 
following: JUST MAKE IT WORK DOES NOT NECESSARILL LEADS TO SUCCESS .

I have a paper in my web site that is not complete yet, but it gives you 
some idea on how to map java objects directly to Oracle objects.

Remember : ITS NOT COMPLETE YET, SO YOU MAY FIND SOME ERRORS, OR CODES THAT 
NEED TO BE ADJUSTED TO THE EXAMPLE I POST.

Siomara Pantarotto
www.geocities.com/hisiomara (under tutorials)




From: Matthew Patterson [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Mysql list [EMAIL PROTECTED]
Subject: relational DBMS vs object-relational DBMS
Date: Wed, 24 Oct 2001 14:33:58 -0500

Everything that I have read describes MySQL as a Relational DataBase
Management System (RDBMS). PostGreSQL bills itself as an  Object-Relational
DataBase Management System. Is there a difference between the two and, if
so, come someone either explain the difference or point me to a resource
that explains the difference?

Thank you.

Matthew Patterson
IS Department
National Support Center, LLC
Naperville, IL, USA
http://www.nsc-support.com

***Privacy and Confidentiality Notice***
The information contained in this E-Mail is intended for the named
recipients only. It may contain privileged and confidential information and
if you are not the intended recipient, you must not copy, distribute or 
take
any action or reliance on it.
If you have received this E-Mail in error, please notify the sender
immediately by using the E-Mail address.



-
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



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-
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




install mysql

2001-10-24 Thread Allen Tang

  Hi Boyd,
Thanks. I check pub/openserver5 nothing relate the MYSQL.

What value I should give those two parameter
MYSQL_TCP_PORT=???
MYSQL_UNIX_PORT=???

When I run bin/safe_mysql --user=mysqladm 
get error message
011024 16:44:52  mysqld started
dynamic linker : /usr/local/mysql-3.23.43-pc-sco3.2v5.0.6-i386/bin/mysqld :
error opening libgthreads.so
011024 16:44:52  mysqld ended
What's libgthreads.so? file or ...

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: SCO OpenServer 5.0.x and Mysql DBI Driver

2001-10-24 Thread Gerald Clark

Here are my compiling notes.
I find gcc the best for compiling both MySQL and Perl modules as 
outlined below.

Compiling Applications for SCO Open Server 5.0.5

Compiling the Tools

This CD contains compilers and tools in the sco-downloads directory that 
can be loaded using the SCO 'custom' utility.

The SDK I used was compiled as follows, and resides in the custom 
directory.
To install them, use custom and the media image option..

If you wish to compile them yourself, here are the instructions.
You will need the SCO development system.
You may check the scripts directory for some zz scripts to help you out.

To compile gcc-2.95.2:
load SCO cc
extract gcc-2.95.2 to a work directory
mkdir objdir
cd objdir
../gcc-2.95.2/configure --prefix=/usr/gcc
make bootstrap
make install

To compile make:
extract make-3.79 to a work direxctory
./configure --prefix=/usr/tools
make
make install

To compile binutils:
PATH=/usr/tools/bin:$PATH ; export PATH
extract binutils-2.9.1 to a work directory
mkdir objdir
cd objdir
../binutils-2.9.1/configure --prefix=/usr/tools
make
make install










Compiling MySql

To compile MySql you will need gcc-2.95.2 described above, along with
FSU-pthreads-3.5c from mysql.com. You will find custom loadable copies 
in the 'custom' directory.
You will also need to load the linker and libraries off your SCO 5.0.5 CD.

I use the following script to compile and install MySql.
PATH=/usr/gcc/bin:/usr/tools/bin:$PATH
CC=gcc CXX=gcc ./configure --prefix=/usr/local/mysql
make
make install

Compiling Perl

To compile perl:
edit hints/sco.sh and change:
ld='ld'
to
ld='gcc -fpic'

I use the following script to compile and install perl.
PATH=/usr/tools/bin:/usr/gcc/bin:$PATH
LD_RUN_PATH=/usr/local/mysql/lib/mysql
export LD_RUN_PATH
sh Configure -Dcc=gcc -Dprefix=/usr/local/perl -d
make
make install

Compiling Perl Modules

To compile DBI and Msql-Mysql-modules just follow the directions found 
in the packages. No makefiles need to be edited after running 'perl 
Makefile.PL'.


Scott Powell wrote:

 Hello all,
 
 I'm the poor guy trying to get Perl talking to a MySQL database on SCO
 OpenServer 5.0.5. I've managed to get the binary distributions of MySQL
 3.23.43 working, as well as DBI-1.20 installed. However, I cannot get
 the MySQL driver working. It compiles, but the 'make test' returns the
 following:
 

-- 
Gerald L. Clark
[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: Query help...

2001-10-24 Thread David Wolf

It's still not quite doing what I want. I only want a list of IP's where
there are more than 1 instance of an ip--and then display each of the
multiple occurrences of the single ip (and repeat for each ip which has more
than 1 occurrence)..

The queries are all so close, but, don't give what I want :(

David

- Original Message -
From: Steve Meyers [EMAIL PROTECTED]
To: David Wolf [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 2:38 PM
Subject: RE: Query help...


I think you're looking for:

SELECT username, ip, count(*) FROM users GROUP BY 1, 2

Steve Meyers


 -Original Message-
 From: David Wolf [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 12:21 PM
 To: [EMAIL PROTECTED]
 Subject: Query help...


 I'm trying to come up with a query to do the following... I'm not having
 lots of luck :(

 The table is a user database. The columns I'm interested in are: username,
 lastip. I'm interested in pulling information out that would show
 usernames
 for each IP that appears more than once in the database.. i.e.

 usernameip
 persona1.1.1.1
 personb1.2.3.4
 personc1.1.1.1

 I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)

 I've tried..

 SELECT lastip,count(*) FROM users GROUP BY lastip;

 but that only gives me an unordered list of the # of times an IP is used..

 SELECT distinct(count(*)) FROM users GROUP BY lastip;

 but that doesn't join the info -- nor give me the ip's -- just frequency
 (when I add 'lastip' to the select I get an error)

 I'm thinking that I'm going about this the wrong way.. But, I can't quite
 get a clue.

 Can anyone help me out here?

 Thanks!

 David Wolf



 -
 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: Query help...

2001-10-24 Thread Steve Meyers

I think I understand.  This should work...

select distinct a.username, a.ip from users a, users b where a.ip=b.ip  a.username 
!= b.username;
 
Steve Meyers


 -Original Message-
 From: David Wolf [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 3:17 PM
 To: Steve Meyers; [EMAIL PROTECTED]
 Subject: Re: Query help...
 
 
 It's still not quite doing what I want. I only want a list of IP's where
 there are more than 1 instance of an ip--and then display each of the
 multiple occurrences of the single ip (and repeat for each ip 
 which has more
 than 1 occurrence)..
 
 The queries are all so close, but, don't give what I want :(
 
 David
 
 - Original Message -
 From: Steve Meyers [EMAIL PROTECTED]
 To: David Wolf [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, October 24, 2001 2:38 PM
 Subject: RE: Query help...
 
 
 I think you're looking for:
 
 SELECT username, ip, count(*) FROM users GROUP BY 1, 2
 
 Steve Meyers
 
 
  -Original Message-
  From: David Wolf [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 24, 2001 12:21 PM
  To: [EMAIL PROTECTED]
  Subject: Query help...
 
 
  I'm trying to come up with a query to do the following... I'm not having
  lots of luck :(
 
  The table is a user database. The columns I'm interested in 
 are: username,
  lastip. I'm interested in pulling information out that would show
  usernames
  for each IP that appears more than once in the database.. i.e.
 
  usernameip
  persona1.1.1.1
  personb1.2.3.4
  personc1.1.1.1
 
  I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)
 
  I've tried..
 
  SELECT lastip,count(*) FROM users GROUP BY lastip;
 
  but that only gives me an unordered list of the # of times an 
 IP is used..
 
  SELECT distinct(count(*)) FROM users GROUP BY lastip;
 
  but that doesn't join the info -- nor give me the ip's -- just frequency
  (when I add 'lastip' to the select I get an error)
 
  I'm thinking that I'm going about this the wrong way.. But, I 
 can't quite
  get a clue.
 
  Can anyone help me out here?
 
  Thanks!
 
  David Wolf
 
 
 
  -
  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
 
 



-
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: Query help...

2001-10-24 Thread Daren Cotter

David,

The way I accomplish this is using two queries...first I write a general
query that shows the IP address of any IP that has more than one user
associated with it:

SELECT DISTINCT(ip) AS ip, COUNT(*) AS count
FROM members
GROUP BY ip
HAVING COUNT  1
ORDER BY count DESC

I tie this into a PHP script that lists all the IPs (as links) to another
report. This report selects all the usernames for that IP

SELECT username
FROM members
WHERE ip = '$ip'
ORDER BY username

This works well for me, you just have to pass the variable from one page to
another.

Hope that helped!



Sincerely,

Daren Cotter
CEO, InboxDollars.com
[EMAIL PROTECTED]
http://www.inboxdollars.com
(507) 382-0435

-Original Message-
From: David Wolf [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 2:17 PM
To: Steve Meyers; [EMAIL PROTECTED]
Subject: Re: Query help...


It's still not quite doing what I want. I only want a list of IP's where
there are more than 1 instance of an ip--and then display each of the
multiple occurrences of the single ip (and repeat for each ip which has more
than 1 occurrence)..

The queries are all so close, but, don't give what I want :(

David

- Original Message -
From: Steve Meyers [EMAIL PROTECTED]
To: David Wolf [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 2:38 PM
Subject: RE: Query help...


I think you're looking for:

SELECT username, ip, count(*) FROM users GROUP BY 1, 2

Steve Meyers


 -Original Message-
 From: David Wolf [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 12:21 PM
 To: [EMAIL PROTECTED]
 Subject: Query help...


 I'm trying to come up with a query to do the following... I'm not having
 lots of luck :(

 The table is a user database. The columns I'm interested in are: username,
 lastip. I'm interested in pulling information out that would show
 usernames
 for each IP that appears more than once in the database.. i.e.

 usernameip
 persona1.1.1.1
 personb1.2.3.4
 personc1.1.1.1

 I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)

 I've tried..

 SELECT lastip,count(*) FROM users GROUP BY lastip;

 but that only gives me an unordered list of the # of times an IP is used..

 SELECT distinct(count(*)) FROM users GROUP BY lastip;

 but that doesn't join the info -- nor give me the ip's -- just frequency
 (when I add 'lastip' to the select I get an error)

 I'm thinking that I'm going about this the wrong way.. But, I can't quite
 get a clue.

 Can anyone help me out here?

 Thanks!

 David Wolf



 -
 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


-
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: Query help...

2001-10-24 Thread David Wolf

Thanks!! Worked like a dream! I'm not quite sure why it knew to pull only
ip's that are in there more than once though?

David

- Original Message -
From: Steve Meyers [EMAIL PROTECTED]
To: David Wolf [EMAIL PROTECTED]; Steve Meyers
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 3:46 PM
Subject: RE: Query help...


I think I understand.  This should work...

select distinct a.username, a.ip from users a, users b where a.ip=b.ip 
a.username != b.username;

Steve Meyers


 -Original Message-
 From: David Wolf [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 3:17 PM
 To: Steve Meyers; [EMAIL PROTECTED]
 Subject: Re: Query help...


 It's still not quite doing what I want. I only want a list of IP's where
 there are more than 1 instance of an ip--and then display each of the
 multiple occurrences of the single ip (and repeat for each ip
 which has more
 than 1 occurrence)..

 The queries are all so close, but, don't give what I want :(

 David

 - Original Message -
 From: Steve Meyers [EMAIL PROTECTED]
 To: David Wolf [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, October 24, 2001 2:38 PM
 Subject: RE: Query help...


 I think you're looking for:

 SELECT username, ip, count(*) FROM users GROUP BY 1, 2

 Steve Meyers


  -Original Message-
  From: David Wolf [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 24, 2001 12:21 PM
  To: [EMAIL PROTECTED]
  Subject: Query help...
 
 
  I'm trying to come up with a query to do the following... I'm not having
  lots of luck :(
 
  The table is a user database. The columns I'm interested in
 are: username,
  lastip. I'm interested in pulling information out that would show
  usernames
  for each IP that appears more than once in the database.. i.e.
 
  usernameip
  persona1.1.1.1
  personb1.2.3.4
  personc1.1.1.1
 
  I'd be interested in seeing persona and personc (both have 1.1.1.1 ip's)
 
  I've tried..
 
  SELECT lastip,count(*) FROM users GROUP BY lastip;
 
  but that only gives me an unordered list of the # of times an
 IP is used..
 
  SELECT distinct(count(*)) FROM users GROUP BY lastip;
 
  but that doesn't join the info -- nor give me the ip's -- just frequency
  (when I add 'lastip' to the select I get an error)
 
  I'm thinking that I'm going about this the wrong way.. But, I
 can't quite
  get a clue.
 
  Can anyone help me out here?
 
  Thanks!
 
  David Wolf
 
 
 
  -
  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







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

2001-10-24 Thread Boyd Lynn Gerber

On Wed, 24 Oct 2001, Allen Tang wrote:
 Hi Boyd,
 Thanks. I check pub/openserver5 nothing relate the MYSQL.

What you need from this site is all patches for your OS version.

uname -X will tell you then you need to down load and install them for
your version.

 What value I should give those two parameter

 MYSQL_TCP_PORT=???
 MYSQL_UNIX_PORT=???

Same as on all systems.  3306 if my memory is correct.  Look in the docs.

 When I run bin/safe_mysql --user=mysqladm 
 get error message
 011024 16:44:52  mysqld started
 dynamic linker : /usr/local/mysql-3.23.43-pc-sco3.2v5.0.6-i386/bin/mysqld :
 error opening libgthreads.so
 011024 16:44:52  mysqld ended
 What's libgthreads.so? file or ...

Have your read the manual?  You need a port of threads to run mysql.  On
OpenServer it is FSU-threads or FSU-pthreads.  You will find this on the
ftp.mysql.com site.  Look in the SCO directory.

Please read the INSTALL and the manual on SCO OpenServer.

Good Luck,

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


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

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




Re: New server/client protocol

2001-10-24 Thread Michael Widenius


Hi!

 Jeremy == Jeremy Zawodny [EMAIL PROTECTED] writes:

Jeremy On Tue, Oct 16, 2001 at 12:40:31AM +0300, Michael Widenius wrote:
 
 Benefits (of BIND):
 - The server doesn't have to convert numbers to strings before sending them
 to the client.
 - The clients doesn't have to convert numbers to strings or escape strings
 when using PREPARE.
 
 Disadvantages:
 - Bigger client library.
 - A lot of convert functions in the client (double-string ...)
 - More things to document and test.
 - Need of more examples.

Jeremy How will the impact the query cache that's been discussed before?

Not notable;  In the worst case a query may be stored twice in the
query cache, if you are fetching data both through the BIND statement
and the 'old' way.  As this is a unlikely scenario, I don't think we
have to worry about this.

Jeremy Will it simply be generic and cache prepared queries, will it cache
Jeremy prepared and non-prepared queries, or something else?

For selects, I think we should start by only caching non-prepared
queries.

Regards,
Monty

-
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




PHP and MySQL 4.0.0

2001-10-24 Thread Michael Widenius


Hi!

 Sebastian == Sebastian Bergmann [EMAIL PROTECTED] writes:

Sebastian   Just compiled PHP (current CVS) with support for MySQL 4.0.0, but now
Sebastian   Apache won't start:

Sebastian Cannot load /usr/local/apache2/modules/libphp4.so into server: 
Sebastian undefined symbol: mysql_module_entry

Sebastian   PHP is ./configure'd --with-apxs2=/usr/local/apache2 
Sebastian--with-mysql=/usr/local/mysql
Sebastian--without-pear
Sebastian--enable-inline-optimization

Sebastian   Is this a known problem?

No this is not a known problem.
Can you find out what could be the problem ?
The symbol 'mysql_module_entry' doesn't come from the MySQL library,
so this is a PHP problem.

Note that you can use MySQL 4.0 with the old MySQL 3.23 library
without any problems.

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
   ___/   www.mysql.com

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

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




Re: Cant optimize self-join order

2001-10-24 Thread Michael Widenius


 Eric == Eric  [EMAIL PROTECTED] writes:

Eric What is quite puzzling is MySQL's estimation of the number of rows
Eric from each of the self-joins.  The conditions on alias queryTable0
Eric actually refer to 1582 rows, and the conditions on alias queryTable1
Eric refer to 39 rows.  Notice in the EXPLAIN below that when I flip around
Eric the join order, MySQL thinks that 1152 (which is its estimation for
Eric 1582) rows are coming from queryTable1, whereas with the original join
Eric order, it thought 1152 rows were coming from queryTable0...this seems
Eric like a bug to me since the conditions on those two aliases are the
Eric same between the two queries.  Only the FROM index queryTable0, index
Eric queryTable1 is flipped to FROM index queryTable1, index queryTable0.

Eric See below,
Eric eric.

It's actually quite clear why you get the same number of estimated rows in both
cases.

Because the alias are identically used and MySQL picks the same index
for both combinations, it will estimate the same number of rows in
both cases.

The query was:


SELECT DISTINCT queryTable0.num, queryTable0.value, queryTable1.value FROM
index queryTable0, index queryTable1 WHERE
queryTable0.path=24 AND queryTable0.type=E AND
queryTable1.path=27 AND queryTable1.type=E AND
queryTable0.num=queryTable1.num AND  
queryTable0.nvalue  0.0 AND  queryTable0.nvalue = 90.0 AND
queryTable1.nvalue  140.0 AND queryTable1.nvalue = 200.0;


Eric EXPLAIN of swapped tables in FROM clause says:

Eric 
+-+--+--++-++--+-+
Eric | table   | type | possible_keys| key| key_len |
Eric ref| rows | Extra   |
Eric 
+-+--+--++-++--+-+
Eric | queryTable1 | ref  | pathndx,numndx | pathndx |   4 |
Eric const  | 1152 | where used; Using temporary |
Eric | queryTable0 | ref  | pathndx,numndx | numndx  |   4 |
Eric queryTable1.num |   53 | where used  |
Eric 
+-+--+--++-++--+-+
Eric 2 rows in set (0.01 sec)

The number 1152 comes from that MySQL estimates that there is about
1152 rows that can be found when searching through index 'path'
after the constant '24'.  MySQL does this estimation by doing a quick
lookup in the index tree.

The number 53, comes from MySQL guessing that there is about 53 rows
with identical 'num' values for each num.

You can get a much better guess for the second case if you run
'analyze table' on the table in question.

If you want to get the query faster, you have to improve your index a
bit.

If this is one of your typical queries, I would suggest you do the
follwing change to your index:

Change the index:

KEY `pathndx`(`path`),

to

KEY pathndx(path, type, nvalue)

If there for a 'num' is many rows with a different type, then you
should also change the key:

KEY `numndx`(`num`)

to

KEY numndx (num, type)

cut

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
   ___/   www.mysql.com

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

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




Re: bugs for mysql 4.0

2001-10-24 Thread Michael Widenius


Hi!

 Sinisa == Sinisa Milivojevic [EMAIL PROTECTED] writes:

Sinisa Jeremy Zawodny writes:
 On Wed, Oct 17, 2001 at 12:18:28AM +0100, Mark Maunder wrote:
  Where does one post (possible) bugs for mysql 4?
  
  I believe this worked in MySQL 3:
  
  mysql create table events ( id int(11) );
  ERROR 1064: You have an error in your SQL syntax near 'events ( id
  int(11) )' at line 1
  mysql create table event ( id int(11) );
  Query OK, 0 rows affected (0.00 sec)
  
  Is 'events' now a reserved word?
 
 If it is, the manual needs patching:
 
 http://www.mysql.com/doc/R/e/Reserved_words.html
 
 Jeremy
 -- 
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936
 
 MySQL 3.23.41-max: up 41 days, processed 895,625,308 queries (252/sec. avg)

Sinisa Yes, we shall have to patch our 4.0 manual.

The above is a bug in 4.0; EVENTS should not be a reserverd word.
This will be fixed in 4.0.1 !

Regards,
Monty

-
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




  1   2   >