Re: MySQL and PHP4

2001-05-25 Thread Andrey Kotrekhov

On Thu, 24 May 2001, Scott Baker wrote:

I don't agree.
If mysql install in other directory then /usr/local
you need use --with-mysql=mysqldir
and sometimes --with-mysql-include and --with-mysql-lib
options.

 Do you need to specify a directory?  I just did --with-mysql

 At 01:14 PM 5/24/2001 -0400, Bill Tangren wrote:
 When I compile PHP4 (4.04pl1) with the option --with-mysql=mysqldir...
 
 I get the error
 
 'cannot find mysqlclient library under mysqldir'
 
 I did a search through the mysqsl (3.23.38) source code after I compiled
 it, and I don't find that library anywhere? What am I doing wrong?


 -
 Scott Baker - Webster Internet - Network Technician
 503.266.8253 - [EMAIL PROTECTED]

 You may be disappointed if you fail, but you are doomed if you don't try.
 - Beverly Sills












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

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



___
Andrey Kotrekhov [EMAIL PROTECTED]


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

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




SQL question (timestamps, backups)

2001-05-25 Thread Chris Petersen

Am I posting to the right list?  I'm new to this thing.

Anyway, I have an interesting, though I think not unusual predicament..  I'm
maintaining a number of different tables that contain timestamp fields that
keep track of the last time a record was modified.  My problem is that if I
want to change any field specifications in one of these tables, that change
also activates and sets the timestamp field, which I don't want done.  I
know how to get around this if I'm just doing an update query, but I can't
easily combine something like that with an alter...

This is what I have so far:

Create Table Backup (
id  BigInt Unsigned Auto_Increment Primary Key,
modifiedTimeStamp,
);
INSERT INTO Backup (id, modified) SELECT id, modified FROM Items;

