Re: join from two different databases

2001-03-18 Thread Fred van Engen

Richard,

On Fri, Mar 16, 2001 at 06:05:52PM -0600, Richard Reina wrote:
 I am try to do a join with tables that are in two different databases.
 
 I thing I've got the actual SQL syntax down:
 
 my $q = "SELECT i.inv_no, i.inv_date,
 c.cust_name
 FROM receivables.invoice i, sales.customer c,
   WHERE i.paid_date IS NULL"; 
 
 but I am confused on how to prepare and execute it, since my database
 handle ($dbh) specifies only 1 database.
 

The database handle defines the default database. So if your database handle
is on the receivables database, your query can be:

my $q = "SELECT i.inv_no, i.inv_date,
c.cust_name
FROM invoice i, sales.customer c,
WHERE i.paid_date IS NULL"; 

I.e. invoice i.s.o. receivables.invoice. Your query above will work regardless
of the database that your handle is for.

The only limitation is that the databases are managed by the same MySQL server.


Just try it.


One more thing about your query. You're doing a full join of the two tables.
You probably want something like "AND i.customer_id = c.id" in the WHERE
clause.


Regards,

Fred.

-- 
Fred van Engen  XO Communications B.V.
email: [EMAIL PROTECTED] Televisieweg 2
tel: +31 36 5462400 1322 AC  Almere
fax: +31 36 5462424 The Netherlands

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

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: Benchmarking innobase tables

2001-03-18 Thread Christian Jaeger

At 20:43 Uhr -0600 17.3.2001, Dan Nelson wrote:
In the last episode (Mar 17), Christian Jaeger said:
  innobase table:
   autocommit=0, rollback after each insert:   59 insert+rollback/sec.
  autocommit=0, one rollback at the end:  2926 inserts/sec.
  autocommit=0, one commit at the end:2763 inserts/sec.
   autocommit=1:   34 inserts/sec.

  In the last case I can hear the head from the hard disk vibrating, it
  seems that innobase synches each commit through to the disk oxide.
  I'm sure innobase isn't the fastest database in the world if this is
  true for everyone. Why could this be the case for me?

If you are going to be committing on every record, you'll want your
tablespace and logfile directories on separate disks to avoid
thrashing.  If you only have one disk and don't care if you lose the
last few transactions if your system crashes, try setting
innobase_flush_log_at_trx_commit=0 in my.cnf.

Wow, thanks. With innobase_flush_log_at_trx_commit=0, the benchmark now shows:

autocommit=0, rollback after each insert:   1587 inserts+rollbacks/sec
autocommit=1:   2764 inserts/sec.

That's even faster than myisam (2487 inserts/sec today)!!!

ChristianJ

--
   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[2]: Innobase in MySQL

2001-03-18 Thread Peter Zaitsev

Hello Andreas,

Saturday, March 17, 2001, 6:36:17 PM, you wrote:



AV I noticed that in 3. and 4. the machine load was constantly at 100% during
AV the inserts.
AV but during index recreation the load springs wildley between 0 and 100%, so
AV the machine is not maxed out in terms of CPU utilization here (in other
AV words, the machine is waiting for something to do :-). The same applies to
AV 2. when commit() was send.

AV I tested also 1. and 3. with a myisam-table. Index recreation draws
AV constantly 100% load from the machine here, therfore it's faster.

AV results:
AV 5. same as 1. but with myisam type = 116 seconds
AV 6. same as 3. but with myisam type = 65 seconds + additional 33 seconds for
AV index recreation.

Could you tell me what do you mean by index creation ? Did you drop
all indexes or only secondary index while leaving primary in fact ?