This should (provided I didn't typo anything) create a backup table full of
the modification dates.  Once done, I can update the Items table any way I
need to.  The problem is getting that data back INTO Items.  I'm using Perl
for most of this, so I could rather easily write a routine to do it
manually, but I'm wondering if there's an sql statement that might handle it
easier (like a JOINed update, which last time I checked couldn't be
done)..

Thanks,

Chris


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

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 end tool

2001-05-25 Thread mySQLDAC

Hello Alice,

Friday, May 25, 2001, 7:14:23 AM, you wrote:

A Hi, i am a win2k professional user, 
A and i would like to get a mySQL front end tools which can make 
A mySQL to be work more user friendly.
A currently i am using MySQL-Front, for those who had tried out others this kind of 
tools, 
A pls recommend any others tools that u think is more powerful, efficient and 
effective to me.
A by the way, i am just looking for those freeware product.


Try this: http://www.visualphpstudio.com/article.php?sid=11




---
Best regards,
Edward Smirnov 
microOLAP Technologies LLC
mailto:[EMAIL PROTECTED]

Delphi/C++ Builder DB Connectivity components for:

mySQL- http://www.microolap.com/mysqldac.htm
Sybase ASA   - http://www.microolap.com/asadac.htm
Sybase ASE   - http://www.microolap.com/asedac.htm
MS SQL   - Coming soon!
MySQLCentral - Coming soon!



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

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

2001-05-25 Thread Raymund D. Nones

hello,
when i rebooted the system,  an error occured :

Can't connect to local MySQL server through socket
/var/lib/mysql/mysql.sock

I've already check var/lib/mysql directory and mysql.sock does exist..

how do i connect this ? why is it everytime i reboot the system it produces an error 
like this ?

thanks !!!

-
If think you play too much, play more





Re: MySQL and PHP4

2001-05-25 Thread Sommai Fongnamthip

Dear,
 easy way to install another application with mysql is specify 
mysql dir and mysql data dir at installation.  use this parameter while 
install mysql
 ./configure --prefix=/usr/local/mysql \ -- this will install all 
mysql
 --localstatedir=/usr/local/mysql/data   -- this 
will keep all data and log

 when u install php use this command
 ./configure --with-mysql=/usr/local/mysql
 This method make clearly install for me.

SF

At 10:18 25/5/2001 +0300, Andrey Kotrekhov wrote:
On Thu, 24 May 2001, Scott Baker wrote:

I don't agree.
If mysql install in other directory then /usr/local
you need use --with-mysql=mysqldir
and sometimes --with-mysql-include and --with-mysql-lib
options.

  Do you need to specify a directory?  I just did --with-mysql
 
  At 01:14 PM 5/24/2001 -0400, Bill Tangren wrote:
  When I compile PHP4 (4.04pl1) with the option --with-mysql=mysqldir...
  
  I get the error
  
  'cannot find mysqlclient library under mysqldir'
  
  I did a search through the mysqsl (3.23.38) source code after I compiled
  it, and I don't find that library anywhere? What am I doing wrong?
 
 
  -
  Scott Baker - Webster Internet - Network Technician
  503.266.8253 - [EMAIL PROTECTED]
 
  You may be disappointed if you fail, but you are doomed if you don't try.
  - Beverly Sills
 
 
 
 
 
 
 
 
 
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail 
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 

___
 Andrey Kotrekhov [EMAIL PROTECTED]


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

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


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

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




Re: How many queries per second do you get?

2001-05-25 Thread Rafael Martinez

---Reply to mail from Nathanial Hendler about How many queries per second do you get?
 
 Hello, I was just looking at my MySQL databse using mytop and saw that I was 
 getting over 60 queries per second.  Can people give me an idea of how many 
 queries per second they get?
 


Hello

I have a database with around 180.000.000 questions a week, that means
around 297 questions per second.

Sincerely
Rafael Martinez



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

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




synchronize database structure

2001-05-25 Thread Dorthe Luebbert

Hi,

I am looking for an easy way to synchronize two mysql-databases (only
the sql-structure). I want to compare two structure dumps, find out the
differences and get alter table statements as result.

CU

 Dorthe

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

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




backup .db table

2001-05-25 Thread hatim

hy
i m using mysql-3.23.38.tar.gz in redhat6.2
i have .db tables
1-how can i bakup them ?
when i use mysqldump or a simple copy , it s failed : when i remove table to
another mysql server : the server dont read the .db files even if their size
are he same then the original
i can t export .db table ...
any idea ??


2-i have also some time this error :

Aborted connection 2 to db: 'totot' user: 'g' host: `jjj.fff.fff
(Got an error reading communication packets)


Thank you for your help

Hatim

i configure mysql like that :
./configure --enable-assembler --with-unix-socket-path=/var/lib/mysql/mysql.
sock --prefix=/ --exec-prefix=/usr --libexecdir=/usr/sbin --syscon
fdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr
/info --includedir=/usr/include --mandir=/usr/man --without-docs -
-without-bench --enable-large-files --with-berkeley-db --enable-static --pre
fix=/usr/lib/libdb.a





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

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: missing libcrypt_i.so.1 file

2001-05-25 Thread Sinisa Milivojevic

Stelian Anton writes:
 Hello All,
 
 When I check to running the mysql_install_db I have the error:
 
 root@gem:/usr/local/mysqlscripts/mysql_install_db 
 
 ld.so.1: ./bin/my_print_defaults: fatal: libcrypt_i.so.1: open failed: No such file 
or directory
 
 Environment:
 
 System: SunOS gem 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-5_10
 Architecture: sun4
 
 Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gcc /usr/ucb/cc
 GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
 gcc version 2.95.2 19991024 (release)
 Compilation info: CC='gcc'  CFLAGS='-O3 -fno-omit-frame-pointer'  CXX='gcc'  
CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' 
 LDFLAGS=''
 LIBC:
 -rw-r--r--   1 bin  bin  1610172 Jan  9 01:28 /lib/libc.a
 lrwxrwxrwx   1 root root  11 Jan 13 10:13 /lib/libc.so - ./libc.so.1
 -rwxr-xr-x   1 bin  bin  1015768 Jan  9 01:28 /lib/libc.so.1
 -rw-r--r--   1 bin  bin  1610172 Jan  9 01:28 /usr/lib/libc.a
 lrwxrwxrwx   1 root root  11 Jan 13 10:13 /usr/lib/libc.so - ./libc.so.1
 -rwxr-xr-x   1 bin  bin  1015768 Jan  9 01:28 /usr/lib/libc.so.1
 Configure command: ./configure  --prefix=/usr/local/mysql '--with-comment=Official 
MySQL binary' --with-extra-charsets=complex --with-server-suffix= --enable-assembler 
--disable-shared
 Perl: This is perl, version 5.005_03 built for sun4-solaris
 
 Thanks
 Stelian

Hi!

You have probably downlaoded and installed our binary for Solaris 2.7
from our site.

It will not work on 2.6.

You have either to build it yourself or to wait for the contributed
binary for 2.6 which should come in the near future.


Regards,

Sinisa

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

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

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




Install MySQL on windows 98

2001-05-25 Thread Paul Castiglione

Hello all

I have try several time to install MySQL on my windows 98 machine with no luck I 
have look thur the readme file. It seems to load but will not start. Any help will be 
welcome

Paul



Database accepts only 127 records

2001-05-25 Thread Jari Mäkelä

Hi,

got a problem as mysql does not allow writing but 127 entries to a 
database, any idea how to correct this abnormality?

Jari Mäkelä


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

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: Database accepts only 127 records

2001-05-25 Thread Jason Brooke

 Hi,
 got a problem as mysql does not allow writing but 127 entries to a
 database, any idea how to correct this abnormality?

 Jari Mäkelä


You probably created an auto-increment field of type tinyint - check the data
specification for tiny int in the online manual to see whay it's happening

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: Database accepts only 127 records

2001-05-25 Thread Jon Haworth

Define your tables so you're not using TINYINT as your primary key - it has
a maximum size of 127.

If you use INTEGER you should be fine.

HTH
Jon


-Original Message-
From: Jari Mäkelä [mailto:[EMAIL PROTECTED]]
Sent: 25 May 2001 12:29
To: [EMAIL PROTECTED]
Subject: Database accepts only 127 records


Hi,

got a problem as mysql does not allow writing but 127 entries to a 
database, any idea how to correct this abnormality?

Jari Mäkelä


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

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



**
'The information included in this Email is of a confidential nature and isi
 ntended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

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

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




BDB read lock / Transaction isolation

2001-05-25 Thread Julien Revel



I have a very annoying problem in a big program, that I 
reduced toa small and reproductible java program (see code excerpt 
below).The problem is as follows :I have 2 separate connexions on the 
same BDB table, and I try to do:

Connexion1: Set autocommit (false)Connexion1 
: INSERT INTO TABLE...Connexion2: SELECT FROM 
TABLEConnexion1: COMMIT

The SELECT statement hangs the program, until the commit 
has been doneon the first connexion, however, with this code, it never 
happens.

I use MySQL 3.23.38 on Linux RedHat 6.2, with the last BDB 
support for this versionI tried to set up the transaction-isolation to 
READ_UNCOMMITTED (1)without any success, either from command-line, or inside 
the SQL code.transaction-isolation parameter is available since version 
3.23.36, butit does not seem to work with BDB tables !The isolation 
level (returned by JDBC driver) seems to be always 8 (SERIALIZABLE),ie dirty 
reads, non-repeatable reads, and phantom reads are forbidden.But I WANT to 
be able to do phantom reads in my BDB Tables, as statedin the pseudo-code 
above.Of course, I tried the same program with- Oracle 8- MyIsam 
tables- Set autocommit (true)And it works fine.

I also tried the same manipulation with 2 command lines 
mysql consoles,with same user on same table: - I do a insert from 
the first console - I do a select from the 2nd console: it 
hangs - I commit from the first console, and imediately, the second 
console displays the results of the select.

I tried to set-up isolation level from console, with no 
results.

Is it possible to do this with BDB ?Do I have to use 
InnoDB Tables in order to do this ?

Need help please

Actual (java) code extract:

 
Statement Stmt = 
Conn.createStatement(); 
Statement Stmt2 = 
Conn2.createStatement(); 
String sQuery ;

 
try 
{ 
sQuery = "DROP TABLE tellers" 
; 
Stmt.executeUpdate(sQuery); 
} catch 
(Exception e 
) 
{ 
}

 
sQuery = "CREATE TABLE tellers ( 
"; 
sQuery+= "Tid INT NOT NULL, 
PRIMARY 
KEY(Tid),"; 
sQuery+= "Bid 
INT,"; 
sQuery+= "Tbalance 
INT)"; 
sQuery+="type=BDB" 
; 
Stmt.executeUpdate(sQuery);

 // 
ALWAYS RETURNS 8 
! 
iIsolation1 = Conn.getTransactionIsolation() 
; 
iIsolation2 = Conn2.getTransactionIsolation() ;

 // 
DOES NOT WORK 
! sQuery = 
"Set transaction isolation level READ UNCOMMITTED" 
; 
Stmt.executeQuery(sQuery); 
// ALWAYS RETURNS 8 
! 
iIsolation1 = Conn.getTransactionIsolation() ;

 
sQuery = "Set transaction isolation level READ UNCOMMITTED" 
; 
Stmt2.executeQuery(sQuery); 
iIsolation2 = Conn2.getTransactionIsolation() ;

 
Conn.setAutoCommit(false);

 // 
Following statement is 
OK sQuery 
= "INSERT INTO tellers(Tid,Bid,Tbalance) VALUES 
(10,20,30)"; 
Stmt.executeUpdate(sQuery);

 // 
Following query locks the 
table 
sQuery = "select * from tellers" 
; rs = 
Stmt2.executeQuery(sQuery);

 // 
The program never reaches this line 
! 
Conn.commit();




 MySQL_BDB_ReadLock.java

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

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


another question to continue

2001-05-25 Thread Jari Mäkelä

hi again,

am not quite sure of this as Mysql is too new thing to me but apostrophes 
like plain  'and  é  in text being written in has to be dealt with 
somehow, is the say  0'keefe   solution the proper way to do that. 
meaning  that  O\'keefe  works?

Jari Mäkelä


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

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 end tool

2001-05-25 Thread Crercio Osmaildo da Silva

Hi,
 
Try DBTools ( http://dbtools.vila.bol.com.br
http://dbtools.vila.bol.com.br ). It's a Win32 client for mySQL, free, and
has lot of features, including an Import/Export Wizard to help you convert
other sources to mySQL.
 
[]'s
 
Crercio O. Silva

-Original Message-
From: Alice [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 25 de maio de 2001 00:14
To: [EMAIL PROTECTED]
Subject: MySQL front end tool


Hi, i am a win2k professional user, 
and i would like to get a mySQL front end tools which can make 
mySQL to be work more user friendly.
currently i am using MySQL-Front, for those who had tried out others this
kind of tools, 
pls recommend any others tools that u think is more powerful, efficient and
effective to me.
by the way, i am just looking for those freeware product.
 
thanx !




RE: another question to continue

2001-05-25 Thread Jon Haworth

Yes, you have to escape special characters.

Not sure about accents etc, but a search on the list archives
(lists.mysql.com) should turn up something, this gets discussed pretty
regularly.

HTH
Jon


-Original Message-
From: Jari Mäkelä [mailto:[EMAIL PROTECTED]]
Sent: 25 May 2001 13:03
To: [EMAIL PROTECTED]
Subject: another question to continue


hi again,

am not quite sure of this as Mysql is too new thing to me but apostrophesl
 ike plain  'and  é  in text being written in has to be dealt with 
somehow, is the say  0'keefe   solution the proper way to do that. 
meaning  that  O\'keefe  works?

Jari Mäkelä


**
'The information included in this Email is of a confidential nature and isi
 ntended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

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

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




filter again Re: Re: SELECT and (ordered) ENUMs

2001-05-25 Thread Adriano Nagelschmidt Rodrigues

[EMAIL PROTECTED] writes:
 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

This is very silly. I am subscribed to the list and I used the word
'queries' below.

 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. You have written the following:
 
 
Paul DuBois writes:
 The way it works now, I have to know in which position the label
 'good' is to construct the select. I think this leads to unnecessary
 duplication (is there a function that returns the position of a label?
 I couldn't find it in the manual).
 
 Try this:
 
 SELECT level + 0 from foo where level = 'good' LIMIT 1;
 
OK, I believe this works, thanks.

But I would rather have the numeric context or do 

select * from foo where level = enum_pos('good')

Maybe I'm just too lazy ;-)

Regards,

--
Adriano

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

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: Foreign keys just for table metadata?

2001-05-25 Thread Adriano Nagelschmidt Rodrigues

Rolf Hopkins writes:
 You can still use foreign keys, just that it has no effect in mysql.

Yes, I know. I just would like to provide the information in the
CREATE TABLE definition and be able to retrieve it later.

Nothing more.

The manual says:

In the near future we will extend the FOREIGN KEY implementation so
that at least the information will be saved in the table specification
file and may be retrieved by mysqldump and ODBC.

Maybe in version 4.0...

Regards,

--
Adriano

password: database

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

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




LAST_INSERT_ID Issues

2001-05-25 Thread Dave Carter






This does not return any results

SELECT LAST_INSERT_ID() FROM tablename;

there is an indexed, auto-incrementing field in the table, but it refuses to
show any results. I don't understand the manual's text, so any help would be
appreciated.


Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970

g sql,database


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

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: LAST_INSERT_ID Issues

2001-05-25 Thread Proulx, Ghislain

Hello Dave,

If your auto-incrementing field in your table are Account_ID for exemple,
try :

Select Account_ID From tablename Where Account_ID = LAST_INSERT_ID();

This work fine for me

Bye

Ghislain Proulx
Web Programmer
Groupe Ordimax
http://www.ordimax.com
http://www.infoteck.qc.ca


 -Original Message-
 From: Dave Carter [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 25, 2001 9:49 AM
 To: [EMAIL PROTECTED]
 Subject: LAST_INSERT_ID Issues 
 
 
 
 
 
 
 
 This does not return any results
 
 SELECT LAST_INSERT_ID() FROM tablename;
 
 there is an indexed, auto-incrementing field in the table, 
 but it refuses to
 show any results. I don't understand the manual's text, so 
 any help would be
 appreciated.
 
 
 Dave Carter
 Chief Web Architect
 Accelerated Business Technologies, Inc.
 http://www.abti.cc
 717.464.2970
 
 g sql,database
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: MySQL front end tool

2001-05-25 Thread Bruce Stewart

Also
http://www.mysql.com/Downloads/Contrib/MyTool-DLL_for_VB_and_MySQL.zip

-Original Message-
From: Crercio Osmaildo da Silva [mailto:[EMAIL PROTECTED]]
Sent: Fri, 25 May 2001 14:17
To: [EMAIL PROTECTED]
Subject: RE: MySQL front end tool


Hi,

Try DBTools ( http://dbtools.vila.bol.com.br
http://dbtools.vila.bol.com.br ). It's a Win32 client for mySQL, free, and
has lot of features, including an Import/Export Wizard to help you convert
other sources to mySQL.

[]'s

Crercio O. Silva

-Original Message-
From: Alice [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 25 de maio de 2001 00:14
To: [EMAIL PROTECTED]
Subject: MySQL front end tool


Hi, i am a win2k professional user,
and i would like to get a mySQL front end tools which can make
mySQL to be work more user friendly.
currently i am using MySQL-Front, for those who had tried out others this
kind of tools,
pls recommend any others tools that u think is more powerful, efficient and
effective to me.
by the way, i am just looking for those freeware product.

thanx !



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

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: LAST_INSERT_ID Issues

2001-05-25 Thread Dave Carter

So in my insert into  select, I would just add another Select Like
this:

INSERT INTO tablename (field1,field2,field3)
SELECT table2.field1, table2.field2, table2.field3
FROM table2
SELECT LAST_INSERT_ID();


Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970

Filter Lovin: sql, database, query

-Original Message-
From: Billy Passauer [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 10:18 AM
To: Dave Carter
Subject: RE: LAST_INSERT_ID Issues


 -Original Message-
 From: Dave Carter [mailto:[EMAIL PROTECTED]]

 This does not return any results

 SELECT LAST_INSERT_ID() FROM tablename;

What did you do prior to executing the statement?  If you didn't do an
INSERT into a table that has an autoincrement field (while using the
same connection), you won't see any results.  Well, actually I just
tried that and it returned 0 (zero) - is that what you mean when you
say it doesn't return any results?  If I do what you said, I get a
zero returned for each row that is in the table.
BTW, drop the FROM tablename, the syntax is just: SELECT
LAST_INSERT_ID();

 ... Billy ...



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

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




Indexing problem with large database

2001-05-25 Thread Mike W. Baranski

Folks,

I am with Security Managment Consulting, and we have a liscensed copy of
mysql.  I don't have the lisc. # on hand.

We have a very large database in mysql, and one of the tables (call it
badge_history) has about 4,000,000 records, with the potiental to get
much bigger...

Now, we are using PHP/mysql to run web queries on this database, and
some of the queries are taking up to 1 hour.  Here is an example query:

**Example
Query***
SELECT DISTINCT badge_history.xact_date AS xact_date,
badge_history.xact_time AS xact_time, badge_history.last_name AS
last_name, badge_history.bid AS bid, badgests.cond_desc AS status,
department.description AS department,
badge_history.reader_desc AS reader_desc, area.description AS area,
badge.expired_date AS expired, badge_history.xact_type AS
xact_type, badge_history.tzcorr AS tzcorr FROM badge_history, badgests,
department, area, badge LEFT JOIN
smccm_user_vs_permitted_department ON badge_history.dept =
smccm_user_vs_permitted_department.permitted_department
WHERE smccm_user_vs_permitted_department.smccm_user = '1' AND
badge_history.dept = department.id AND
badge_history.area = area.id AND badge_history.status = badgests.id AND
badge_history.source_host = area.source_host AND
badge_history.bid = badge.bid
End Example
Query**

Now, if we describe the statement:

|badgests  |ALL|id|NULL|NULL|NULL|4|Usingtemporary|

|badge_history |ref|   
ixbid,ixarea,ixdept,ixstatus|ixstatus|4|badgests.id|1048640||

|department|eq_ref| ixid|ixid|4|badge_history.dept|1||

|area  |eq_ref|
ixid|ixid|68|badge_history.area,badge_history.source_host|1||

|badge |ref|ixbid| ixbid|18|badge_history.bid|1||

|smccm_user_vs_permitted_department |ref |permitted_department|
permitted_department  
|4|badge_history.dept|16|whereused;Distinct|

Any ideas on how to make this faster, it needs to run in less than 5
minutes.  The machine is a dual pentiup 8XX Mhz with 900 MB Ram.  Is it
possible to speed this up somehow...

Thanks, and please reply to [EMAIL PROTECTED], as I don't subscribe to
the list.

--
*
Mike W. Baranski
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Web  : http://www.secmgmt.com
Phone: 919-788-9200
Fax  : 919-510-0037

P.O. box 30099
Raleigh, N.C. USA 27622
*

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

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: Symbolic Links under Windows (Resolved!)

2001-05-25 Thread Tom Bates

The problem has been resolved. There is apparently an undocumented option 
(at least it's not documented in the HTML manual for 3.23.38) required in 
the my.cnf file - use-symbolic-links. I was using all default values, so 
I wasn't even using a my.cnf or a my.ini file.

Here's how I made it work on my NT system:

1. Upgrade to 3.23.38 (someone suggested I needed that, although the HTML 
documentation said that symbolic link support was compiled into the binary 
distribution much earlier; I doubt this is necessary)
2. Copy c:\mysql\my-example.cnf to c:\my.cnf
3. Edit c:\my.cnf and comment out all the options; just leave [myslqd] section
4. Add use-symbolic-links to the [mysqld] section
5. Start mysql-max-nt service
6. Create the mydb.sym file in the c:\mysql\data directory, with the line 
c:\inetpub\wwwroot\mydb\. Note the trailing backslash; I was told this is 
important.

Database is ready to go.

Thanks to all who offered their help. The final pieces of the puzzle were 
supplied by Miguel Angel Solórzano.

Tom Bates


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

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: Symbolic Links under Windows (Resolved!)

2001-05-25 Thread Tom Bates

The problem has been resolved. There is apparently an undocumented option 
(at least it's not documented in the HTML manual for 3.23.38) required in 
the my.cnf file - use-symbolic-links. I was using all default values, so 
I wasn't even using a my.cnf or a my.ini file.

Here's how I made it work on my NT system:

1. Upgrade to 3.23.38 (someone suggested I needed that, although the HTML 
documentation said that symbolic link support was compiled into the binary 
distribution much earlier; I doubt this is necessary)
2. Copy c:\mysql\my-example.cnf to c:\my.cnf
3. Edit c:\my.cnf and comment out all the options; just leave [myslqd] section
4. Add use-symbolic-links to the [mysqld] section
5. Start mysql-max-nt service
6. Create the mydb.sym file in the c:\mysql\data directory, with the line 
c:\inetpub\wwwroot\mydb\. Note the trailing backslash; I was told this is 
important.

Database is ready to go.

Thanks to all who offered their help. The final pieces of the puzzle were 
supplied by Miguel Angel Solórzano.

Tom Bates 


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

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




What can I do ?

2001-05-25 Thread Bruno Faé

Hello, I´m Brazilian and a new subscriber of this list.
(sorry my english)

I´m working with MySql and with a 100.000 rows table, this table is
growing 300 rows in each day.
How can I arrange this information to get a good performance of my
queries (my SELECT´s) ?

We intend to do this:
Work with 2 databases, put 10.000 in the one that I have 90% of acces,
and put the rest of rows in the orther.
Is this a good idea with MySql ?

Or there is a better way to do this ?

Thank You !
Bruno Fae.

_
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: What can I do ?

2001-05-25 Thread Colin Faber

I'm sorry, but we need a little more information, Such as the query
you're using, the machine type, ram etc., the table structure. With out
those its very hard to help you optimize anything.


Bruno Faé wrote:
 
 Hello, I´m Brazilian and a new subscriber of this list.
 (sorry my english)
 
 I´m working with MySql and with a 100.000 rows table, this table is
 growing 300 rows in each day.
 How can I arrange this information to get a good performance of my
 queries (my SELECT´s) ?
 
 We intend to do this:
 Work with 2 databases, put 10.000 in the one that I have 90% of acces,
 and put the rest of rows in the orther.
 Is this a good idea with MySql ?
 
 Or there is a better way to do this ?
 
 Thank You !
 Bruno Fae.
 
 _
 
 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




Re: What can I do ?

2001-05-25 Thread Eric Fitzgerald

It's all about index's.  My current big table is a table which currently
has ~500,000 rows.  We add around 4000-5000 rows a day.  This is simply a
table storing session data for visitors.  Because of the large amounts of
inserts, we keep the index's low, have 1 primary and 2 non unique index's
which keeps inserts fast.  All the access's of this table are done on the
primary key (users session id) keeping the reading fast also.  Just be
clever with your index's and you should be fine.

- Original Message -
From: Bruno Faé [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 9:42 AM
Subject: What can I do ?


 Hello, I´m Brazilian and a new subscriber of this list.
 (sorry my english)

 I´m working with MySql and with a 100.000 rows table, this table is
 growing 300 rows in each day.
 How can I arrange this information to get a good performance of my
 queries (my SELECT´s) ?

 We intend to do this:
 Work with 2 databases, put 10.000 in the one that I have 90% of acces,
 and put the rest of rows in the orther.
 Is this a good idea with MySql ?

 Or there is a better way to do this ?

 Thank You !
 Bruno Fae.

 _
 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




Compilation problems.

2001-05-25 Thread Nicu Popovici


Hello Gurus,

I am trying to write a C client for a mysql server and I compile the
example with the following line
 gcc -g Bug_Report.c -o test.o
-I/usr/include/mysql -L/usr/lib/mysql
-lmysqlclient -lnsl -lsocket

but I get the following  linking errors

/home/nicu/QA/Bug_Report.c:7: undefined reference to `mysql_init'
/home/nicu/QA/Bug_Report.c:8: undefined reference to `mysql_real_connect'

Can anyone point me in the right direction.

Thank you,
Nicu



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

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




update a column

2001-05-25 Thread Tiago Mota

Hi,

I have a book explanning mysql and the commands, and I was here searching 
for some kind of a command that do waht I want. But I didn't find 
anything


I have a table named as mytable and two columns (id, name).
Like this
id name
1  blue dot
2  blue pencil
3  blue pen
.

And I want to alter all the cell's that have the word blue. I want 
to remove the word blue from the cells, without edit them 1 by 1.
So it will be
id name
1  dot
2  pencil
3  pen



Thanks,
Tiago Mota







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

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




How many records can MySql handle?

2001-05-25 Thread Zhu George-CZZ010

If each record is about 1K byte, how many records can MySql handle?  Does anyone have 
any estimation or hands-on experience?

Thank you very much in advance.

Regards,
George

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

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: Compilation problems.

2001-05-25 Thread Eric Fitzgerald

Does your Bug_Report.c have an #include line for the mysql headers?
- Original Message - 
From: Nicu Popovici [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 9:54 AM
Subject: Compilation problems.


 
 Hello Gurus,
 
 I am trying to write a C client for a mysql server and I compile the
 example with the following line
  gcc -g Bug_Report.c -o test.o
 -I/usr/include/mysql -L/usr/lib/mysql
 -lmysqlclient -lnsl -lsocket
 
 but I get the following  linking errors
 
 /home/nicu/QA/Bug_Report.c:7: undefined reference to `mysql_init'
 /home/nicu/QA/Bug_Report.c:8: undefined reference to `mysql_real_connect'
 
 Can anyone point me in the right direction.
 
 Thank you,
 Nicu
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: update a column

2001-05-25 Thread Eric Fitzgerald

UPDATE table SET name = REPLACE(name,'blue','');

- Original Message -
From: Tiago Mota [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 9:43 AM
Subject: update a column


 Hi,

 I have a book explanning mysql and the commands, and I was here searching
 for some kind of a command that do waht I want. But I didn't find
 anything


 I have a table named as mytable and two columns (id, name).
 Like this
 id name
 1  blue dot
 2  blue pencil
 3  blue pen
 .

 And I want to alter all the cell's that have the word blue. I want
 to remove the word blue from the cells, without edit them 1 by 1.
 So it will be
 id name
 1  dot
 2  pencil
 3  pen



 Thanks,
 Tiago Mota







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

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





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

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




Re: How many records can MySql handle?

2001-05-25 Thread Eric Fitzgerald

Depends on OS, memory, disk space.

Theoretically there is no limit.

If your using linux, and don't have support for large files built in, then
your table size limit is 4GB.  Putting a table with 1k rows at a max size of
around 4 million records.  If you have large file support in, and have the
RAM/cpu to support it, you can FAR exceed that.
- Original Message -
From: Zhu George-CZZ010 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 9:56 AM
Subject: How many records can MySql handle?


 If each record is about 1K byte, how many records can MySql handle?  Does
anyone have any estimation or hands-on experience?

 Thank you very much in advance.

 Regards,
 George

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

 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: Indexing problem with large database

2001-05-25 Thread ryc

With the correct indexes this query should run in less than a second.
Basically what you should do is make an index for every column that is used
in the where clause. For instance, if you had a query ... WHERE A=X AND B=Y
AND C=Z (A,B,and C are in the same table) you would create an index (A,B,C)
and it would make this query tons faster for large data sets. It is a good
idea to put the most restrictive column first in the index. By restrictive I
mean the column that has the most amount of distinct rows, ie if we had the
index (A,B,C) and the column A is mostly filled with X's, putting A first
wouldnt narrow the search down as much because mysql would have to check
every index that begins with X. Hope that was a clear enough explaination.

ryan


 **Example
 Query***
 SELECT DISTINCT badge_history.xact_date AS xact_date,
 badge_history.xact_time AS xact_time, badge_history.last_name AS
 last_name, badge_history.bid AS bid, badgests.cond_desc AS status,
 department.description AS department,
 badge_history.reader_desc AS reader_desc, area.description AS area,
 badge.expired_date AS expired, badge_history.xact_type AS
 xact_type, badge_history.tzcorr AS tzcorr FROM badge_history, badgests,
 department, area, badge LEFT JOIN
 smccm_user_vs_permitted_department ON badge_history.dept =
 smccm_user_vs_permitted_department.permitted_department
 WHERE smccm_user_vs_permitted_department.smccm_user = '1' AND
 badge_history.dept = department.id AND
 badge_history.area = area.id AND badge_history.status = badgests.id AND
 badge_history.source_host = area.source_host AND
 badge_history.bid = badge.bid
 End Example
 Query**

 Now, if we describe the statement:

 |badgests  |ALL|id|NULL|NULL|NULL|4|Usingtemporary|

 |badge_history |ref|
 ixbid,ixarea,ixdept,ixstatus|ixstatus|4|badgests.id|1048640||

 |department|eq_ref| ixid|ixid|4|badge_history.dept|1||

 |area  |eq_ref|
 ixid|ixid|68|badge_history.area,badge_history.source_host|1||

 |badge |ref|ixbid| ixbid|18|badge_history.bid|1||

 |smccm_user_vs_permitted_department |ref |permitted_department|
 permitted_department
 |4|badge_history.dept|16|whereused;Distinct|

 Any ideas on how to make this faster, it needs to run in less than 5
 minutes.  The machine is a dual pentiup 8XX Mhz with 900 MB Ram.  Is it
 possible to speed this up somehow...

 Thanks, and please reply to [EMAIL PROTECTED], as I don't subscribe to
 the list.

 --
 *
 Mike W. Baranski
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]

 Web  : http://www.secmgmt.com
 Phone: 919-788-9200
 Fax  : 919-510-0037

 P.O. box 30099
 Raleigh, N.C. USA 27622
 *

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

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



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

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




Re: How many records can MySql handle?

2001-05-25 Thread Colin Faber

it all depends on your hardware, technically the MyISAM table type can
handle up to 8 terabytes of data.

Zhu George-CZZ010 wrote:
 
 If each record is about 1K byte, how many records can MySql handle?  Does anyone 
have any estimation or hands-on experience?
 
 Thank you very much in advance.
 
 Regards,
 George
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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




Version 3.23.38 and show databases

2001-05-25 Thread Marc Delisle

Hi,

(Sorry about my previous post: wrong list)

In 3.23.32, I can do a show databases, no problem, it shows my 18 database names.  
But with
3.23.38, with the same user, I only get 36 empty rows
for a show databases.

Same problem with show tables.  

However, my applications work ok under 3.23.38, because they know the database and 
table names.

Any ideas?

-- 
Marc Delisle  
Service de l'informatique
Collège de Sherbrooke, Québec

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

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




Socks error connecting to mysql on localhost

2001-05-25 Thread frank_dmuchowski

Hi,

Using linux redhat 6.2, apache1.3.20 (compiled fresh), php4.0.5 (compiled
fresh with msql support), mysql 3.23.38 (rpm install for server and
client).

I run the following php4 test  script in query.php from a browser:

snip--
?php
 $hostname=localhost;
 $username=;
 $password=;
 $databasename= midisland;
 $tablename = list;
?

?php
mysql_connect($hostname, $username, $password);
$db_table = mysql_list_dbs();

?
snip--

I get the following errors when I view the souce in my browser

br
bWarning/b:  MySQL Connection Failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (111)
 in b/home/httpd/html/query.php/b on line b21/bbr
br
bWarning/b:  MySQL Connection Failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (111)
 in b/home/httpd/html/query.php/b on line b22/bbr
br
bWarning/b:  MySQL:  A link to the server could not be established in
b/home/httpd/html/query.php/b on line b22/bbr
br
bWarning/b:  Supplied argument is not a valid MySQL result resource in
b/home/httpd/html/query.php/b on line b23/bbr

mysql.sock is in /var/lib/mysql  and not /tmp/mysql.sock.

Can someone give me an idea as to what's wrong?

Thanks,


Frank


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

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




REPOST: mysql hangs on shutdown

2001-05-25 Thread tammy

Hi,

I recently installed in MySql from binary distribution mysql-
max-3.23.38-pc-linux-gnu-i686.tar.gz. The install worked fine, the 
database runs and performs fine but it refuses to shutdown short of a 
'kill -9'. This is not so good:( I have tried 'mysqladmin shutdown' and 
killing the safe_mysql and then the 'parent' (earliest started) mysql 
process but this only works with 'kill -9' on these processes. If I do a 
simple kill without forcing it (-9) then the processes hang -- will not 
respond to mysql, mysqladmin or telnet.

I'm running on Red Hat Linux release 5.2 (Apollo), kernel 2.0.36.
Formerly we ran mysql-3.22.20a.tar.gz (source distribution) on this same 
box without problems.


Here is a sample of the latest err log:
010521 15:28:53  mysqld started
010521 15:28:53  Warning: setrlimit couldn't increase number of open 
files to more than 256
010521 15:28:53  Warning: Changed limits: max_connections: 100  
table_cache: 73
Can't initialize InnoDB as 'innodb_data_file_path' is not set
/usr/local/mysql/bin/mysqld: ready for connections
010521 15:41:15  Aborted connection 7 to db: 'test' user: 'root' host: 
`localhost' (Got an error reading communication packets)
010521 15:41:51  Aborted connection 10 to db: 'unconnected' user: 'root' 
host: `localhost' (Got an error writing communication packets)
010521 15:41:51  /usr/local/mysql/bin/mysqld: Normal shutdown

The communication errors only appear on shutdowns. I am able to connect 
via mysqladmin and mysql and run SQL queries and create database schemas 
from SQL scripts, etc.


thanks for any help.

t

[EMAIL PROTECTED]

Synchronis LLC
4223 Glencoe Avenue, Suite B103
Marina del Rey, CA 90292-5694
www.synchronis.com
direct  310.305.8900
fax 310.305.8860


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

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




Re: How many records can MySql handle?

2001-05-25 Thread Michael Bacarella

 Depends on OS, memory, disk space.
 
 Theoretically there is no limit.
 
 If your using linux, and don't have support for large files built in, then
 your table size limit is 4GB.  Putting a table with 1k rows at a max size of
 around 4 million records.  If you have large file support in, and have the
 RAM/cpu to support it, you can FAR exceed that.

InnoDB tables, I'm told, have no such 4GB restriction.

  If each record is about 1K byte, how many records can MySql handle?  Does
 anyone have any estimation or hands-on experience?
 
  Thank you very much in advance.
 
  Regards,
  George
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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
 

-- 
Michael Bacarella [EMAIL PROTECTED]
Technical Staff / System Development,
New York Connect.Net, Ltd.

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

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 - getting it to start and stay running.

2001-05-25 Thread Tom Walker

I am trying to start mysqld on a RH7.1 box.  The mysql server was installed by the 
initial RH install routine.  I ran the install script to setup the initial databases.

I can run either the msql.server or mysqld commands and while the process starts with 
the /var/lib/mysql database, it just ends.  No error, nothing but mysql ended on the 
screen.  I cannot get the process to stick and stay running.

Any ideas?

Thank You, Tom.



mysql hangs on shutdown

2001-05-25 Thread tammy

Hi,

I recently installed in MySql from binary distribution mysql-
max-3.23.38-pc-linux-gnu-i686.tar.gz. The install worked fine, the 
database runs and performs fine but it refuses to shutdown short of a 
'kill -9'. This is not so good:( I have tried 'mysqladmin shutdown' and 
killing the safe_mysql and then the 'parent' (earliest started) mysql 
process but this only works with 'kill -9' on these processes. If I do a 
simple kill without forcing it (-9) then the processes hang -- will not 
respond to mysql, mysqladmin or telnet.

I'm running on Red Hat Linux release 5.2 (Apollo), kernel 2.0.36.
Formerly we ran mysql-3.22.20a.tar.gz (source distribution) on this same 
box without problems.


Here is a sample of the latest err log:
010521 15:28:53  mysqld started
010521 15:28:53  Warning: setrlimit couldn't increase number of open 
files to more than 256
010521 15:28:53  Warning: Changed limits: max_connections: 100  
table_cache: 73
Can't initialize InnoDB as 'innodb_data_file_path' is not set
/usr/local/mysql/bin/mysqld: ready for connections
010521 15:41:15  Aborted connection 7 to db: 'test' user: 'root' host: 
`localhost' (Got an error reading communication packets)
010521 15:41:51  Aborted connection 10 to db: 'unconnected' user: 'root' 
host: `localhost' (Got an error writing communication packets)
010521 15:41:51  /usr/local/mysql/bin/mysqld: Normal shutdown

The communication errors only appear on shutdowns. I am able to connect 
via mysqladmin and mysql and run SQL queries and create database schemas 
from SQL scripts, etc.


thanks for any help.

t

[EMAIL PROTECTED]

Synchronis LLC
4223 Glencoe Avenue, Suite B103
Marina del Rey, CA 90292-5694
www.synchronis.com
direct  310.305.8900
fax 310.305.8860


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

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 - getting it to start and stay running.

2001-05-25 Thread Eric Fitzgerald

1) Don't use the Redhat RPM's, download the RPM's from mysql.com
2) Check /var/lib/mysql/hostname.err for error reasons
3) Check your config
4) Don't use the Redhat RPM's.
- Original Message -
From: Tom Walker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 10:37 AM
Subject: mysql - getting it to start and stay running.


I am trying to start mysqld on a RH7.1 box.  The mysql server was installed
by the initial RH install routine.  I ran the install script to setup the
initial databases.

I can run either the msql.server or mysqld commands and while the process
starts with the /var/lib/mysql database, it just ends.  No error, nothing
but mysql ended on the screen.  I cannot get the process to stick and stay
running.

Any ideas?

Thank You, Tom.



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

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: Socks error connecting to mysql on localhost

2001-05-25 Thread Ravi Raman

hi.
quick fix:
if it's really in /var/lib/mysql/, just make a symlink in /tmp...
 ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

not-so-quick fix:
or, recompile php w/ the path to mysql and it should figure it out.

-ravi.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 1:20 PM
To: [EMAIL PROTECTED]
Subject: Socks error connecting to mysql on localhost


Hi,

Using linux redhat 6.2, apache1.3.20 (compiled fresh), php4.0.5 (compiled
fresh with msql support), mysql 3.23.38 (rpm install for server and
client).

I run the following php4 test  script in query.php from a browser:

snip--
?php
 $hostname=localhost;
 $username=;
 $password=;
 $databasename= midisland;
 $tablename = list;
?

?php
mysql_connect($hostname, $username, $password);
$db_table = mysql_list_dbs();

?
snip--

I get the following errors when I view the souce in my browser

br
bWarning/b:  MySQL Connection Failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (111)
 in b/home/httpd/html/query.php/b on line b21/bbr
br
bWarning/b:  MySQL Connection Failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (111)
 in b/home/httpd/html/query.php/b on line b22/bbr
br
bWarning/b:  MySQL:  A link to the server could not be established in
b/home/httpd/html/query.php/b on line b22/bbr
br
bWarning/b:  Supplied argument is not a valid MySQL result resource in
b/home/httpd/html/query.php/b on line b23/bbr

mysql.sock is in /var/lib/mysql  and not /tmp/mysql.sock.

Can someone give me an idea as to what's wrong?

Thanks,


Frank


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

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




setting an index

2001-05-25 Thread Webmaster

I'm not sure if an index would help me or not in this case.. and not
sure how to set one at creation. So I'll explain it all

My main select is 
select * from on_db where time$t_tim ORDER BY place DESC

I also run the query
select * from on_db where time$t_tim AND place='thisplace'

$t_tim is the current unix time -5 mins

the updates are simply
update on_db set time='$time',place='$place' where person='$person';

as you can see by the table below 'person' is the primary key so is
indexed
this table is updated nearly every second and 'time' is the unix time
input so is very possible to get same results so cannot make that unique
nor 'place' unique.. 

mysql describe on_db;
++--+--+-+-+---+
| Field  | Type | Null | Key | Default | Extra |
++--+--+-+-+---+
| person | char(50) |  | PRI | |   |
| time   | int(20)  |  | | 0   |   |
| place  | char(50) |  | | |   |
++--+--+-+-+---+
3 rows in set (0.02 sec)

this is the command i used to create the table;

CREATE TABLE on_db (
  person char(50) DEFAULT '' NOT NULL,
  time int(20) DEFAULT '0' NOT NULL,
  place char(50) DEFAULT '' NOT NULL,
  PRIMARY KEY (handle),
  UNIQUE id (handle)
);

what would be the syntax used to create indexes for time and place at
table creation?
I looked through the docs but it seemed a bit confussing and since this
is a production system i didnt want to just guess.

Also, will the index help or hurt since the time and place keys are
updated constantly
is there and advantage or do you think it would be a waste of time. The
table itself usually ends up with around 15,000 entries which constantly
update based on the person and the time and place they are. 

any thoughts are welcomed.

--
Sign up for your free AngelHaven E-mail Today...
Join the growing community, http://www.AngelHaven.com 
Come Cruisin with the Angels http://www.AngelCruise.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




Another index question

2001-05-25 Thread Mike Baranski

For the following select:

SELECT DISTINCT badge_history.xact_date AS xact_date,
badge_history.xact_time AS xact_time, badge_history.last_name AS
last_name, badge_history.bid AS bid, badgests.cond_desc AS status,
department.description AS department, badge_history.reader_desc AS
reader_desc, area.description AS area, badge.expired_date AS expired,
badge_history.xact_type AS xact_type, badge_history.tzcorr AS tzcorr
FROM badge_history, badgests, department, area, badge LEFT JOIN
smccm_user_vs_permitted_department ON badge_history.dept =
smccm_user_vs_permitted_department.permitted_department WHERE
smccm_user_vs_permitted_department.smccm_user = '1' AND
badge_history.dept = department.id AND badge_history.area = area.id AND
badge_history.status = badgests.id AND badge_history.source_host =
area.source_host AND badge_history.bid = badge.bid

The badge table has 85,000 records, and the badge_history has 4,000,000.
 This search takes a very long time to run.  What indexes should I have
on these 2 tables to make it run in a reasonable amount of time (5
minutes), or should I just get Oracle or something?  I have indexed like
this:

alter table badge_history add index ixBigIx (dept, area, status,
source_host, bid)

This does not help much, it just causes all of the badge table to be
pulled in.  There is already an index on the bid col in the badge table.
I really need this to get working, I've been adding indexes all day and
can't get the query to list less than 25 million rows when I describe
it.  Any advice is appreciated.

Mike.

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

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: Another index question

2001-05-25 Thread Marc Delisle

Did you try EXPLAIN before SELECT?
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#EXPLAIN

Mike Baranski a écrit :
 
 For the following select:
 
 SELECT DISTINCT badge_history.xact_date AS xact_date,
(...)

-- 
Marc Delisle  
Service de l'informatique
Collège de Sherbrooke, Québec

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

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 Not Right

2001-05-25 Thread Roger Karnouk

I am trying to do a left join query to retrieve all the rows in Table T1
and a value from server01_history. 
There are 100 rows in T1 and I expect some NULL values for b.total 
returned from server01_history.

Does anyone have any Idea why I only get back 93 rows with no nulls
when I should get 100 rows due to the nature of a left join?

I'm using MySQL version 3.23.34

SELECT a.* ,b.total 
FROM T1 a USE INDEX(PRIMARY) 
LEFT JOIN server01_history b 
USE INDEX(PRIMARY) ON (a.crcid = b.crcid) 
WHERE b.tag=1 
AND b.day=11323;

CREATE TABLE `server01_history` (
  `crcid` int(10) unsigned NOT NULL default '0',
  `tag` smallint(5) unsigned NOT NULL default '0',
  `day` int(10) unsigned NOT NULL default '0',
  `total` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`crcid`,`tag`,`day`),
) TYPE=MyISAM 

CREATE TABLE `T1` (
  `crcid` int(10) unsigned NOT NULL default '0',
  `sum` int(10) unsigned NOT NULL default '0',
  `item` mediumtext NOT NULL,
  PRIMARY KEY  (`crcid`)
) TYPE=MyISAM

Roger Karnouk
MediaHouse Software Inc.
[EMAIL PROTECTED]
http://www.mediahouse.com

MediaHouse Software Inc., leading developers of
LiveStats - Nonstop Web Reporting 
ipMonitor - 99.99% Uptime for your Networks


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

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




$dbh-tables, SHOW tables, etc.

2001-05-25 Thread Daniel

Has there been any resolution the
show tables;
show databases;
my @tablenames = $dbh-tables;
etc...

not working on RedHat 7.X machines?

-- 
Daniel Bohling
NewsFactor Network


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

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: $dbh-tables, SHOW tables, etc.

2001-05-25 Thread Colin Faber

A few people have said that they've fixed it by recompiling mysql with
gcc 2.96

Daniel wrote:
 
 Has there been any resolution the
 show tables;
 show databases;
 my @tablenames = $dbh-tables;
 etc...
 
 not working on RedHat 7.X machines?
 
 --
 Daniel Bohling
 NewsFactor Network
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: LAST_INSERT_ID Issues

2001-05-25 Thread Paul DuBois

At 9:48 AM -0400 5/25/01, Dave Carter wrote:
This does not return any results

SELECT LAST_INSERT_ID() FROM tablename;

It doesn't return *any* results? Or do you mean it returns 0?


FROM tablename is superfluous here; the most recent AUTO_INCREMENT value
is maintained on a per-connection basis. This means that if you want to
use this value, you must:
- Issue some statement (e.g., INSERT) that causes an AUTO_INCREMENT value
   to be generated, and
- You must select the value of LAST_INSERT_ID() within the *same* session.

If you issue the INSERT, then disconnect, reconnect, and retrieve the value
of LAST_INSERT_ID(), it won't work (you'll get zero), because that involves
two sessions with the server, not one.


there is an indexed, auto-incrementing field in the table, but it refuses to
show any results. I don't understand the manual's text, so any help would be
appreciated.


Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970

g sql,database


-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




RE: LAST_INSERT_ID Issues

2001-05-25 Thread Paul DuBois

At 10:39 AM -0400 5/25/01, Dave Carter wrote:
So in my insert into  select, I would just add another Select Like
this:

INSERT INTO tablename (field1,field2,field3)
SELECT table2.field1, table2.field2, table2.field3
FROM table2
SELECT LAST_INSERT_ID();

Uh, no.  Perhaps you should tell us exactly what you're trying to do,
because we're just guessing.  The statement above isn't legal, but even
if it were, it's not clear what use you're trying to make of LAST_INSERT_ID().

If what you're doing is inserting a record into one table that generates
an AUTO_INCREMENT value, and then trying to create a record in a second
table that uses the new value, you'd do something like this:

INSERT INTO first_table ...

INSERT INTO second_table (id,other_field1,other_field2,...)
VALUES (LAST_INSERT_ID(),# this is the new AUTO_INCREMENT value
value_for_other_field1,
value_for_other_field2,
...);



Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970

Filter Lovin: sql, database, query

-Original Message-
From: Billy Passauer [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 10:18 AM
To: Dave Carter
Subject: RE: LAST_INSERT_ID Issues


  -Original Message-
  From: Dave Carter [mailto:[EMAIL PROTECTED]]

  This does not return any results

  SELECT LAST_INSERT_ID() FROM tablename;

What did you do prior to executing the statement?  If you didn't do an
INSERT into a table that has an autoincrement field (while using the
same connection), you won't see any results.  Well, actually I just
tried that and it returned 0 (zero) - is that what you mean when you
say it doesn't return any results?  If I do what you said, I get a
zero returned for each row that is in the table.
BTW, drop the FROM tablename, the syntax is just: SELECT
LAST_INSERT_ID();

  ... Billy ...


-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




RE: LAST_INSERT_ID Issues

2001-05-25 Thread Dave Carter

No results not even a zero. So what I did was something like this:

INSERT INTO table1 (field1,field2,field3)
SELECT table2.field1, table2.field2, table2.field2
FROM table2
WHERE table2.UID = SomeVariable;

SELECT MAX(table1.UID) FROM table1;

---
Now this assumes that UID is the unique ID number. Can you see a flaw in
this logic?


Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 4:25 PM
To: Dave Carter; [EMAIL PROTECTED]
Subject: Re: LAST_INSERT_ID Issues


At 9:48 AM -0400 5/25/01, Dave Carter wrote:
This does not return any results

SELECT LAST_INSERT_ID() FROM tablename;

It doesn't return *any* results? Or do you mean it returns 0?


FROM tablename is superfluous here; the most recent AUTO_INCREMENT value
is maintained on a per-connection basis. This means that if you want to
use this value, you must:
- Issue some statement (e.g., INSERT) that causes an AUTO_INCREMENT value
   to be generated, and
- You must select the value of LAST_INSERT_ID() within the *same* session.

If you issue the INSERT, then disconnect, reconnect, and retrieve the value
of LAST_INSERT_ID(), it won't work (you'll get zero), because that involves
two sessions with the server, not one.


there is an indexed, auto-incrementing field in the table, but it refuses
to
show any results. I don't understand the manual's text, so any help would
be
appreciated.


Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970

g sql,database


--
Paul DuBois, [EMAIL PROTECTED]


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

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




Re: $dbh-tables, SHOW tables, etc.

2001-05-25 Thread Daniel

I'm up to 3.23.37-1 (compiled with gcc 2.96-69).
Haven't had one work properly starting with 3.23.32.

Gulp...It's been months now.


Thanks for the reply though,
-- 
Daniel Bohling
NewsFactor Network


Colin Faber wrote:

 A few people have said that they've fixed it by recompiling mysql with
 gcc 2.96
 
 Daniel wrote:
 
 Has there been any resolution the
 show tables;
 show databases;
 my @tablenames = $dbh-tables;
 etc...
 
 not working on RedHat 7.X machines?
 
 --
 Daniel Bohling
 NewsFactor Network
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: time and date

2001-05-25 Thread Alexander Skwar

So sprach chris am Tue, Apr 02, 2002 at 08:26:01PM -0500:
   ^

You're quite ahead of me, timewise *G*

 Is there a way to store the time and date that a record was added within
 MySQL? I want to show the time and date on some of my records and can't seem

Add a DATETIME or TIMESTAMP column.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 0 hours 36 minutes

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

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: $dbh-tables, SHOW tables, etc.

2001-05-25 Thread Daniel

Scratch that, normally egcs and gcc are the same, at least on older 
redhat distros. Redhat 7.0 gives you compat-egcs package which isn't the 
same as your gcc.

I symlinked (on a 7.1 redhat box) egcs to gcc (2.96-69) and --rebuild 
3.23.38 from the .src.rpm.
Both show tables, show databases now work.

Thanks for the heads up Colin.

Daniel wrote:

 I'm up to 3.23.37-1 (compiled with gcc 2.96-69).
 Haven't had one work properly starting with 3.23.32.
 
 Gulp...It's been months now.
 
 
 Thanks for the reply though,


-- 
Daniel Bohling
NewsFactor Network


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

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




Case question on inserting data

2001-05-25 Thread Dave Carter

Is there a way inside of mysql to force the case of data being inserted into
the database???


Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970


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

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: Memory/CPU usage of various JOIN types?

2001-05-25 Thread Chris Petersen

I've been using LEFT JOIN and NATURAL LEFT JOIN for awhile on queries to
medium-sized tables (2500-50,000 items) that aren't TOO large by ane means,
but have seemingly been having some issues with this.  Can anyone here
explain to me the memory usage between doing things like:

SELECT SUM(tab1.val) FROM tab1 NATURAL LEFT JOIN tab2 GROUP BY tab2.val2

SELECT SUM(tab1.val) FROM tab1 LEFT JOIN tab2 ON tab1.id=tab2.id GROUP BY
tab2.val2

SELECT SUM(tab1.val) FROM tab1, tab2 WHERE tab1.id=tab2.id GROUP BY tab2.id

???   seemingly, only the last one is the most reliable - the others start
running out of memory as the tables get larger and larger.  And then again,
sometimes it, too, runs out of memory (different tables/query) and when I go
back to a LEFT JOIN, it
works fine.

-Chris



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

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: Case question on inserting data

2001-05-25 Thread Alexander Skwar

So sprach Dave Carter am Fri, May 25, 2001 at 06:21:08PM -0400:
 Is there a way inside of mysql to force the case of data being inserted into
 the database???

- http://www.mysql.com/doc/S/t/String_functions.html

LOWER() / LCASE()  and UPPER() / UCASE()

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 hour 26 minutes

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

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




ERROR 2002:

2001-05-25 Thread Jeff Pace

Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'

Can anyone tell me what to do about this error.

I installed mysql on Redhat 7.0 with the RPM on the Redhat Cd


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

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: ERROR 2002:

2001-05-25 Thread Mike


Scratch the Red Hat RPM and get the latest build from www.mysql.com This is
a FAQ here.

Cheers

Mike
-Original Message-
From: Jeff Pace [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 4:40 PM
To: [EMAIL PROTECTED]
Subject: ERROR 2002:


Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'

Can anyone tell me what to do about this error.

I installed mysql on Redhat 7.0 with the RPM on the Redhat Cd


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

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




Updating one table off of another?

2001-05-25 Thread Chris Petersen

I know this is a fairly common question, but I thought I'd ask it anyway.  I
want to do something like:

UPDATE tab1 SET tab1.val=tab2.val WHERE tab1.id=tab2.id;

Is there any way to do a query like this?

Thanks,

Chris


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

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




a question of which function of mysql to use

2001-05-25 Thread Nikki

Hi,

i am unsure what to put in this line, currectly i have the following line

$RS=mysql_fetch_array($RS_query);

but i get the following error message

supplied argument is not a valid MySQL result resource. so that statement most be 
total wrong.

i am trying to get a result from a row when the username and password matches in a 
database. the line before is as follows

$RS_query-MySQL_query(($SQL),$MyConn);

so what should i use is the $RS line that does the same job.
any help that you can give me would be great

thanks
Rose



Do You Have Paper Business Cards. Check Out Jamie's Online Card

2001-05-25 Thread jlynch

Please Click Link For an Example


www.jmelynch.com 

Need More Business? Contact Us.

Email: [EMAIL PROTECTED] with your Phone Number 
 
 
Thank-You

Jamie Lynch

 
 
 
We comply with proposed federal legislation regarding unsolicited 
commercial e-mail by providing you with a method for your e-mail 
address to be permanently removed from our database and any future 
mailings from our company. 
To remove your address, please send an e-mail message to 
[EMAIL PROTECTED] 
  
Dircan Inc. 
205 Richmond St. W. 
Suite # 702 
Toronto, Ontario 
M5V 1V3 
416-979-0476 x102 
 

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

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




DBI access from CGI script

2001-05-25 Thread Simon Chan

Hey all,

Using a CGI script, I want to access a database from A DIFFERENT server than the mysql 
database is
hosted.  What is the proper syntax to access the mysql database on a different server?

They're 2 levels of secruity:
1. Log into Telnet shell
2. Log into database

This is what I have derived from O'Reilly books, though they make the assumption that 
you are
running the script from the same server as the database:

$dbh = DBI-connect(dbi:mysql:table1, $host, $user, $password) or die Unable 
to connect;
# table1 is the name of database.

From this code, it doesn't appear to be able to connect to the database, perhaps due 
to the FIRST
level of secruity.

Any help would be appreciated.  Many thanks.

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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: DBI access from CGI script

2001-05-25 Thread Chris Petersen

 This is what I have derived from O'Reilly books, though they make the
 assumption that you are
 running the script from the same server as the database:
 $dbh = DBI-connect(dbi:mysql:table1, $host, $user, $password) or die
 Unable to connect;
 # table1 is the name of database.

I believe it's pretty safe to say that the $host variable in that statement
is the IP of the server you're trying to connect to.  I can't test this,
however, since the databases I have access to are all restricted to
localhost access...

I don't see why you'd need telnet access.

-Chris


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

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: DBI access from CGI script

2001-05-25 Thread Andy Sharp

The syntax for connecting to a mysql database from perl/DBI is

my $dbh =
DBI-connect('dbi:drivername:database:host','username','passwor
d');

If host is ommitted, it presumes localhost.

Eg: $dbh =
DBI-connect('dbi:mysql:testDB:dbserv','$username','$password');

There are more options see perldoc DBI and perldoc DBD::mysql

--A

 This is what I have derived from O'Reilly books, though they make the

 assumption that you are running the script from the same server as
the 
 database: $dbh = DBI-connect(dbi:mysql:table1, $host, $user, 
 $password) or die Unable to connect;
 # table1 is the name of database.

 I believe it's pretty safe to say that the $host variable in that 
 statement is the IP of  the server you're trying to connect to.  I 
 can't test this, however, since the databases I have access to are 
 all restricted to localhost access...





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

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: DBI access from CGI script

2001-05-25 Thread Colin Faber

This is well outlined in the DBI perldoc btw ;-)


Andy Sharp wrote:
 
 The syntax for connecting to a mysql database from perl/DBI is
 
 my $dbh =
 DBI-connect('dbi:drivername:database:host','username','passwor
 d');
 
 If host is ommitted, it presumes localhost.
 
 Eg: $dbh =
 DBI-connect('dbi:mysql:testDB:dbserv','$username','$password');
 
 There are more options see perldoc DBI and perldoc DBD::mysql
 
 --A
 
  This is what I have derived from O'Reilly books, though they make the
 
  assumption that you are running the script from the same server as
 the
  database: $dbh = DBI-connect(dbi:mysql:table1, $host, $user,
  $password) or die Unable to connect;
  # table1 is the name of database.
 
  I believe it's pretty safe to say that the $host variable in that
  statement is the IP of  the server you're trying to connect to.  I
  can't test this, however, since the databases I have access to are
  all restricted to localhost access...
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Mysql and Windows ME?

2001-05-25 Thread Paul DuBois

At 5:13 AM + 5/26/01, tu tuande wrote:
Hello,

Does Mysql run on Windows ME? I have tried to start mysql, version
3.23.38, by mysqld but I got the error message: Can´t initalize
InnoDB as 'innodb_data_file_path' is not set. How could I solve
this problem? Thank
Frank Tu

http://www.mysql.com/doc/W/i/Windows_installation.html says:

NOTE: If you want to use InnoDB tables, there are certain startup
options that must be specified in your `my.ini' file! See section
8.7.2 InnoDB startup options.

Section 8.7.2 is http://www.mysql.com/doc/I/n/InnoDB_start.html

--
Paul DuBois, [EMAIL PROTECTED]

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

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