-- 
Best regards,
 Petermailto:[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: am I alone? (scale)

2001-03-18 Thread vinod p

hey..
   thanks for the info... 

   This is the my.cnf file that i'm using - 

[mysqld]
skip-locking
set-variable= key_buffer=640M
set-variable= max_allowed_packet=10M
set-variable= table_cache=640
set-variable= sort_buffer=6M
set-variable= record_buffer=6M
set-variable= thread_cache=16
set-variable= thread_concurrency=16
set-variable= myisam_sort_buffer_size=64M
log-bin
server-id   = 1
set-variable= max_connections=2000
set-variable= max_connect_errors=1
set-variable= back_log=2900
set-variable= connect_timeout=15
set-variable= wait_timeout=57600
set-variable= interactive_timeout=57600

Now the problem that i've managed to track down is -
When the CPU hits 100%, mysql crashes.  This behaviour
has been consistent across many many runs.  I would
definitely not like the database server to crash.  A
loss in performance is expected but a crash is most
definitely not.  As u can see, the limits are set
pretty high on the system.  Memory usage is not even
150MB.  What's the reason?  and the partial backtrace
that i'm getting is the same after every crash.

Any ideas?

Tx.
Vinod.


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

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

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[2]: Benchmarking innobase tables

2001-03-18 Thread Peter Zaitsev

Hello Christian,

Sunday, March 18, 2001, 12:22:44 PM, you wrote:


If you are going to be committing on every record, you'll want your
tablespace and logfile directories on separate disks to avoid
thrashing.  If you only have one disk and don't care if you lose the
last few transactions if your system crashes, try setting
innobase_flush_log_at_trx_commit=0 in my.cnf.

CJ Wow, thanks. With innobase_flush_log_at_trx_commit=0, the benchmark now shows:

CJ autocommit=0, rollback after each insert:   1587 inserts+rollbacks/sec
CJ autocommit=1:   2764 inserts/sec.

CJ That's even faster than myisam (2487 inserts/sec today)!!!

In this case you should compare it to myisam created with
delay_key_write=1, also  the size of key_buffer matter.

Also the problem with innobase_flush_log_at_trx_commit=0 should be
there is no guarantie the last transaction commited will be on it's
place if the power would be lost.  Also I don't know is it possible in
this case for database to be corrupted as some transactions may modify
database but are not in a logfile (Let's ask Heikki about this).



-- 
Best regards,
 Petermailto:[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: Innobase in MySQL

2001-03-18 Thread Andreas Vierengel

-Ursprngliche Nachricht-
Von: Heikki Tuuri [EMAIL PROTECTED]
An: [EMAIL PROTECTED] [EMAIL PROTECTED]
Datum: 17 March, 2001 17:35
Betreff: Re: Innobase in MySQL


Andy,

thank you for your benchmark :). I was also going to measure these,
but have not had time yet. But what parameters you used in
my.cnf? You have a lot of RAM in your system, and you could make
the Innobase buffer pool big.

I've tested with the default innobase parameters mentioned in the
documentation.


1. cat test.sql | mysql innobase  = 306 seconds
2. cat test.sql | mysql innobase, but with autocommit=0 and all inserts
between BEGIN/COMMIT = 124 seconds

If you use autocommit = 1, then Innobase has to flush the log to disk after
each individual insert, which makes it slow. It is better to use autocommit
= 0,
if you have enough space in your tablespace for the rollback segment.

ok, I understand.

3. same as 1. but with index creation after the inserts. = 264 seconds +
additional 59 seconds for index recreation.
4. same as 2. but with index creation after the inserts. = 75 seconds +
additional 59 seconds for index recreation.

How do you create the index? With ALTER TABLE?

yes, exactly.

I noticed that in 3. and 4. the machine load was constantly at 100% during
the inserts.
but during index recreation the load springs wildley between 0 and 100%,
so
the machine is not maxed out in terms of CPU utilization here (in other

Innobase has to write to the log which causes some disk i/o, reducing
CPU utilization. Also, when the database has written the log files
full, Innobase has to make a checkpoint, that is, flush written pages
from the buffer pool. You could try making your log files very big, say
150 MB in total, to get a better CPU utilization, and also the buffer pool
bigger, if it is not yet big.

ok, I will try the benchmark with tweaked values for innobase again.


Totally the opposite of spam! I got useful information from this!

ok, thanks ! I didn't read the mysql-mailinglist for a while, so I feared
"RTFM" as a reply to my posting :-)

--Andy


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

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




Re: Re[2]: Innobase in MySQL

2001-03-18 Thread Andreas Vierengel

-Ursprngliche Nachricht-
Von: Peter Zaitsev [EMAIL PROTECTED]
An: Andreas Vierengel [EMAIL PROTECTED]
Cc: Greg Cope [EMAIL PROTECTED]; Heikki Tuuri
[EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]
Datum: 18 March, 2001 10:35
Betreff: Re[2]: Innobase in MySQL



Could you tell me what do you mean by index creation ? Did you drop
all indexes or only secondary index while leaving primary in fact ?

I've created the table without any index, then did all the inserts and
afterwards created all index with one "alter table".

--Andy


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

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




Wrong result of ORDER BY xxx LIMIT x,x

2001-03-18 Thread root

Description:
Sorting (ORDER BY in INNOBASE tables) with LIMIT doesn't work
How-To-Repeat:
CREATE TABLE AUTHOR (ID int(7) NOT NULL auto_increment,
  First_Name_ru varchar(250) NOT NULL default '',
  Last_Name_ru varchar(250) NOT NULL default '',
  First_Name_en varchar(250) default NULL, Last_Name_en varchar(250) default NULL,
  Image varchar(250) default NULL, Description text,
  PRIMARY KEY  (ID), KEY First_Name_ru (First_Name_ru), KEY Last_Name_ru (Last_Name_ru)
) TYPE=Innobase;
mysql insert into AUTHOR (ID,First_Name_ru,Last_Name_ru) values ('','ddd','ddd');
mysql insert into AUTHOR (ID,First_Name_ru,Last_Name_ru) values ('','sss','sss');
mysql insert into AUTHOR (ID,First_Name_ru,Last_Name_ru) values ('','lll','lll');
mysql insert into AUTHOR (ID,First_Name_ru,Last_Name_ru) values ('','ccc','ccc');
mysql insert into AUTHOR (ID,First_Name_ru,Last_Name_ru) values ('','bbb','bbb');
mysql insert into AUTHOR (ID,First_Name_ru,Last_Name_ru) values ('','aaa','aaa');

select ID,First_Name_ru,Last_Name_ru from AUTHOR order by Last_Name_ru Limit 0, 2;
Fix:
Don't know :(
Submitter-Id:  [EMAIL PROTECTED]
Originator:
Organization:
News paper LENTA.CO.IL
MySQL support: none
Synopsis:  Wrong result of ORDER BY xxx LIMIT x,x
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.35 (Source distribution)

Environment:
IBM Netfinity 5100, Linux Slackware 7.1 + kernel 2.4.2
System: Linux www 2.4.2 #1 Mon Mar 5 10:37:36 IST 2001 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx   1 root root   13 Feb 28 12:07 /lib/libc.so.6 - libc-2.1.3.so
-rwxr-xr-x   1 root root  1013224 Mar 22  2000 /lib/libc-2.1.3.so
-rw-r--r--   1 root root 20266642 Mar 20  2000 /usr/lib/libc.a
-rw-r--r--   1 root root  178 Mar 20  2000 /usr/lib/libc.so
Configure command: ./configure  --with-charset=cp1251 
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock --prefix=/usr/local/mysql 
--with-libwrap --with-raid --with-mysqld-user=mysql --with-innobase


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

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




Persistent connection with php to mysql

2001-03-18 Thread Denis Mettler

Hi,

some of you work with php and mysql to connect a website with a mysql
database.
do u prefer an simple connection or a persistent connection?

and if u prefer the last one. how can u make this connection in the
index.php3?
do u make this with an "./include"?

thanks
regards
denis

   .'  '.'  `.
_.-|  o | o  |-._
  .~   `.__.'.__.'^  ~.
.~ ^  /   \  ^ ~.
\-._^   ^| |^_.-/
`\  `-._  \___/ ^_.-' /'
  `\_   `--...--'   /'
 `-..___..-'  /\  /\
__/   \__ | |/ /_
  .'^   ^`.  .'   `__\
.'^ ^  `.__.'^ .\ \
   .' ^ .^   .^  .'  \/
  //^ \'.__.'
 |  ^ /|   ^  |

http://www.denis-mettler.de


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

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 TABLE gives access denied

2001-03-18 Thread Tom Bellucco

Hi,

My web host just upgraded from a version that did not support the BACKUP
TABLE command (3.22.??) to the latest.  What I try to execute the BACKUP
TABLE command it fails with an access denied error.  He says I have all the
necessary privileges, but I have the feeling something is missing.  When I
execute SHOW GRANTS it says I have all privileges, but I wonder if there is
a new privilege for backuup that doesn't get turned on by default.  Any help
would be appreciated, please copy responses to my email as I am a new
subscriber and am concerned about missing any replies.

Thanks!

--
Tom Bellucco
TJ Computers  Consulting
[EMAIL PROTECTED]
www.tjcc.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




Tuple length Question

2001-03-18 Thread Leo Cambilargiu

Hello All:

I am looking into mysql as a web solution.  I am
implementing a multilanguage scheme.

I am considering separating the different languages by the
following three methods.

1.  Use different tables to hold different languages.

2.  Use the same table with another key (lang).

3.  Add extra attributes to a table and pick the ones
containing the language I want.

I am exploring possibility number 3 at the moment.

My question is, how long can a Mysql myisam table tuple be?

Currently I like the idea of increasing the number of
attributes except for this  possible constraint.  I might
have 6 to 10 languages supported max.  I'll start with 2.  I
will have no more than 15 attributes total and possibly 5
will be shared between languages.  This means i'll have to
add another 10 attributes per language implemented.

Thanks in advance.  Please email me at [EMAIL PROTECTED] or
[EMAIL PROTECTED]

Leo Cambilargiu


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

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: 22 when opening ISAM-table

2001-03-18 Thread Issam W. Alameh

I am getting the error error: 22 when opening ISAM-table when trying to do isamchk on 
sometables

any hint

Issam



C API problem

2001-03-18 Thread john1

Dear Sir :

MySQL 3.22.32 on my linux 486 PC seems work so good. When I compile 
a simple C API program which catched from MySQL tutorial, it
chokes at the end of compile process . The program is as follows:

#include stdio.h
#include mysql.h

#define def_host_name NULL
#define def_user_name NULL
#define def_password  NULL
#define def_db_name NULL
 
MYSQL *conn;
int main(int argc,char *argv[])
{
conn=mysql_init(NULL);
mysql_real_connect(
 conn,
 def_host_name,
 def_user_name,
 def_password,
 def_db_name,
 0, /*port defaut*/
 NULL,  /*socket default*/
 0);/*flag*/
mysql_close(conn);
exit(0);
}

I compile as follows:

gcc -o client my_simplest_prog -I/home/MySQL/MySQL/include \
   -L/home/MySQL/MySQL/lib \
-lmysqlclient

Then I get :

/home/MySQL/MySQL/lib/libmysqlclient.a(my_open.o)In function 'my_open':
my_open.o(.text+0x14):undefined reference to 'open64'
/home/MySQL/MySQL/lib/libmysqlclient.a(mf_format.o)In function 'fn_format':
mf_format.o(.text+0x201):undefined reference to '__lxstat64' 
/home/MySQL/MySQL/lib/libmysqlclient.a(my_open.o)In function 'my_open':
my_open.o(.text+0x21):undefined reference to 'fopen64'

Nothing left to do with the situation, I beg your help. Anyway I'm a 
newcomer. Thank you very much.

Please send message to [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: Persistent connection with php to mysql

2001-03-18 Thread Cal Evans

I prefer persistent connections because you save time not having to rebuild
the connection each time.

As to how, the actual call to mysql_pconnect is buried deep in my framework
and it's kinda hard to explain how I do it.  I would NOT suggest that you
store it as a session variable.  That kinda defeats the purpose of using
connection pooling.

Yes, you could put the code in an include file.

Cal
http://www.calevans.com


-Original Message-
From: Denis Mettler [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 18, 2001 6:51 AM
To: [EMAIL PROTECTED]
Subject: Persistent connection with php to mysql


Hi,

some of you work with php and mysql to connect a website with a mysql
database.
do u prefer an simple connection or a persistent connection?

and if u prefer the last one. how can u make this connection in the
index.php3?
do u make this with an "./include"?

thanks
regards
denis

   .'  '.'  `.
_.-|  o | o  |-._
  .~   `.__.'.__.'^  ~.
.~ ^  /   \  ^ ~.
\-._^   ^| |^_.-/
`\  `-._  \___/ ^_.-' /'
  `\_   `--...--'   /'
 `-..___..-'  /\  /\
__/   \__ | |/ /_
  .'^   ^`.  .'   `__\
.'^ ^  `.__.'^ .\ \
   .' ^ .^   .^  .'  \/
  //^ \'.__.'
 |  ^ /|   ^  |

http://www.denis-mettler.de


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

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




C API problem

2001-03-18 Thread john1

Dear Sir :

MySQL 3.22.32 on my linux 486 PC seems work so good. When I compile 
a simple C API program which catched from MySQL tutorial, it
chokes at the end of compile process . The program is as follows:

#include stdio.h
#include mysql.h

#define def_host_name NULL
#define def_user_name NULL
#define def_password  NULL
#define def_db_name NULL
 
MYSQL *conn;
int main(int argc,char *argv[])
{
conn=mysql_init(NULL);
mysql_real_connect(
 conn,
 def_host_name,
 def_user_name,
 def_password,
 def_db_name,
 0, /*port defaut*/
 NULL,  /*socket default*/
 0);/*flag*/
mysql_close(conn);
exit(0);
}

I compile as follows:

gcc -o client my_simplest_prog -I/home/MySQL/MySQL/include \
   -L/home/MySQL/MySQL/lib \
-lmysqlclient

Then I get :

/home/MySQL/MySQL/lib/libmysqlclient.a(my_open.o)In function 'my_open':
my_open.o(.text+0x14):undefined reference to 'open64'
/home/MySQL/MySQL/lib/libmysqlclient.a(mf_format.o)In function 'fn_format':
mf_format.o(.text+0x201):undefined reference to '__lxstat64' 
/home/MySQL/MySQL/lib/libmysqlclient.a(my_open.o)In function 'my_open':
my_open.o(.text+0x21):undefined reference to 'fopen64'

Nothing left to do with the situation, I beg your help. Anyway I'm a 
newcomer. Thank you very much.

Please send message to [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: PHP query

2001-03-18 Thread Alexander Skwar

So sprach Kelly Alexander Zia am Sat, Mar 17, 2001 at 11:08:04AM -0700:
 Warning: Supplied argument is not a valid MySQL result resource in
 c:\phpweb/searchresults1.php on line 462

The database connection is somehow broken.

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 guenstige Art an Linux Distributionen zu kommen
Uptime: 1 hour 8 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




CREATE TABLE xyz SELECT FROM... does not create indices - is this a bug?

2001-03-18 Thread Peter Holm

Hi,

you may know the feature

create table xyz select * from xy...

which is similar to oracles select into table.

It works ok, only thing is that with this statement no indices are
created on the new table. Is this a bug?





Have a nice thread,
Peter

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

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




ROWNUM???

2001-03-18 Thread Peter Holm

Hi,
how do I get something like ROWNUM with mysql?

This means, before every row in a result there would be the Number of
the row. I want a result that looks like this:

No | xyz | abc | 
---
  1| xyz | abc | 
  2| xyz | abc | 
  3| xyz | abc | 
  .
  .
  .
 10| xyz | abc |

I tried to use variables (@a++) for this, but this does not work.
Is there a way to do this (without a procedural language... I know it is
easy to do with perl or php, but I am using mysql commandline utility a
lot for formatting of results...)

THANKS for answers!


 



Have a nice thread,
Peter

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

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: ROWNUM???

2001-03-18 Thread Cal Evans

Hi Peter,

I'm not sure but I don't think it's possible with MySQL. The best you could
do is make sure you have a primary key on the table that is autoincrement.
This will give you a unique number for each row.

RowNum is very subjective since it is describing the row number in the
cursor you are looking at in. Most RDBMS' do not assign (or at least do not
expose) a table level row number.

If you absolutely must have one then you have 2 options that I can see.

1: Create a field in your table and assign it manually.  This works at the
table level but is fairly useless info at the cursor level.

2; Do it in your procedural language. As you said, it's trivial to implement
in PHP and IMHO that's where it should be done.

Cal
http://www.calevans.com


-Original Message-
From: Peter Holm [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 18, 2001 11:05 AM
To: [EMAIL PROTECTED]
Subject: ROWNUM???


Hi,
how do I get something like ROWNUM with mysql?

This means, before every row in a result there would be the Number of
the row. I want a result that looks like this:

No | xyz | abc |
---
  1| xyz | abc |
  2| xyz | abc |
  3| xyz | abc |
  .
  .
  .
 10| xyz | abc |

I tried to use variables (@a++) for this, but this does not work.
Is there a way to do this (without a procedural language... I know it is
easy to do with perl or php, but I am using mysql commandline utility a
lot for formatting of results...)

THANKS for answers!






Have a nice thread,
Peter

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

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




3.23.35 mysqlimport Doesn't Report Stats

2001-03-18 Thread Nick Pasich


After upgrading from 3.23.32 to 3.23.35 I stopped getting statistics 
(Records: Deleted: Skipped: Warnings:) when using mysqlimport.

I took a quick look at 3.23.32 mysqlimport.c and it is the same code as
3.23.35.


The command
---
mysqlimport --ignore --verbose --fields-terminated-by=',' --fields-enclosed-by='"'  
traffic  $BFILE


From 3.23.32

Connecting to localhost
Selecting database traffic
Loading data from SERVER file: /usr/local/MYSQL/DB/traffic/LOADDIR/blockedHistory.asc 
into blockedHistory
traffic.blockedHistory: Records: 269  Deleted: 0  Skipped: 0  Warnings: 0
Disconnecting from localhost


From 3.23.35

Connecting to localhost
Selecting database traffic
Loading data from SERVER file: /usr/local/MYSQL/DB/traffic/LOADDIR/blockedHistory.asc 
into blockedHistory
traffic.blockedHistory: 
Disconnecting from localhost


  -( Nick Pasich )-

-- 
 _ __  _ __   __ _ ___(_) ___| |__  
| '_ \| '_ \ / _` / __| |/ __| '_ \  http://www.users.cts.com/sd/n/npasich
| | | | |_) | (_| \__ \ | (__| | | |
|_| |_| .__/ \__,_|___/_|\___|_| |_|@sd.cts.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




very strange but reproducable error in 3.23.35

2001-03-18 Thread Jan Legenhausen

Hi,

i just upgraded from 3.23.33 to 3.23.35 and found that a little script of
mine which simply modifys a table went mad completly.
I figured out a testcase which shows at least one of the strange things
which happen:

Table definition and data:

CREATE TABLE t_webmaster (
  lfdnr int(10) unsigned NOT NULL default '0',
  ticket int(10) unsigned NOT NULL default '0',
  client varchar(255) NOT NULL default '',
  replyto varchar(255) NOT NULL default '',
  subject varchar(100) NOT NULL default '',
  timestamp int(10) unsigned NOT NULL default '0',
  tstamp timestamp(14) NOT NULL,
  status int(3) NOT NULL default '0',
  type varchar(15) NOT NULL default '',
  assignment int(10) unsigned NOT NULL default '0',
  fupcount int(4) unsigned NOT NULL default '0',
  parent int(10) unsigned NOT NULL default '0',
  activity int(10) unsigned NOT NULL default '0',
  priority tinyint(1) unsigned NOT NULL default '1',
  cc varchar(255) NOT NULL default '',
  bcc varchar(255) NOT NULL default '',
  body text NOT NULL,
  comment text,
  header text,
  PRIMARY KEY  (lfdnr),
  KEY k1 (timestamp),
  KEY k2 (type),
  KEY k3 (parent),
  KEY k4 (assignment),
  KEY ticket (ticket)
) TYPE=MyISAM;

INSERT INTO t_webmaster VALUES
(773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','
');

Actions:
- modify "lfdnr":
mysql alter table t_webmaster change lfdnr lfdnr int(10) unsigned default 0
not null auto_increment;
Query OK, 1 row affected (0.01 sec)

- modify data:
mysql update t_webmaster set status=1 where type='Open';
Query OK, 0 rows affected (0.01 sec)
(Wrong result!)

- modify data 2nd time:
mysql update t_webmaster set status=1 where type='Open';
Query OK, 1 row affected (0.00 sec)
(Now it's done...)

Looks like i've to downgrade... :-/

regards, Jan Legenhausen

(some system info below)

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

Server version  3.23.35
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 4 hours 15 min 18 sec

Threads: 1  Questions: 9265  Slow queries: 0  Opens: 267  Flush tables: 1
Open tables: 8 Queries per second avg: 0.605
Environment:
machine, os, target, libraries (multiple lines)
System: Linux balin 2.2.18 #1 Fri Jan 19 22:10:35 GMT 2001 i586 unknown
Architecture: i586

Configure command:
./configure  --with-innobase --without-debug --without-docs



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

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: Looking for only unique records

2001-03-18 Thread Web master

try distinct(column name)

JCampbell wrote:

 I want to know if it is possible to build a MySQL query which will only
 return the unique values of a specific column. Ie if I had this table:
 
 id | name |date___
 1  | Jon   | 2001-01-03
 2  | Bob  | 2001-01-04
 3  | Jon   | 2001-01-05
 
 Is there any SQL query that will only return 1 row for each value in the
 name column, or would I have to do that in PHP?
 
 Jon
 ===
 And shepards we shall be
 For thee, my lord, for thee
 For thou hath descended forth from thy hands
 That our feats may swiftly carry out thy command
 We will flow a river forth unto thee
 And teaming with souls shall it ever be...
 ===
 http://jcampbell.blacklightning.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
 
 
 


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

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




Using Mysql with Orion app Server and Java

2001-03-18 Thread trent_john.rosenbaum

Has anyone used MySql with the Orion Application Server, I am trying to set up the 
following database-schema to allow the server to talk to a simple Mysql database, (I 
want to interact with it using ELBs, I have sucessfully used java and JDBC to connect 
to the database, but this pieces of xml is making it confusing.

Any input to the xml database-schema would be really great if someone has any.

May thanks
Trent

 data-source
  class="what should go here!"
  name="Mysql"
  location="jdbc/MysqlDS"
  xa-location="jdbc/xa/MysqlXADS"
  ejb-location="jdbc/MysqlDS"
  connection-driver="org.gjt.mm.mysql.Driver"
  username="James Brown"
  password=""
  url="jdbc:mysql://127.0.0.1:3306/JDBC_TEST_DATABASE"
  inactivity-timeout="30"
 /


Orion Example

data-source
  class="com.evermind.sql.DriverManagerDataSource"
  name="Hypersonic"
  location="jdbc/HypersonicCoreDS"
  xa-location="jdbc/xa/HypersonicXADS"
  ejb-location="jdbc/HypersonicDS"
  connection-driver="org.hsql.jdbcDriver"
  username="sa"
  password=""
  url="jdbc:HypersonicSQL:./database/defaultdb"
  inactivity-timeout="30"
 /
 




Re: MySQL 3.23.35 is released

2001-03-18 Thread Jeremy D. Zawodny

On Sun, Mar 18, 2001 at 11:51:39AM +, Peter Skipworth wrote:

 I'd love to see some benchmarks soonish if anyone has/is about to
 compare each of the table handlers for speed and
 stability. Personally I'd love to have row-level locking, but don't
 want to do it if it means lower stability and/or slower basic
 select/insert queries.

There have been a varitety of Innobase vs. MyISAM benchmarks posted in
the past few days. I'm sure more will follow.

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

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

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




Re: Innobase in MySQL

2001-03-18 Thread Greg Cope

Peter Zaitsev wrote:
 
 Hello Greg,
 
 Saturday, March 17, 2001, 3:31:53 AM, you wrote:
 
 GC It would be very handy if Innobase (and the GEMINI when it comes along)
 GC where to support mysqldump in the standard way, as I assume it works as
 GC such and I and many others would have to change thier backup scripts.
 GC Delayed index creation is very usefull (in saving time) in larger DB
 GC loads via a mysqldump - Hiekki is this difficult ?
 
 I as well as insertion speed is 90% limited by idex creation (at least
 for myisam) there could be an optimization generic for all table
 handlers, done on mysql level - at first to create tables without any
 keys, then insert all data in it and then run alter table to add all
 keys what should be in this table.
 
 The only problem I see here - i don't know how innobase/bdb will
 handle tables without primary key... i think perfomance should not be
 so good as with myisam. Still  there is a possibility to load all data
 to myisam and then run alter table which adds all indexes required and
 then converts the table to format required on the same pass.
 

Agreed, but it would be nice if this was automatic with mysqldump ?!

Although a gut feeling would be that create myisam table, insert, create
indexes, convert will be slower. 

Greg

 I'll try to do some benchmarks accordint to this to se if it does any
 speed improvement.


 
 --
 Best regards,
  Petermailto:[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: very strange but reproducable error in 3.23.35

2001-03-18 Thread Sinisa Milivojevic

Jan Legenhausen writes:
  Hi,
  
  i just upgraded from 3.23.33 to 3.23.35 and found that a little script of
  mine which simply modifys a table went mad completly.
  I figured out a testcase which shows at least one of the strange things
  which happen:
  
  Table definition and data:
  
  CREATE TABLE t_webmaster (
lfdnr int(10) unsigned NOT NULL default '0',
ticket int(10) unsigned NOT NULL default '0',
client varchar(255) NOT NULL default '',
replyto varchar(255) NOT NULL default '',
subject varchar(100) NOT NULL default '',
timestamp int(10) unsigned NOT NULL default '0',
tstamp timestamp(14) NOT NULL,
status int(3) NOT NULL default '0',
type varchar(15) NOT NULL default '',
assignment int(10) unsigned NOT NULL default '0',
fupcount int(4) unsigned NOT NULL default '0',
parent int(10) unsigned NOT NULL default '0',
activity int(10) unsigned NOT NULL default '0',
priority tinyint(1) unsigned NOT NULL default '1',
cc varchar(255) NOT NULL default '',
bcc varchar(255) NOT NULL default '',
body text NOT NULL,
comment text,
header text,
PRIMARY KEY  (lfdnr),
KEY k1 (timestamp),
KEY k2 (type),
KEY k3 (parent),
KEY k4 (assignment),
KEY ticket (ticket)
  ) TYPE=MyISAM;
  
  INSERT INTO t_webmaster VALUES
  (773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','
  ');
  
  Actions:
  - modify "lfdnr":
  mysql alter table t_webmaster change lfdnr lfdnr int(10) unsigned default 0
  not null auto_increment;
  Query OK, 1 row affected (0.01 sec)
  
  - modify data:
  mysql update t_webmaster set status=1 where type='Open';
  Query OK, 0 rows affected (0.01 sec)
  (Wrong result!)
  
  - modify data 2nd time:
  mysql update t_webmaster set status=1 where type='Open';
  Query OK, 1 row affected (0.00 sec)
  (Now it's done...)
  
  Looks like i've to downgrade... :-/
  
  regards, Jan Legenhausen
  
  (some system info below)
  
  Release:   mysql-3.23.35 (Source distribution)
  Server: /usr/local/bin/mysqladmin  Ver 8.18 Distrib 3.23.35, for
  pc-linux-gnu on i586
  Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
  This software comes with ABSOLUTELY NO WARRANTY. This is free software,
  and you are welcome to modify and redistribute it under the GPL license
  
  Server version  3.23.35
  Protocol version10
  Connection  Localhost via UNIX socket
  UNIX socket /tmp/mysql.sock
  Uptime: 4 hours 15 min 18 sec
  
  Threads: 1  Questions: 9265  Slow queries: 0  Opens: 267  Flush tables: 1
  Open tables: 8 Queries per second avg: 0.605
  Environment:
  machine, os, target, libraries (multiple lines)
  System: Linux balin 2.2.18 #1 Fri Jan 19 22:10:35 GMT 2001 i586 unknown
  Architecture: i586
  
  Configure command:
  ./configure  --with-innobase --without-debug --without-docs
  
  


Hi!

I have tested your case and it works just fine for me.

What error message do you get ??


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




Re: BACKUP TABLE gives access denied

2001-03-18 Thread Kyle Hayes


Check the manual to make sure, but I believe that you need to also make sure 
that the operating system privileges are set correctly too.  Not sure what 
you'll need in Windows, but in Linux, your hosting company probably runs 
MySQL under the user mysql.  Thus, for the database to write out the data for 
BACKUP, it needs _unix_ write privileges for user mysql (can be group too).

If you are trying to backup a table to a directory in your log-in directory, 
you need to make sure that the MySQL daemon has write privileges to the 
backup directory.

Best,
Kyle

On Sunday 18 March 2001 05:24, Tom Bellucco wrote:
 Hi,

 My web host just upgraded from a version that did not support the BACKUP
 TABLE command (3.22.??) to the latest.  What I try to execute the BACKUP
 TABLE command it fails with an access denied error.  He says I have all the
 necessary privileges, but I have the feeling something is missing.  When I
 execute SHOW GRANTS it says I have all privileges, but I wonder if there is
 a new privilege for backuup that doesn't get turned on by default.  Any
 help would be appreciated, please copy responses to my email as I am a new
 subscriber and am concerned about missing any replies.

 Thanks!

 --
 Tom Bellucco
 TJ Computers  Consulting
 [EMAIL PROTECTED]
 www.tjcc.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

-- 

*
"HEAR THE DIFFERENCE" with a live MicroTelco Gateway
  demo at: Voice on the Net (VON), March 20-23, Phoenix AZ.

For more information visit: http://www.microtelco.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: very strange but reproducable error in 3.23.35

2001-03-18 Thread Jan Legenhausen



 Hi!

 I have tested your case and it works just fine for me.

 What error message do you get ??

What i wrote was all i got - so there's just
  mysql update t_webmaster set status=1 where type='Open';
  Query OK, 0 rows affected (0.01 sec)

No other messages at all - simply repeating the query _does_ show the
expected.
- no message in the error log (...would have mentioned this... ;-)
- no special thing in the normal log:
010318 20:41:44   7 Query   alter table t_webmaster change lfdnr
lfdnr int(10) unsigned default 0 not null auto_increment
010318 20:41:48   7 Query   update t_webmaster set status=1 where
type='Open'
010318 20:41:49   7 Query   update t_webmaster set status=1 where
type='Open'

(only 2nd "update" did something)

...just did some more tests - perhaps this is relevant for this case:

If i re-create this test table with "mysql mydb testcase.sql"
("testcase.sql" includes a "drop table t_webmaster"), and do a
myisamchk -vv /usr/local/var/ticketeer/t_webmaster.MYI
immediately afterwards, i get:

Checking MyISAM file: /usr/local/var/ticketeer/t_webmaster.MYI
Data records:   1   Deleted blocks:   0
myisamchk: warning: 1 clients is using or hasn't closed the table properly
- check file-size
- check key delete-chain
block_size 1024:
- check record delete-chain
No recordlinks
- check index reference
- check data record references index: 1
- check data record references index: 2
- check data record references index: 3
- check data record references index: 4
- check data record references index: 5
- check data record references index: 6
- check record links
MyISAM-table '/usr/local/var/ticketeer/t_webmaster.MYI' is usable but should
be fixed

If fix it with "myisamchk", this error disappears - but the original strange
effect remains the same...

regards, Jan



 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




Re[2]: Innobase in MySQL

2001-03-18 Thread Peter Zaitsev

Hello Greg,

Sunday, March 18, 2001, 9:29:45 PM, you wrote:

 The only problem I see here - i don't know how innobase/bdb will
 handle tables without primary key... i think perfomance should not be
 so good as with myisam. Still  there is a possibility to load all data
 to myisam and then run alter table which adds all indexes required and
 then converts the table to format required on the same pass.
 

GC Agreed, but it would be nice if this was automatic with mysqldump ?!

GC Although a gut feeling would be that create myisam table, insert, create
GC indexes, convert will be slower. 


Well. Index creation and conversion can be done in one pass if I'm not
mistaken.



-- 
Best regards,
 Petermailto:[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: very strange but reproducable error in 3.23.35

2001-03-18 Thread Sinisa Milivojevic

Jan Legenhausen writes:
  
  No other messages at all - simply repeating the query _does_ show the
  expected.
  - no message in the error log (...would have mentioned this... ;-)
  - no special thing in the normal log:
  010318 20:41:44   7 Query   alter table t_webmaster change lfdnr
  lfdnr int(10) unsigned default 0 not null auto_increment
  010318 20:41:48   7 Query   update t_webmaster set status=1 where
  type='Open'
  010318 20:41:49   7 Query   update t_webmaster set status=1 where
  type='Open'
  
  (only 2nd "update" did something)
  
  ...just did some more tests - perhaps this is relevant for this case:
  
  If i re-create this test table with "mysql mydb testcase.sql"
  ("testcase.sql" includes a "drop table t_webmaster"), and do a
  myisamchk -vv /usr/local/var/ticketeer/t_webmaster.MYI
  immediately afterwards, i get:
  
  Checking MyISAM file: /usr/local/var/ticketeer/t_webmaster.MYI
  Data records:   1   Deleted blocks:   0
  myisamchk: warning: 1 clients is using or hasn't closed the table properly
  - check file-size
  - check key delete-chain
  block_size 1024:
  - check record delete-chain
  No recordlinks
  - check index reference
  - check data record references index: 1
  - check data record references index: 2
  - check data record references index: 3
  - check data record references index: 4
  - check data record references index: 5
  - check data record references index: 6
  - check record links
  MyISAM-table '/usr/local/var/ticketeer/t_webmaster.MYI' is usable but should
  be fixed
  
  If fix it with "myisamchk", this error disappears - but the original strange
  effect remains the same...
  
  regards, Jan


Hi!

I will re-test your case.


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




Re: MySQL 3.23.35 is released

2001-03-18 Thread bbarnett


On 17-Mar-2001 Jeremy D. Zawodny wrote:
 On Sat, Mar 17, 2001 at 06:56:34AM -0500, [EMAIL PROTECTED] wrote:
 
 On 17-Mar-2001 Greg Cope wrote:
  Michael Widenius wrote:
  
  Hi!
  
  
  Greg On the off chance any ideas when this (A Gemini THandler) 3.23.x
  release
  Greg may be and when we might see a public 4.x alpha.  I know the answer
  will
  Greg probably be "When its ready" but a small clue would be nice :-)
  
  Lets guess a bit :)
  
  3.23.36 with GEMINI should happen within 2 weeks.
  4.0-alpha should happen within 2 months.
 
 Er.  Is there any way you guys can actually form a stable branch,
 and a development branch?  It would be nice to get a stable version
 of mysql with replication, and that's not going to happen with all
 of these new features being pumped into a supposedly "stable"
 branch.
 
 Don't enable innobase or gemini, and you'll have a stable server.
 
 Seriously, if you don't even compile in the new features, there's
 little danger of them affecting you.
 
 Jeremy

Little danger?!   

Look, let's approach this another way.  3.23.xx isn't stable, and hasn't been
ever, because it _was_ a development branch, and you keep treating it as such,
while at the same time you call it your stable branch.  This is wrong.  

Perhaps you haven't heard of such a thing as a development branch, and
stable branch of code.  Maybe you haven't heard the term "beta" and "alpha"
ever before.  3.23.xx is BETA, and unusable in a production enviroment.  
Maybe I should say that again.  3.23.xx is BETA, and is unusable in a
production enviroment.  You need a stable branch, and a development branch, and
you need them ASAP so that current MySQL code can be made stable enough for a
production enviroment. 

Don't take this the wrong way.  MySQL is a great product, but any great
software product is a piece of crap if its crashing and causing problems
because you keep it in a consitantly beta state.

Please act accordingly.




---

 Dynamic Hosting
   HTTP://www.L8R.net/ 
  "We Provide Static Hostnames for Dynamic IP's"

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

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 Connection failed

2001-03-18 Thread denis mettler

Hallo,

Kann mir irgend jemand helfen?
Ich kann mit der folgenden Meldung nichts anfangen:

Anbei die Datei zum verbinden zur Datenbank:

_
?
$server = "localhost";  // MySQL-Server
$user   = "root";   // MySQL-Nutzer
$pass   = "geheim"; // MySQL-Kennwort
//
$conn = mysql_connect($server, $user, $pass);
if($conn) {
   echo "BYes, we're open!/B Handle: $conn";
} else {
   echo "BOops, something goes wrong";
   exit;
}
$select = mysql_select_db("customers",$conn);
?



Und hier die Fehlermeldung:

Warning: MySQL Connection Failed: Can't connect to local MySQL server through 
socket '/var/lib/mysql/mysql.sock' (111) in 
/usr/local/httpd/htdocs/dbopen.php3 on line 8
Oops, something goes wrong

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

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 Connection failed

2001-03-18 Thread denis mettler

Hallo,

Kann mir irgend jemand helfen?
Ich kann mit der folgenden Meldung nichts anfangen:

Anbei die Datei zum verbinden zur Datenbank:

_
?
$server = "localhost";  // MySQL-Server
$user   = "root";   // MySQL-Nutzer
$pass   = "geheim"; // MySQL-Kennwort
//
$conn = mysql_connect($server, $user, $pass);
if($conn) {
   echo "BYes, we're open!/B Handle: $conn";
} else {
   echo "BOops, something goes wrong";
   exit;
}
$select = mysql_select_db("customers",$conn);
?



Und hier die Fehlermeldung:

Warning: MySQL Connection Failed: Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (111) in
/usr/local/httpd/htdocs/dbopen.php3 on line 8
Oops, something goes wrong

---

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

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




Unique/Index/Primary

2001-03-18 Thread Ryan Shrout

Could someone explain to me the difference between the Primary/Index/Unique attributes 
of MySQL?  I am coming from using MS SQL where there is only the Primary key option.

Sorry if this is too beginner of a question for this list.

Ryan Shrout
Athlonmb.com
Production Manager
http://www.athlonmb.com/
[EMAIL PROTECTED]





ATTENTION: bug fix for Innobase non-latin1 character sets

2001-03-18 Thread Heikki Tuuri

Readers of the mailing list!

There is a serious bug in the non-latin1 character set support of
Innobase. The bug causes indexes to be sorted in a wrong order, and
queries to return wrong results. The bug explains why test-ATIS returned
wrong results in a Russian installation.

I assumed that the function my_sortncmp returns -1, 0, or 1, but actually
it returns a difference of ASCII codes for characters.

You can fix the bug by editing the file mysql/sql/ha_innobase.cc,
function innobase_mysql_cmp, about line 920, the function
should be like the following:

snip

extern "C" {
/*
Innobase uses this function is to compare two data fields for which the
data type is such that we must use MySQL code to compare them. NOTE that the
prototype of this function is in rem0cmp.c in Innobase source code!
If you change this function, remember to update the prototype there! */

int
innobase_mysql_cmp(
/*===*/
/* out: 1, 0, -1, if a is greater,
equal, less than b, respectively */
int mysql_type, /* in: MySQL type */
unsigned char*  a,  /* in: data field */
unsigned inta_length,   /* in: data field length,
not UNIV_SQL_NULL */
unsigned char*  b,  /* in: data field */
unsigned intb_length)   /* in: data field length,
not UNIV_SQL_NULL */
{
enum_field_typesmysql_tp;
int ret;

dbug_assert(a_length != UNIV_SQL_NULL);
dbug_assert(b_length != UNIV_SQL_NULL);

mysql_tp = (enum_field_types) mysql_type;

switch (mysql_tp) {

case FIELD_TYPE_STRING:
case FIELD_TYPE_VAR_STRING:
ret = my_sortncmp((const char*) a, a_length,
  (const char*) b, b_length);
if (ret  0) {
  return(-1);
} else if (ret  0) {
  return(1);
} else {
  return(0);
}
default:
assert(0);
}

return(0);
}
}

...snip..

Regards,

Heikki Tuuri
Innobase Oy


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

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




[philb@gnu.org: Bug#88186: mysql: Fails to build on ARM: char sign issue?]

2001-03-18 Thread Christian Hammers

Hi

Hope this helps you to make mysql working on ARM architecture, too.

bye,

 -christian-

-- 
Christian HammersWESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
[EMAIL PROTECTED] Internet  Security for ProfessionalsFax 0241/911879
   WESTEND ist CISCO Systems Partner - Premium Certified



This isn't actually a signed-char issue.  The signedness problem comes about 
because mysql's configure script is spuriously selecting "int" rather than 
"socklen_t" as SOCKET_SIZE_TYPE.

The root cause is actually that the configure script tries to build things 
with "-g -fomit-frame-pointer -Werror".  Mixing -g and -fomit-frame-pointer 
always elicits a "may not give sensible debugging" warning; combined with 
-Werror this means that every test is deemed to have failed.  For ARM, the 
performance gain from -fomit-frame-pointer is going to be marginal anyway so 
the best thing to do is probably just to take it out.

p.






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

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: request - insert into merge tables

2001-03-18 Thread Benjamin Pflugmann

Hello.

On Mon, Mar 12, 2001 at 05:16:59PM -0600, [EMAIL PROTECTED] wrote:
 Seems like it would be relatively easy to implement inserting into merge
 tables. I'd like to be able to at an absolute minimum round-robin
 insert, but even better would be something like you can do with
 partitioning in oracle.
 
 Baically, something like this:
 
 create table x (...) type=merge union=(a,b,c,d) 
   partition=a:(where key=val1) partition=b:(where keyval2 and keyval3);
[...]

While I completely agree that some sort of INSERT into MERGE tables
would be really nice (to avoid the need to change the program), I
don't see how this falls under "relatively easy to implement". MySQL
doesn't even have yet expressions as default values for columns. But
maybe you meant it another way.

For a first start I would suggest two variants, which shouldn't be to
hard to do, because no new specs are needed: round-robin, as you
suggested and first resp. last.

The latter one is needed for logging tables, where you want all new
rows go into the same table.

Bye,

Benjamin.

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

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




Re: MySQL 3.23.35 is released

2001-03-18 Thread Jeremy D. Zawodny

On Sun, Mar 18, 2001 at 03:31:47PM -0500, [EMAIL PROTECTED] wrote:
 
 On 17-Mar-2001 Jeremy D. Zawodny wrote:

  Er.  Is there any way you guys can actually form a stable branch,
  and a development branch?  It would be nice to get a stable
  version of mysql with replication, and that's not going to happen
  with all of these new features being pumped into a supposedly
  "stable" branch.
  
  Don't enable innobase or gemini, and you'll have a stable server.
  
  Seriously, if you don't even compile in the new features, there's
  little danger of them affecting you.
 
 Little danger?!   

Correct.

 Look, let's approach this another way.  3.23.xx isn't stable, and
 hasn't been ever, because it _was_ a development branch, and you
 keep treating it as such, while at the same time you call it your
 stable branch.  This is wrong.

Not stable? Compared to what?

I've had a server running several versions of 3.23.xx for about 6
months now. In that time it handled over a billion queries. Yes, a
billion. The current one has been up for over two months running
3.23.29 (which was declared "gamma") without a hitch.

 Perhaps you haven't heard of such a thing as a development branch,
 and stable branch of code.  Maybe you haven't heard the term "beta"
 and "alpha" ever before.  3.23.xx is BETA, and unusable in a
 production enviroment.

I believe I (and many others) have evidence to the contrary. The MySQL
team declared it "stable" for a reason.

The development branch is 4.0.xx.

 Maybe I should say that again.  3.23.xx is BETA, and is unusable in
 a production enviroment.  You need a stable branch, and a
 development branch, and you need them ASAP so that current MySQL
 code can be made stable enough for a production enviroment.

Well, then I'll say again what I just said.

The development branch is 4.0.xx. 3.23.xx (for the right versions of
xx) is stable.

 Don't take this the wrong way.  MySQL is a great product, but any
 great software product is a piece of crap if its crashing and
 causing problems because you keep it in a consitantly beta state.

There are many, many, many folks running 3.23.xx without it constantly
crashing. Is there some widespread problem that we're unaware of?

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

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

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




Re: Unique/Index/Primary

2001-03-18 Thread Jeremy D. Zawodny

On Sun, Mar 18, 2001 at 03:58:46PM -0500, Ryan Shrout wrote:

 Could someone explain to me the difference between the
 Primary/Index/Unique attributes of MySQL?  I am coming from using MS
 SQL where there is only the Primary key option.

And INDEXed column may have duplicate values in it. A UNIQUE one may
not.

A PRIMARY KEY is simply another way to say "UNIQUE" with the
side-effect that the PRIMARY KEY is stored first in the index file for
the table.

So UNIQUE is a special case of INDEX, and PRIMARY KEY is a special
case of UNIQUE.

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

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

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




ODBC // #gelöscht

2001-03-18 Thread denis mettler

Hi,

Habe folgendes Problem:
Ich verbinde ber ODBC (MDAC 2.5 ist installiert) Access mit einer MySQL 
Datenbank.

Ich kann mit der MySQL Datenbank verbinden,
aber die Eintrge in der Tabelle werden als 

#gelscht

angezeigt.

Ich habe aber auch kein float Feld.
Habe ein auto_increment, Primary Key 
und ein timestamp
Feld.

Aber ich weiss einfach nicht was falsch luft.
Kann mir jemand helfen?

Danke im voraus.
Gruss
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




importing data into a table with auto_increment

2001-03-18 Thread Daniel Kirk

hi there,

is there a problem with importing data into a table with an auto_increment
field with a primary key, if the data contains values for the auto_increment
field?

I keep getting an error that it can't insert the value "1" more than once.

However, all the values for the auto_increment field are unique (though not
consecutive) - and if I create the table with the field as a normal int,
then the import is successful and all values for the int field are indeed
unique.  I could not find anything in the manual describing this behaviour.

I've also tried sending this post with the data file (small) and commands
used but unfortunately it gets rejected by the anti-spam software and 3
attempts later I couldn't work out why, so I hope this is enough information

thanks

dan


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

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




Updateing row contents

2001-03-18 Thread Travis Gant

How do you update the contents of a specific field in a database?  Say I
have a column named Name in a table, and a row has the contents of that
column set to "Jhon".  Now, the user accidently spelled John wrong and would
like to update it, how can I do that?


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

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




ODBC

2001-03-18 Thread denis mettler

Hi there,

I have the following problem which i can not solve.

i try to connect access with odbc to mysql.

i have a table:

name
age
id (primary key, auto_increment)
misc (timestamp)

i can connect but the entries are shown as #deleted-
Why?

i have installed the new MDAC!
i have no float fields!

And, i don't know why this happens.

Any ideas?
with mysql under windows everything works.
but with win2000 and linux, it doesn't.

regards
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: Updateing row contents

2001-03-18 Thread Jeremy D. Zawodny

On Sun, Mar 18, 2001 at 06:40:36PM -0500, Travis Gant wrote:

 How do you update the contents of a specific field in a database?
 Say I have a column named Name in a table, and a row has the
 contents of that column set to "Jhon".  Now, the user accidently
 spelled John wrong and would like to update it, how can I do that?

Using the UPDATE command. See the manual for details.
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408) 530-5454
Cell: (408) 439-9951

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

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




Mysql restarts at 100% CPU

2001-03-18 Thread vinod p

hi,
my mysql server restarts automatically when the
machine touches 100% CPU usage.  any ideas why?

tx.
vinod.


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

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

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 restarts at 100% CPU

2001-03-18 Thread Jeremy D. Zawodny

On Mon, Mar 19, 2001 at 12:34:30AM +, vinod p wrote:

 my mysql server restarts automatically when the
 machine touches 100% CPU usage.  any ideas why?

What does the error log say? Anything?
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408) 530-5454
Cell: (408) 439-9951

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

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




Creating bitmask for SELECT against type SET

2001-03-18 Thread Todd Markle

Recently, I'm having to match against SET columns quite a bit. Is there a
fast way to create a bitmask of set data?

For example:  A user table has interests as set ('ABX','BX','CXX'...)
I want to select users where interests include ('CXX','NNX'...)

Method 1: select them one at a time
   SELECT * from users where interests LIKE "%CXX%";
   SELECT * from users where interests LIKE "%NNX%";
   etc.

Method 2: the same thing using OR
   Select * from users where interests LIKE "%CXX%"
 OR interests LIKE "%NNX%"...

I would prefer to do this:
   -Make a bitmask of ('CXX','NNX'...)
   -Select WHERE interests bitwise-or bitmask

As far as I can tell from the documentation of Find_In_Set(), I am on my
own to make the bitmask... first selecting the column definition, and then
using find_in_set iteratively on that column definition for each member I
want to match.  This seems a pain, since MYSQL creates the number I want
by itself every time I write a record to the table!

(Yeah, I know that another possibility is to create a joined
table rather than use the set type, but this is a lightweight
application... a few thousand users, about 30 interests, and
only a handful of these matches a week.  I'm just trying to
clean up the code.)



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

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 bitmask for SELECT against type SET

2001-03-18 Thread Paul DuBois

At 5:16 PM -0800 3/18/01, Todd Markle wrote:
Recently, I'm having to match against SET columns quite a bit. Is there a
fast way to create a bitmask of set data?

For example:  A user table has interests as set ('ABX','BX','CXX'...)
I want to select users where interests include ('CXX','NNX'...)

Method 1: select them one at a time
SELECT * from users where interests LIKE "%CXX%";
SELECT * from users where interests LIKE "%NNX%";
etc.

Method 2: the same thing using OR
Select * from users where interests LIKE "%CXX%"
  OR interests LIKE "%NNX%"...

I would prefer to do this:
-Make a bitmask of ('CXX','NNX'...)
-Select WHERE interests bitwise-or bitmask

As far as I can tell from the documentation of Find_In_Set(), I am on my
own to make the bitmask... first selecting the column definition, and then
using find_in_set iteratively on that column definition for each member I
want to match.  This seems a pain, since MYSQL creates the number I want
by itself every time I write a record to the table!

(Yeah, I know that another possibility is to create a joined
table rather than use the set type, but this is a lightweight
application... a few thousand users, about 30 interests, and
only a handful of these matches a week.  I'm just trying to
clean up the code.)



I have code that does this by reading the SET column definition from
SHOW COLUMNS output, then uses it to allow a set of corresponding
checkboxes from a form to be converted into a bitmask. That allows
you to perform numeric testing against SET column values.  The code
is in Perl, lemme know if you want it.

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




Do I need to remove my bundle first?

2001-03-18 Thread Wade DeWerff

I have the apache, mysql, php bundle for win. I want to use mysql on IIS
though, will this ver of mysql work or do I need to remove this bundle?


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

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 handler prob

2001-03-18 Thread Nuno Ferreira



Hi again 

No .. not really that big (the table)

-rw-rw   1 mysqlmysql  100916 Mar 16 17:09 imp_addr.ISD
-rw-rw   1 mysqlmysql1024 Mar 16 17:09 imp_addr.ISM
-rw-rw   1 mysqlmysql8648 Mar  9 11:06 imp_addr.frm

100K the ISD part ... anyway i have tried to " imp_addr.ISD"
to put it 0 lenght ... but no luck :(((

On Fri, 16 Mar 2001, Gerald L. Clark wrote:

 Nuno Ferreira wrote:
 
  Hi again.
 
  I've been reading all the archieve files about a error i get when
  trying to do any sql thing with a table.
 
  check this out ...
  mysql select * from imp_addr;
  ERROR 1030: Got error 127 from table handler
 
    than  i did what everyone says to do with a problem like this
  ...
 
  isamchk -o imp_addr.ISM
  - recovering ISAM-table 'imp_addr.ISM'
  Data records: 1223
 
  isamchk -r imp_addr.ISM
  - recovering ISAM-table 'imp_addr.ISM'
  Data records: 1223
 
   and tried all the recovering methos available.
 
  When i use the "-e" option with the "-r" the output is this ...
 
  # isamchk -e imp_addr.ISM
  Checking ISAM file: imp_addr.ISM
  Data records:1223   Deleted blocks:   0
  - check file-size
  - check delete-chain
  - check index reference
  - check records and index references
  [root@thor horde]# isamchk -e -r -f imp_addr.ISM
  - recovering ISAM-table 'imp_addr.ISM'
  Data records: 1223
  Found block with too small length at 297; Skipped
  Found block with too small length at 1558; Skipped
  Found block with too small length at 1955; Skipped
  Found link that points at 1342181235 (outside data file) at 2254
  Found block with too small length at 2504; Skipped
  Found link that points at 1157628996 (outside data file) at 3601
  Found link that points at 1258418244 (outside data file) at 3607
  Found block with too small length at 4543; Skipped
  Found block with too small length at 5053; Skipped
  Found link that points at 1744831599 (outside data file) at 5644
  Found link that points at 1107423343 (outside data file) at 5650
  Found block with too small length at 5713; Skipped
  Found block with too small length at 5719; Skipped
  Found block with too small length at 6190; Skipped
  Found block with too small length at 7072; Skipped
  Found block with too small length at 7214; Skipped
  Found block with too small length at 7293; Skipped
  Found block with too small length at 7377; Skipped
  Found block with too small length at 7880; Skipped
  Found block with too small length at 8892; Skipped
  Found block with too small length at 9286; Skipped
  Found block with too small length at 9370; Skipped
  Found block with too small length at 9439; Skipped
  Found block with too small length at 9835; Skipped
  Found block with too small length at 10649; Skipped
  Found link that points at 1660946017 (outside data file) at 10788
  Found block with too small length at 11290; Skipped
  Found block with too small length at 12131; Skipped
  Found block with too small length at 12137; Skipped
  Found block with too small length at 12844; Skipped
  Found block with too small length at 13878; Skipped
  Found block with too small length at 14391; Skipped
  Found block with too small length at 14475; Skipped
  Found block with too small length at 15776; Skipped
  Found block with too small length at 15927; Skipped
  Found block with too small length at 16010; Skipped
  Found block with too small length at 16080; Skipped
  Found block with too small length at 16203; Skipped
  Found block with too small length at 16209; Skipped
 
   and it goes on and on for like more 20 lines or so ..
 
  Can anyone help me ??? i really need this table recovered ...
 
  Thanks
 
  --


 Looks to me like you have exceded the 2G File size limit.

 You need Myisam tables, and a filesystem that supports files larger than
 2G.

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

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




-- 
---
Nuno Ferreira
mailto:[EMAIL PROTECTED]
http://www.lusoweb.pt
---


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

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 3.23.35 is released

2001-03-18 Thread Quentin Bennett

Hi,

To be fair to the anonymous writer, the main reason for introducing 3.23.25
was

Changes in release 3.23.35
--
 
   * Fixed newly introduce bug in `ORDER BY'.

Nothing there about 'in Innobase and/or Gemini Tables', and for a release
that is declared Stable to have a bug introduced is a bit of a no-no. If the
bug only affected parts of the release that are still alpha, beta or gamma,
as some of the new table types are, then the change notice should really
reflect that, so that a new user is sure of what is affected, aiding the 'To
upgrade or not upgrade' decision.

JM2c

Quentin
 

-Original Message-
From: Jeremy D. Zawodny [mailto:[EMAIL PROTECTED]]
Sent: Monday, 19 March 2001 11:47 a.m.
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Greg Cope
Subject: Re: MySQL 3.23.35 is released


On Sun, Mar 18, 2001 at 03:31:47PM -0500, [EMAIL PROTECTED] wrote:
 
 On 17-Mar-2001 Jeremy D. Zawodny wrote:

  Er.  Is there any way you guys can actually form a stable branch,
  and a development branch?  It would be nice to get a stable
  version of mysql with replication, and that's not going to happen
  with all of these new features being pumped into a supposedly
  "stable" branch.
  
  Don't enable innobase or gemini, and you'll have a stable server.
  
  Seriously, if you don't even compile in the new features, there's
  little danger of them affecting you.
 
 Little danger?!   

Correct.

 Look, let's approach this another way.  3.23.xx isn't stable, and
 hasn't been ever, because it _was_ a development branch, and you
 keep treating it as such, while at the same time you call it your
 stable branch.  This is wrong.

Not stable? Compared to what?

I've had a server running several versions of 3.23.xx for about 6
months now. In that time it handled over a billion queries. Yes, a
billion. The current one has been up for over two months running
3.23.29 (which was declared "gamma") without a hitch.

 Perhaps you haven't heard of such a thing as a development branch,
 and stable branch of code.  Maybe you haven't heard the term "beta"
 and "alpha" ever before.  3.23.xx is BETA, and unusable in a
 production enviroment.

I believe I (and many others) have evidence to the contrary. The MySQL
team declared it "stable" for a reason.

The development branch is 4.0.xx.

 Maybe I should say that again.  3.23.xx is BETA, and is unusable in
 a production enviroment.  You need a stable branch, and a
 development branch, and you need them ASAP so that current MySQL
 code can be made stable enough for a production enviroment.

Well, then I'll say again what I just said.

The development branch is 4.0.xx. 3.23.xx (for the right versions of
xx) is stable.

 Don't take this the wrong way.  MySQL is a great product, but any
 great software product is a piece of crap if its crashing and
 causing problems because you keep it in a consitantly beta state.

There are many, many, many folks running 3.23.xx without it constantly
crashing. Is there some widespread problem that we're unaware of?

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

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

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

The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended 
recipient, you are asked to respect that confidentiality and not 
disclose, copy or make use of its contents. If received in error 
you are asked to destroy this email and contact the sender immediately. 
Your assistance is appreciated.

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

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




There must be an easier way to search!

2001-03-18 Thread Tyler Longren

Hello, this is how I'm searching a database now...is there an easier way
(PHP)?  Anything that's short would be nice.  This is just really long.

$searchgenre = "punk, hardcore, classical, acoustic";
$formatted_query = str_replace(", ", ",", $searchgenre);
$genre_array = split(",", $formatted_query);
$result = count($genre_array);
if ($result == "1") {
$sql_text = "SELECT * FROM artists WHERE genre like '%$genre_array[0]%'
ORDER BY artist ASC";
}



if ($result == "2") {
$sql_text = "SELECT * FROM artists WHERE genre like '%$genre_array[0]%' OR
genre like '%$genre_array[1]%' ORDER BY artist ASC";
}



if ($result == "3") {
$sql_text = "SELECT * FROM artists WHERE genre like '%$genre_array[0]%' OR
genre like '%$genre_array[1]%' OR genre like '%$genre_array[2]%' ORDER BY
artist ASC";
}



if ($result == "4") {
$sql_text = "SELECT * FROM artists WHERE genre like '%$genre_array[0]%' OR
genre like '%$genre_array[1]%' OR genre like '%$genre_array[2]%' OR genre
like '%$genre_array[3]%' ORDER BY artist ASC";
}



if ($result == "5") {
$sql_text = "SELECT * FROM artists WHERE genre LIKE '%$genre_array[0]%' OR
genre LIKE '%$genre_array[1]%' OR genre LIKE '%$genre_array[2]%' OR genre
LIKE '%$genre_array[3]%' OR genre LIKE '%$genre_array[4]%' ORDER BY artist
ASC";
}



if ($result == "6") {
$sql_text = "SELECT * FROM artists WHERE genre LIKE '%$genre_array[0]%' OR
genre LIKE '%$genre_array[1]%' OR genre LIKE '%$genre_array[2]%' OR genre
LIKE '%$genre_array[3]%' OR genre LIKE '%$genre_array[4]%' OR genre LIKE
'%$genre_array[5]%' ORDER BY artist ASC";
}



if ($result == "7") {
$sql_text = "SELECT * FROM artists WHERE genre LIKE '%$genre_array[0]%' OR
genre LIKE '%$genre_array[1]%' OR genre LIKE '%$genre_array[2]%' OR genre
LIKE '%$genre_array[3]%' OR genre LIKE '%$genre_array[4]%' OR genre LIKE
'%$genre_array[5]%' OR genre LIKE '%$genre_array[6]%' ORDER BY artist ASC";
}



if ($result == "8") {
$sql_text = "SELECT * FROM artists WHERE genre LIKE '%$genre_array[0]%' OR
genre LIKE '%$genre_array[1]%' OR genre LIKE '%$genre_array[2]%' OR genre
LIKE '%$genre_array[3]%' OR genre LIKE '%$genre_array[4]%' OR genre LIKE
'%$genre_array[5]%' OR genre LIKE '%$genre_array[6]%' OR genre LIKE
'%$genre_array[7]%' ORDER BY artist ASC";
}



if ($result == "9") {
$sql_text = "SELECT * FROM artists WHERE genre LIKE '%$genre_array[0]%' OR
genre LIKE '%$genre_array[1]%' OR genre LIKE '%$genre_array[2]%' OR genre
LIKE '%$genre_array[3]%' OR genre LIKE '%$genre_array[4]%' OR genre LIKE
'%$genre_array[5]%' OR genre LIKE '%$genre_array[6]%' OR genre LIKE
'%$genre_array[7]%' OR genre LIKE '%$genre_array[8]%' ORDER BY artist ASC";}



if ($result == "10") {
$sql_text = "SELECT * FROM artists WHERE genre LIKE '%$genre_array[0]%' OR
genre LIKE '%$genre_array[1]%' OR genre LIKE '%$genre_array[2]%' OR genre
LIKE '%$genre_array[3]%' OR genre LIKE '%$genre_array[4]%' OR genre LIKE
'%$genre_array[5]%' OR genre LIKE '%$genre_array[6]%' OR genre LIKE
'%$genre_array[7]%' OR genre LIKE '%$genre_array[8]%' OR genre LIKE
'%$genre_array[9]%' ORDER BY artist ASC";
}



if ($result  "10") {
print "font face=Arial size=2Sorry, you've entered too many genres to
search for, please enter 10 or fewer./fontbr";
}


Thanks everybody,
Tyler Longren


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

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: There must be an easier way to search!

2001-03-18 Thread Jason Landry

 Hello, this is how I'm searching a database now...is there an easier way
 (PHP)?  Anything that's short would be nice.  This is just really long.

You can do something like this:


 $searchgenre = "'punk','hardcore', 'classical', 'acoustic'";

 $sql_text = "SELECT * FROM artists WHERE genre in ($searchgenre) ORDER BY
artist ASC";


Alternatively, look at the SET and ENUM datatypes if your genres are pretty
static.


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

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: Tuple length Question

2001-03-18 Thread Jason Landry

Leo,

There's another alternative that I found intriguing with MySQL that I
haven't tried - but it might be a really good solution for you.  Mind you I
haven't tried this, but I found the idea somewhat fascinating.

Have you looked into the temporary table functionality of MySQL?

Suppose you have n tables with languages like this:

language_english
language_french
language_spanish
language_german

Now when you establish your connection to the database, do this:

create temporary table language select * from lang_english // pick your
lanuage in code

Now the rest of you code can refer to "language" as a table -- and you can
add as many languages as are needed modifying only the stub of code that
initially selects the language.


- Original Message -
From: "Leo Cambilargiu" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 18, 2001 8:30 AM
Subject: Tuple length Question


 Hello All:

 I am looking into mysql as a web solution.  I am
 implementing a multilanguage scheme.

 I am considering separating the different languages by the
 following three methods.

 1.  Use different tables to hold different languages.

 2.  Use the same table with another key (lang).

 3.  Add extra attributes to a table and pick the ones
 containing the language I want.

 I am exploring possibility number 3 at the moment.

 My question is, how long can a Mysql myisam table tuple be?

 Currently I like the idea of increasing the number of
 attributes except for this  possible constraint.  I might
 have 6 to 10 languages supported max.  I'll start with 2.  I
 will have no more than 15 attributes total and possibly 5
 will be shared between languages.  This means i'll have to
 add another 10 attributes per language implemented.

 Thanks in advance.  Please email me at [EMAIL PROTECTED] or
 [EMAIL PROTECTED]

 Leo Cambilargiu


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

 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




for configure

2001-03-18 Thread Ali Muhhanmad

Dear Mysql:

 when i execute the configure , it always display:

checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for termcap functions library... configure:
error: No curses/termcap library found



and the last line in config.log is:

 We use char because int might match the return type
of a gcc2
builtin and then its argument prototype would
still apply.  */
char tgetent();

int main() {
tgetent()
; return 0; }
configure:8085: checking for tgetent in -ltermcap
configure:8104: gcc -o conftest -O6 -DDBUG_OFF
-rdynamic conftest.c -ltermca
p  -ldl -lcrypt -lnsl -lm  -lpthread 15
ld: cannot open -ltermcap: No such file or directory
configure: failed program was:
#line 8093 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an
error.  */
/* We use char because int might match the return type
of a gcc2
builtin and then its argument prototype would
still apply.  */
char tgetent();

int main() {
tgetent()
; return 0; }
configure:8132: checking for termcap functions library
"config.log" line 676 of 676 --100%-- col 1

   please help me !!

Ali. Mar 19,2001


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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

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




What is CONSTRAINTS for?

2001-03-18 Thread Duke

In the CREATE TABLE command there is a create_defn. option called ...
CONSTRAINT symbol 

what is that for?

and how does that work?

duke.

Website: http://www.ilug-bom.org.in/
Ftp site: ftp.ilug-bom.org.in
Chat: irc.ilug-bom.org.in
Linuxers mailing list: [EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers



Get free email and a permanent address at http://www.netaddress.com/?N=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




Help for mysql error

2001-03-18 Thread J.C. Ting

Dear All,

I use Mysql for half year. At this moment, I encounter a big problem
that I can not query any data from my server.
The following is my configuration.

Platform: Solaris 2.7 on Sun Ultra2
Mysql version: 3.22.29
Table Name: mailhead;

Record count:  2003478

Status:

mysql select count(*) from mailhead;
+--+
| count(*) |
+--+
|  2003478 |
+--+
1 row in set (2.24 sec)

mysql select * from mailhead where serial_no=90;
ERROR 1030: Got error 134 from table handler
mysql show variables;
++-+
| Variable_name  | Value   |
++-+
| back_log   | 5   |
| connect_timeout| 5   |
| basedir| /var/mysql/ |
| datadir| /usr/local/mysql/var/   |
| delayed_insert_limit   | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000|
| join_buffer| 33550336|
| flush_time | 0   |
| key_buffer | 8388600 |
| language   | /var/mysql/share/mysql/english/ |
| log| OFF |
| log_update | OFF |
| long_query_time| 10  |
| low_priority_updates   | OFF |
| max_allowed_packet | 1048576 |
| max_connections| 100 |
| max_connect_errors | 10  |
| max_delayed_insert_threads | 20  |
| max_join_size  | 4294967295  |
| max_sort_length| 1024|
| max_write_lock_count   | 4294967295  |
| net_buffer_length  | 16384   |
| pid_file   | /usr/local/mysql/var/mysqld.pid |
| port   | 3306|
| protocol_version   | 10  |
| record_buffer  | 131072  |
| skip_locking   | OFF |
| skip_networking| OFF |
| socket | /tmp/mysql.sock |
| sort_buffer| 2097144 |
| table_cache| 64  |
| thread_stack   | 65536   |
| tmp_table_size | 8191992 |
| tmpdir | /var/tmp/   |
| version| 3.22.29 |
| wait_timeout   | 28800   |
++-+
37 rows in set (0.00 sec)



I can insert record into mailhead, but can not retrieve data from it.

Help ! Help ! Help !

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


information request

2001-03-18 Thread Mani kandan Ramachandran

Respected Sir/Madam

  While i configure mysql in my RedHat 7.0,it gives problem.And i do not
know how tro start tha mysql.When i give the command to start th mysql

/bin/safe_mysqld   it gives  [1] 1873 and 
A mysql process already excist

how to run the mysql program and how i know server is connected 

when i used to run it gives the problem myql.sock

Can yopu help me to get on to mysql.

I am expecting ur reply 

thanking you


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

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




RE: What is CONSTRAINTS for?

2001-03-18 Thread Cal Evans

It's not implemented in MySQL. It's there for compatibility.

In other flavors of SQL, constraints can be placed on relationships to
enforce referential integrity.

Cal
http://www.calevans.com


-Original Message-
From: Duke [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 3:36 AM
To: [EMAIL PROTECTED]
Subject: What is CONSTRAINTS for?


In the CREATE TABLE command there is a create_defn. option called ...
CONSTRAINT symbol

what is that for?

and how does that work?

duke.

Website: http://www.ilug-bom.org.in/
Ftp site: ftp.ilug-bom.org.in
Chat: irc.ilug-bom.org.in
Linuxers mailing list: [EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers



Get free email and a permanent address at http://www.netaddress.com/?N=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



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

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




Need some help on how to use mysql with web site

2001-03-18 Thread Kyzen Computers

I was wondering if someone can help me, I am new to the list and was looking for some 
help on how I can use mysql with my website to keep track of who comes in and giving 
them logins 

I have just read mysql and don't know anything PHP or CGI but if some one tells me how 
to incorporate the scripts in the website I would be grateful

Regards 
Inderjit
[EMAIL PROTECTED]




ERROR 1109: Unknown table

2001-03-18 Thread Phil Tardif

here is what happens with my update command:

update GGProfiles set GGProfiles.city = USzipcodes.city where
GGProfiles.zipcode = USzipcodes.zipcode;
ERROR 1109: Unknown table 'USzipcodes' in field list

the USzipcodes table does exist and the name even filled in from a tab
after the U.  it has the same owner and group as all of the other tables
in the database.

i'm using mysql version 3.23 on a cobalt raq3i.

anybody know what gives?

thanxamundo

phil

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

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: What is CONSTRAINTS for?]

2001-03-18 Thread Duke

Okie...I have this book on Proffessional PHP PRogramming and in the section of
PHP  SQL Databases they have given this eg. with the CONSTRAINTS optionit
goes like this.

CREATE TABLE authorsofdoc (
  docid INTEGER UNSIGNED NOT NULL,
  authorid  INTEGER UNSIGNED NOT NULL,
  constraint pk_authorsofdocPRIMARY KEY(docid, authorid)
)

Now what the heck does the 4th line do? i have never seen a syntax like that
in the CREATE TABLE syntax...wats all that 'constraint pk_authorsofdoc' and
after that 'PRIMARY KEY()' option
infact acording to CREATE TABLE syntax it should be...
CONSTRAINT fk_authorsofdoc  FOREIGN KEY(docid, authorid)

isnt it??? or am i wrong?

duke.


"Cal Evans" [EMAIL PROTECTED] wrote:
It's not implemented in MySQL. It's there for compatibility.

In other flavors of SQL, constraints can be placed on relationships to
enforce referential integrity.

Cal
http://www.calevans.com


-Original Message-
From: Duke [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 3:36 AM
To: [EMAIL PROTECTED]
Subject: What is CONSTRAINTS for?


In the CREATE TABLE command there is a create_defn. option called ...
CONSTRAINT symbol

what is that for?

and how does that work?

duke.

Website: http://www.ilug-bom.org.in/
Ftp site: ftp.ilug-bom.org.in
Chat: irc.ilug-bom.org.in
Linuxers mailing list: [EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers



Get free email and a permanent address at http://www.netaddress.com/?N=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



Website: http://www.ilug-bom.org.in/
Ftp site: ftp.ilug-bom.org.in
Chat: irc.ilug-bom.org.in
Linuxers mailing list: [EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers



Get free email and a permanent address at http://www.netaddress.com/?N=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




Re: information request

2001-03-18 Thread Colin Faber


1) How was it 'installed' Did you use RPMs, the source, or a bindist?
2) Did you make sure mysqld wasn't already running? 'ps auxwww | grep
mysqld'


Mani kandan Ramachandran wrote:
 
 Respected Sir/Madam
 
   While i configure mysql in my RedHat 7.0,it gives problem.And i do not
 know how tro start tha mysql.When i give the command to start th mysql
 
 /bin/safe_mysqld   it gives  [1] 1873 and
 A mysql process already excist
 
 how to run the mysql program and how i know server is connected
 
 when i used to run it gives the problem myql.sock
 
 Can yopu help me to get on to mysql.
 
 I am expecting ur reply
 
 thanking you
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: Mysql restarts at 100% CPU

2001-03-18 Thread vinod p

hi,
   thanks for the interest.  The error log just prints
an incomplete backtrace that is exactly the same after
every crash.  I ran the incomplete backtrace through
resolve, and it showed me functions such as thread
start... etc...  This is the backtrace that i've been
getting for all the crashes - 
---
Cannot determine thread, ebp=0xb24c, backtrace may
not be correct
stack range sanity check, ok, backtrace follows
0x40077552
0x40076f0f
0x80bdb6a
0x80bdfdf
0x80bd75d
0x400f99cb
0x80884b1
New value of ebp failed sanity check terminating
backtrace

   We have been doing testing of our software and in
all the runs, with all the mysql servers, this problem
has been experienced.  As soon as the server reaches
100% CPU, the mysql server restarts.  Without a single
exception till now.
   The servers are RedHat Linux 6.2 with kernel 2.4.2,
PHP 4.0.4pl1, apache 1.3.14 and mysql 3.23.32.  The
my.cnf file i'm using is this - 

[mysqld]
port= 3306
socket  = /tmp/mysql.sock
skip-locking
set-variable= key_buffer=640M
set-variable= max_allowed_packet=10M
set-variable= table_cache=640
set-variable= sort_buffer=6M
set-variable= record_buffer=6M
set-variable= thread_cache=16
set-variable= thread_concurrency=16 
set-variable= myisam_sort_buffer_size=64M
log-bin
server-id   = 1
set-variable= max_connections=2000
set-variable= max_connect_errors=1
set-variable= back_log=2900
set-variable= connect_timeout=15
set-variable= wait_timeout=57600
set-variable= interactive_timeout=57600


Tx.
Vinod.

--- "Jeremy D. Zawodny" [EMAIL PROTECTED] wrote:
 On Mon, Mar 19, 2001 at 12:34:30AM +, vinod p
 wrote:
 
  my mysql server restarts automatically when
 the
  machine touches 100% CPU usage.  any ideas why?
 
 What does the error log say? Anything?
 -- 
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 328-7878Fax: (408) 530-5454
 Cell: (408) 439-9951



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

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

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 3.23.35 is released

2001-03-18 Thread Jeremy D. Zawodny

On Mon, Mar 19, 2001 at 02:55:17PM +1200, Quentin Bennett wrote:
 Hi,
 
 To be fair to the anonymous writer, the main reason for introducing
 3.23.25 was
 
 Changes in release 3.23.35
 --
  
* Fixed newly introduce bug in `ORDER BY'.
 
 Nothing there about 'in Innobase and/or Gemini Tables', and for a release
 that is declared Stable to have a bug introduced is a bit of a no-no. If the
 bug only affected parts of the release that are still alpha, beta or gamma,
 as some of the new table types are, then the change notice should really
 reflect that, so that a new user is sure of what is affected, aiding the 'To
 upgrade or not upgrade' decision.

Bugs (sometimes rather old) have been found and fixed in stable
versions of MySQL before. The same is true of the Linux Kernel. That
doesn't change the fact (in either case) that the developers are
confident enough in their work to label the code "stable".

I'd say their track record (and the thousands of satisfied users)
says a lot about their judgment.

Some may not agree with it, but that is how they've done things.

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

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

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




mysqlbug CREATE TEMPORARY TABLE ... TYPE=MERGE ...; fails

2001-03-18 Thread Jeff S Wheeler

You cannot create a temporary table as TYPE=MERGE.  I have tried it using
both a temporary and a "normal" on-disk table in the UNION paramater without
success.  This might be useful to, say, the guy who posted thread "Tuple
length Question" earlier today...:)

I'm sure you can duplicate this on any platform so I'm not going to bother
with actual mysqlbug output unless a MySQL A.B. person wishes me to do so.
This could easily end up being a documentation bug, with the fix to document
that it is not possible to create temporary merge tables. :)

---
Jeff S Wheeler   [EMAIL PROTECTED]
Software DevelopmentFive Elements, Inc
http://www.five-elements.com/~jsw/


mysql CREATE TABLE language_en (id INT NOT NULL);
Query OK, 0 rows affected (0.04 sec)

mysql CREATE TEMPORARY TABLE language (id INT NOT NULL) TYPE=MERGE
UNION=(language_en);
ERROR 1017: Can't find file: '#sql3f8_1_0.MRG' (errno: 2)
mysql CREATE TABLE language (id INT NOT NULL) TYPE=MERGE
UNION=(language_en);
Query OK, 0 rows affected (0.00 sec)

mysql DROP TABLE language;
Query OK, 0 rows affected (0.01 sec)

mysql DROP TABLE language_en;
Query OK, 0 rows affected (0.00 sec)

mysql CREATE TEMPORARY TABLE language_en (id INT NOT NULL);
Query OK, 0 rows affected (0.00 sec)

mysql CREATE TEMPORARY TABLE language (id INT NOT NULL) TYPE=MERGE
UNION=(language_en);
ERROR 1017: Can't find file: '#sql3f8_1_2.MRG' (errno: 2)


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

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: I wanted to clear my doubt.

2001-03-18 Thread Van

Gaurav Rishiraj Ahuja wrote:
 
 Dear Sir/ Madam,
 
 I just wanted a small help.
 
 I just wanted to know whether MySql supports A.S.P, functions. And if yes, then how 
do we do the connection of the Database, that is D.S.N. Connections (means how to do 
it by going in Control Panel, ODBC Connections, and then what should be do.)
 
 Please let me know.
 
 Gaurav.
 
Gaurav:

Depends.  Are you running MySQL on *n*x or Win32?  Is the web-server IIS, or
Apache.  If it's on Apache I believe there is an ASP thingy that runs as a
module somewhere out there.  If it's all *n*x, most of use use Perl, or PHP to
do any database work.  I have no idea what people running MS Servers do with
MySQL.  Most of my Windoze clients just pay for MSSQL and use access to do
stuff.

Van
-- 
=
Linux rocks!!!   http://www.dedserius.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




Technical Clarification

2001-03-18 Thread Rama kathiresan kathiresan

hi,

  This is kathir from Uniware Systems, We are developing project on ASP with Backend 
as MySQL, We having a problem using "IN" and "NOT IN" operators in sub query
here i am listing my query as follows:

"select c.pickupdate,c.contno, r.relrefno, r.custname, r.contsize, r.conttype, 
r.qtybooked from contpickup c,releaseauthor r where c.relrefno=r.relrefno and 
c.relrefno in(select relrefno from contpickup where contno='"  ccode  "') and 
c.contno not in (select contno from billlading where relrefno in(select relrefno from 
contpickup where contno='"  ccode  "'))"

iam selecting the values from 3 different tables using in and not in operators.  When 
iam executing the above query it displaying the error as follows:

[TCX][MyODBC]You have an error in your SQL syntax near 'CRXU9021208'')' at line 1 

for ur clarification the simple query is also not executing using IN operator.

 select relrefno from releaseauthor where relrefno in 
(select relrefno from contpickup)

But this statement is executing 
 select relrefno from releaseauthor where relrefno in 
("123","456")

pls.. let me know solutions as earliest for the above query and using IN and NOT IN 
operators.

note:

The above query is executing in MSSQL Server 7.0 and Oracle 8.

regards,
kathir (Programmer Analyst)



_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.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




INSERT INTO Table problems

2001-03-18 Thread Ryan Shrout

Okay, another question from the stumbling idiot: what's wrong with this code:

$insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source, Link, 
Information, Status) VALUES ('', 'asdf', '2001-03-19 00:33:47', '1', 'asdf', 'asdf', 
'asdf', '2') LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

Anything?

$insert_result is 0, which means it failed, and it DID fail because the entry is not 
in the database.  What is weird, is that I copied and pasted that line from 
phpMyAdmin, which DID work!!  I pulling my hair out!

My eventual question will also be: is this a legal statement? : 
$insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source, Link, 
Information, Status) VALUES ($NewsID, $Title, $Date, $Author, $Source, $Link, 
$Information, $Status) LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

I guess I was just wondering if I need the ' ' around the variables like '$Title', etc.

But, most importantly is that first question: why would it execute correctly in 
phpMyAdmin, and then when I copy and paste the SQL-query from the "Modifications have 
been saved" line of phpMyAdmin into a PHP file, run it, and it fail?

Thank you for your assistance.

Ryan Shrout
Production Manager
Athlonmb.com
http://www.athlonmb.com
[EMAIL PROTECTED]





INSERT INTO Table problems

2001-03-18 Thread Vigile

Okay, another question from the stumbling idiot: what's wrong with this code:

$insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source, Link, 
Information, Status) VALUES ('', 'asdf', '2001-03-19 00:33:47', '1', 'asdf', 'asdf', 
'asdf', '2') LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

Anything?

$insert_result is 0, which means it failed, and it DID fail because the entry is not 
in the database.  What is weird, is that I copied and pasted that line from 
phpMyAdmin, which DID work!!  I pulling my hair out!

My eventual question will also be: is this a legal statement? : 
$insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source, Link, 
Information, Status) VALUES ($NewsID, $Title, $Date, $Author, $Source, $Link, 
$Information, $Status) LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

I guess I was just wondering if I need the ' ' around the variables like '$Title', etc.

But, most importantly is that first question: why would it execute correctly in 
phpMyAdmin, and then when I copy and paste the SQL-query from the "Modifications have 
been saved" line of phpMyAdmin into a PHP file, run it, and it fail?

Thank you for your assistance.

Ryan Shrout
Production Manager
Athlonmb.com
http://www.athlonmb.com
[EMAIL PROTECTED]




reusing unique id's when deleting/inserting?

2001-03-18 Thread Peter R. Wood - Mailing Lists

Hi all,

Here are two tables I'm working with. I apologize if you 
are not using a monospaced font and they are messed up.

This is used by a gradebook program.  When a professor adds an assignment to 
a class he teaches, it inserts the information about the assignment into the 
assignments table, and inserts the grade each student receives in the 
student_assignment table. This happens at the same time so the unique ID is 
generated the same.

When he deletes an assignment from the class, it deletes it from both tables.

However, after this, if he adds an assignment again, the unique ID generated 
by insertion into the assignment table is one greater than it should be - 
i.e., it auto increments the id based on the id of the row that just got 
deleted, not on the last row that is actually in the table. When the 
assignment is inserted into the student_assignment table, the unique ID is 
auto incremented based on the last ID that is actually in the table, not on 
the row that just got deleted.

The workaround I have found is to use last_insert_id() to find the ID that 
got inserted in to the assignment table, and use this to manually specify the 
ID for the student_assignment table.  This has the effect of putting the ID's 
in sync, which is what I want, but it seems like there should be a better 
solution. Any suggestions?

Thanks,

Peter

(tables below)


mysql describe assignments;
+++--+-+-++
| Field  | Type   | Null | Key | Default | Extra  |
+++--+-+-++
| id | int(30)|  | PRI | NULL| auto_increment |
| title  | char(50)   | YES  | | NULL||
| class_num  | char(6)|  | | ||
| weight | float(4,2) | YES  | | NULL||
| max_points | int(3) |  | | 0   ||
| type   | char(20)   | YES  | | NULL||
+++--+-+-++
6 rows in set (0.00 sec)
 
mysql describe student_assignment;
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Extra  |
+---+-+--+-+-++
| stu_id| int(10) |  | PRI | 0   ||
| assign_id | int(30) |  | PRI | NULL| auto_increment |
| grade | int(3)  | YES  | | NULL||
+---+-+--+-+-++
3 rows in set (0.00 sec)


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

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: INSERT INTO Table problems

2001-03-18 Thread Jason Landry

What's the "LIMIT 0,30" for ?

Also, you should probably do this:

$insert_result = mysql_query($insert_query) or die(mysql_error());

Then you wouldn't need to wait for an answer ;-)


- Original Message -
From: "Ryan Shrout" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 18, 2001 11:39 PM
Subject: INSERT INTO Table problems


Okay, another question from the stumbling idiot: what's wrong with this
code:

$insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source,
Link, Information, Status) VALUES ('', 'asdf', '2001-03-19 00:33:47', '1',
'asdf', 'asdf', 'asdf', '2') LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

Anything?

$insert_result is 0, which means it failed, and it DID fail because the
entry is not in the database.  What is weird, is that I copied and pasted
that line from phpMyAdmin, which DID work!!  I pulling my hair out!

My eventual question will also be: is this a legal statement? :
$insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source,
Link, Information, Status) VALUES ($NewsID, $Title, $Date, $Author, $Source,
$Link, $Information, $Status) LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

I guess I was just wondering if I need the ' ' around the variables like
'$Title', etc.

But, most importantly is that first question: why would it execute correctly
in phpMyAdmin, and then when I copy and paste the SQL-query from the
"Modifications have been saved" line of phpMyAdmin into a PHP file, run it,
and it fail?

Thank you for your assistance.

Ryan Shrout
Production Manager
Athlonmb.com
http://www.athlonmb.com
[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




Multiple Master/Slave Set Up for Failover and HA {Was Re: forwarded message from Van}

2001-03-18 Thread Van

"Jeremy D. Zawodny" wrote:
 
 On Fri, Mar 16, 2001 at 07:39:01PM -0700, Sasha Pachev wrote:
 
  Here is what you can do:
 
   server1 - server2- server3 - server4 - server5 -
^  |
|  |
 ---
 
  Arrows indicate master-slave relationships
Jeremy and All:

Thanks for the replies; after a tricky remote upgrade to my production server
I'm starting this exercise.

All servers at 3.23.33 (Sorry, not touching anything beyond that for a few
days.  Sure you understand).

Simple question:
Where do I put the my.cnf file?  It's nowhere on any of the servers except the
user directories who use it.

Choices:
/etc/my.cnf
/usr/local/etc/my.cnf
/usr/local/libs/mysql/my.cnf

Or, better yet, in /etc/rc.d/rc.mysql add:
--defaults-file=/etc/my.cnf

Anyone using this, please let me know.  I'll play with some of the above options
in the meantime.  Pro'ly the lattermost.

TIA,

Regards,
Van
-- 
=
Linux rocks!!!   http://www.dedserius.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: INSERT INTO Table problems

2001-03-18 Thread Vigile

The LIMIT is irrelevant.  It doesn't work with or without that there.

I put the die(mysql_error) in and the result wasn't very helpful...

I had another suggestion from a person saying to remove the first set of
column names to make the query like this:
$insert_query = "INSERT INTO news VALUES ('', 'asdf', '2001-03-19 00:33:47',
'1',
'asdf', 'asdf', 'asdf', '2') LIMIT 0, 30";
$insert_result = mysql_query($insert_query);

It works, but aren't those column names there for safety, to make sure the
values are placed in the correct columns?

Ryan Shrout
Production Manager
Athlonmb.com
http://www.athlonmb.com
[EMAIL PROTECTED]


- Original Message -
From: "Jason Landry" [EMAIL PROTECTED]
To: "Ryan Shrout" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 19, 2001 1:04 AM
Subject: Re: INSERT INTO Table problems


 What's the "LIMIT 0,30" for ?

 Also, you should probably do this:

 $insert_result = mysql_query($insert_query) or die(mysql_error());

 Then you wouldn't need to wait for an answer ;-)


 - Original Message -
 From: "Ryan Shrout" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, March 18, 2001 11:39 PM
 Subject: INSERT INTO Table problems


 Okay, another question from the stumbling idiot: what's wrong with this
 code:

 $insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source,
 Link, Information, Status) VALUES ('', 'asdf', '2001-03-19 00:33:47', '1',
 'asdf', 'asdf', 'asdf', '2') LIMIT 0, 30";
 $insert_result = mysql_query($insert_query);

 Anything?

 $insert_result is 0, which means it failed, and it DID fail because the
 entry is not in the database.  What is weird, is that I copied and pasted
 that line from phpMyAdmin, which DID work!!  I pulling my hair out!

 My eventual question will also be: is this a legal statement? :
 $insert_query = "INSERT INTO news (NewsID, Title, Date, Author, Source,
 Link, Information, Status) VALUES ($NewsID, $Title, $Date, $Author,
$Source,
 $Link, $Information, $Status) LIMIT 0, 30";
 $insert_result = mysql_query($insert_query);

 I guess I was just wondering if I need the ' ' around the variables like
 '$Title', etc.

 But, most importantly is that first question: why would it execute
correctly
 in phpMyAdmin, and then when I copy and paste the SQL-query from the
 "Modifications have been saved" line of phpMyAdmin into a PHP file, run
it,
 and it fail?

 Thank you for your assistance.

 Ryan Shrout
 Production Manager
 Athlonmb.com
 http://www.athlonmb.com
 [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


_
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: Technical Clarification

2001-03-18 Thread Fred van Engen

Hi Kathir,

On Mon, Mar 19, 2001 at 05:38:55AM -, Rama kathiresan kathiresan wrote:
   This is kathir from Uniware Systems, We are developing project on ASP with Backend 
as MySQL, We having a problem using "IN" and "NOT IN" operators in sub query
 
...
 iam selecting the values from 3 different tables using in and not in operators.  
When iam executing the above query it displaying the error as follows:
 
 [TCX][MyODBC]You have an error in your SQL syntax near 'CRXU9021208'')' at line 1 
 

MySQL doesn't support IN and NOT IN.  The manual and mailing lists describe
alternatives for many cases, but these are less readable (and maybe slower).

Regards,

Fred.

-- 
Fred van Engen  XO Communications B.V.
email: [EMAIL PROTECTED] Televisieweg 2
tel: +31 36 5462400 1322 AC  Almere
fax: +31 36 5462424 The Netherlands

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

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




strange ws_concat,concat result

2001-03-18 Thread Nyström, Rasmus

How come the query

SELECT
CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugdesc,created,modif
ied,bugstatus,submitter), '"') FROM tbl_bug;

returns something like
"4","4","4"
"10","10","10"

while only

SELECT
CONCAT_WS(';',title,prio,category,program,bugdesc,created,modified,bugstatus
,submitter) FROM tbl_bug;

returns the intended result except that the values are not confined withing
'"'.
that is

Tough Bug,1,3,4,A very long description

I do understand why the second query returns what it returns, but the first
one should not return what it returns, right?

Am I clear enough?

I'm using 2.23.33 on Windows 2000 Server.

/ Rasmus Nystrm

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

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