Re: Select problem

2001-03-03 Thread Bob Hall

>Hi,
>
>I having trouble working out how to get a result set similar to the 
>following where I select from a table with Date & Sales column.
>
>My specific question is can I have a column that accumulates values, 
>if so could I have some guidance on how to express this in a select 
>statement please.
>
>
>+--+---+---+
>| Month| Sales | Cum Sales |
>+--+---+---+
>| Jan  | 1000  | 1000  |
>| Feb  | 1500  | 2500  |
>| Mar  | 1200  | 3700  |
>| April| 1400  | 5100  |
>+--+---+---+
>
>Many thanks in advance.
>
>Richard

Sir, at times like this it's handy to have a copy of 'SQL for 
Smarties'. The following is taken from one of the examples, with only 
the table and column names changed.

SELECT s1.mnd, s1.sales, Sum(s2.sales) AS Cum_sales
FROM sales AS s1, sales AS s2
WHERE s2.mnd <= s1.mnd
GROUP BY s1.mnd;

Note that I used mnd instead of Month. Month is a function name, so 
you probably don't want to use it for a column name.

I used a date instead of a month name to make the WHERE clause work, 
i.e. the mnd column contained 2001-1-1, 2001-2-1, 2001-3-1, 2001-4-1, 
instead of Jan, Feb, etc.

I ran the statement above on the MS Titanic (aka my Wintel box) and 
it worked fine.

Bob Hall

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

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

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




Re: GROUP BY problem.

2001-03-03 Thread Bob Hall

Sir, look up Rand and ORDER BY in the documentation. I believe 
there's an example of using Rand and ORDER BY to do this.

Bob Hall

>Thanks for the answer. but actually I'm not saying that mysql is doing
>wrong, I just want to know HOW can I group by codigo and then get 10 random
>rows of the grouped ones.
>
>Hope I explain me.
>
>Thanks again.
>
>
>  > Angel Behar wrote:
>  > >
>  > > Hi !!!
>  > >
>  > > I'm running 3.23.28-gamma under windows NT, but I have the following
>  > > problem.
>  > > I need to query some data and gruop by some field (codigo in this case)
>so I
>  > > run the following   query :
>  > >
>  > > SELECT codigo from ropa where cve_depto='3' AND cve_clase='06' AND
>activo =
>  > > 'A'  AND p_credito <> 0 GROUP BY codigo;
>  > >
>  > > ++
>  > > | codigo |
>  > > ++
>  > > | 319066 |
>  > > ++
>  > > 1 row in set (0.43 sec)
>  > >
>  > > the results are as I expected BUT I need to GROUP BY RAND() too and
>LIMIT to
>  > > 10 rows :
>  > >
>  > > SELECT codigo from ropa where cve_depto='3' AND cve_clase='06' AND
>activo =
>  > > 'A'  AND p_credito <> 0 GROUP BY codigo, RAND()  LIMIT 10;
>  > >
>  > > ++
>  > > | codigo |
>  > > ++
>  > > | 319066 |
>  > > | 319066 |
>  > > | 319066 |
>  > > ++
>  > > 3 rows in set (0.30 sec)
>  > >
>  > > Actually I try switching codigo, RAND() or viceversa but doesn't work
>  > > either.
>  > >
>  > > As you can see once I use the RAND() option doesn't group codigo, I need
>  > > this because most of the articles are more than 10 but I really need to
>  > > solve this problem.
>  > >
>  > > Hope anybody can help me.
>  > >
>  > > Thanks in advance.
>  > >
>  > > Angel
>  > >
>  > >
>  > Each of those 3 lines have a different rand(), so it is doing it right.
>  >
>  > -
>  > Before posting, please check:
>  >http://www.mysql.com/manual.php   (the manual)
>  >http://lists.mysql.com/   (the list archive)
>  >
>  > 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

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

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

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




Re: delete

2001-03-03 Thread Bob Hall

>When you delete somthing... is there any way to recover the data??
>
>mvh:
>Pål Wester, programmerer
>never.no as, stortingsgt 30, 0161 Oslo
>direkte: 22 01 66 34, 906 900 62
>tlf: 22 01 66 34, fax: 22 01 66 21
>http://never.no - icq:103476059
>~ innhold for internett ~

Yes sir. Retype it.

mvh:
Bob Hall, programmerer som har også av og til fjerna poster tilfeldigvis

P.S. - Got backup?

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

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

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




Problems building mysql++

2001-03-03 Thread Quinn Wilson

I am trying to build mysql++, I am doing something wrong but I don't know what.
I have downloaded and untar'd ungzipped mysql++-1.7.8.tar.gz into mysql++-1.7.8, run 
configure and then make, make install. I set my LD_LIBRARY_PATH to include the new 
library and then I try to run the resetdb program in the examples directory and it 
dies w/ Segmentation fault (core dumped).

It seemed to "make" correctly.

The version of mysql I am running is 3.23.33, freshly built and installed. This is a 
Redhat 7.0 i386, I have not had any problems building other applications so I don't 
think my compiler installation is to blame.

Here's what I tried. I found the lt-resetdb program and ran gdb lt-resetdb core and 
got:

GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `./lt-resetdb'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from 
/home/quinn/decomp/mysql++-1.7.8/sqlplusint/.libs/libsqlplus.so.1...done.
Loaded symbols for /home/quinn/decomp/mysql++-1.7.8/sqlplusint/.libs/libsqlplus.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/local/mysql/lib/mysql/libmysqlclient.so.10...done.
Loaded symbols for /usr/local/mysql/lib/mysql/libmysqlclient.so.10
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  chunk_free (ar_ptr=0x464c457f, p=0x40057198) at malloc.c:3071
3071malloc.c: No such file or directory.

I stepped through untill I got a SIGSEGV :

90  if (mysql_real_connect(&mysql,host,user,passwd,db, 3306,NULL,0)) {
(gdb) 

Program received signal SIGSEGV, Segmentation fault.
chunk_free (ar_ptr=0x464c457f, p=0x40057198) at malloc.c:3071
3071malloc.c: No such file or directory.
Current language:  auto; currently c

I don't know what to make of this output, does anyone on this list recognize what's 
going on?
I don't know what to make of this output. 

Quinn Wilson - [EMAIL PROTECTED] - Lunkee cc Lunky do{;}
 - "For a list of the ways which technology has failed to improve our quality of life, 
press 3."




Keyword search string

2001-03-03 Thread MikeBlezien

Greetings,

I have a table that has a column where search keywords are entered. 

column searchwords 
word1 word2 word3 ..etc 

Now when this column is queried for a search, I'm wonder how is the best way to
evaluate
matching the keywords. In the SELECT query, would I get better results if I use:

WHERE searchwords IN (keyword_string) 

or 

WHERE serachwords LIKE "%keyword_string%" 

The "keyword_string" are the keywords entered into a search form, the same as
the keywords where
entered into the searchwords column: keyword1 keyword2..etc 

TIA, 
Mike(mickalo)Blezien

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















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

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




RE: Index / Rank in table

2001-03-03 Thread Fábio Ottolini

Dear Adam,

I have faced the same problem a while ago and I didn't receive any kind of
answer regarding doing this with MySQL in any discussion list at all. I had
to create a function using PHP to do the hard job and the ranking position
was created on the fly (using your example, I wouln't need table
album_ranks). Yes... I agree with you. It's extremely ineffcient but at
least it works (my DB has got more than 20.000 entries). The idea is
something like this:

send query to MySQL to get * from table album_votes ordered by votes
(descending order);
Create a var to hold the ranking position starting at 1
($ranking_position=1);
loop to circle thru the resulting array until you find the album_id that you
want, incrementing $ranking_position by 1 before the end of the loop. When
you find the correct album_id just break the loop and $ranking_position will
be equal to the ranking position of the album that you want.

I believe this is a little bit different from what you are doing, right?
Well... It seems to be the only way to do it. Sad but true. :///

PLEASE ANY OF YOU CORRECT IF I'M WRONG! This will help me a lot also. :)))

BR,

Fábio Ottolini


-Original Message-
From: Adam W [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 03, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: Index / Rank in table


Hi

I'm designing a site where people can vote for their favourite albums using
PHP3 to query the database.
It's the first database I've 'designed', and I'm sure that there are
improvements I could make to the way I have organised the data.

For example, I'm looking for a way to make the 'album_ranks' table
superfluous... e.g. when I query the database and return the 'album_id',
'artist', 'title' and 'year' fields from the 'album_details' table, I would
like to be able to automatically return a 'rank' based on the 'album_id'
position in the 'album_votes' table. Is it possible to do this? Currently,
everytime an album is voted for, and the 'votes' column is updated in
'album_votes', I am repopulating the whole of the 'album_ranks' table on the
basis of the updated vote... considering that this table contains in excess
of 20,000 elements, this seems to me to be extremely inefficient.

I have read what I can on 'indexes' (I'm sure that the solution lies there
somewhere), but I'm still in a fog of ignorance on the subject. Could anyone
point me in the right direction

Yours gratefully

Adam

[ example structure below... ]


SELECT * FROM album_details

---
album_id   |  artist|  title  | year
---
5   |  the beatles   | revolver| 1966
17 |  nirvana| nevermind | 1991

etc etc...


SELECT * FROM album_votes

---
album_id|  votes
---
5|  16382
17  |  4732

etc etc...

SELECT * FROM album_ranks

---
album_id|  rank
---
5|  1
17  |  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: Win 2000 Not starting-SOLVED

2001-03-03 Thread Miguel Angel Solórzano

At 13:29 03/03/2001 +, Lucy wrote:
Hi,

>Hi
>I had pored for ages over the Manual prior to posting my problem.  I've
>solved it - all the methods given in the Manual dont apply to 2000. Manual

The above it isn't correct, I use Win2kPro and Win2k Server on my
work machine and all applies to NT you can apply to Win2k OS.

When you run mysqld-nt --standalone the server runs and the DOS
screen remains open. You find on \mysql directory a file called
Readme with instructions about this and mentioning the use of
WinMySQLAdmin that can help you to run the server as service or
as standalone (when the service is removed, there is this option).

Regards,
Miguel

>states the various start
>methods etc apply to both NT and 2000.  They don't, at least not for
>Professional.  Forget the --standalone, the skip- etc etc.  The only method,
>after exhaustive tries, that works is:
>1.  Go to the dir where mysql is stored (I'd unzipped to d:)  (dont forget
>to first edit my.cnf for d:)
>2.  At
>  d:\mysql>bin\mysql-nt --install
>3.  d:\mysql>NET START mysql
>etc.then start the monitor.
>You must install it as a service, no other options (as for NT) seem to work
>with Pro 2000.  Also, it's best to restart pc more frequently too.
>Cheers, Lucy
>
>
>
>
>-
>Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

__  ___   __
   /  |/  /_ __/ __/ __ \/ /   http://www.mysql.com/
  / /|_/ / // /\ \/ /_/ / /__  Miguel Solórzano <[EMAIL PROTECTED]>
/_/  /_/\_, /___/\___\_\___/  São Paulo, Brazil
<___/  Development 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




Index / Rank in table

2001-03-03 Thread Adam W

Hi

I'm designing a site where people can vote for their favourite albums using
PHP3 to query the database.
It's the first database I've 'designed', and I'm sure that there are
improvements I could make to the way I have organised the data.

For example, I'm looking for a way to make the 'album_ranks' table
superfluous... e.g. when I query the database and return the 'album_id',
'artist', 'title' and 'year' fields from the 'album_details' table, I would
like to be able to automatically return a 'rank' based on the 'album_id'
position in the 'album_votes' table. Is it possible to do this? Currently,
everytime an album is voted for, and the 'votes' column is updated in
'album_votes', I am repopulating the whole of the 'album_ranks' table on the
basis of the updated vote... considering that this table contains in excess
of 20,000 elements, this seems to me to be extremely inefficient.

I have read what I can on 'indexes' (I'm sure that the solution lies there
somewhere), but I'm still in a fog of ignorance on the subject. Could anyone
point me in the right direction

Yours gratefully

Adam

[ example structure below... ]


SELECT * FROM album_details

---
album_id   |  artist|  title  | year
---
5   |  the beatles   | revolver| 1966
17 |  nirvana| nevermind | 1991

etc etc...


SELECT * FROM album_votes

---
album_id|  votes
---
5|  16382
17  |  4732

etc etc...

SELECT * FROM album_ranks

---
album_id|  rank
---
5|  1
17  |  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: Can't locate DBI.pm in - CLOSED

2001-03-03 Thread N Sikkandar Dulkarnai

Thank you all. I installed and seems working fine.

- Original Message -
From: "Paulus" <[EMAIL PROTECTED]>
To: "N Sikkandar Dulkarnai" <[EMAIL PROTECTED]>
Sent: Saturday, March 03, 2001 8:04 PM
Subject: Re: Can't locate DBI.pm in


> You haven't propably installed DBI.
> Find it at CPAN and install.
>
> N Sikkandar Dulkarnai wrote:
> >
> > I just trying to run the below perl script and got the following error.
Any suggesstion pls.
> >   # more training1.pl
> >   #!/usr/bin/perl
> >   use DBI;
> >   $mysocket="/var/mysql.sock";
> >   $dsn="dbi:mysql:training;mysql_socket=$mysocket";
> >   $user="demo";
> >   $password="demo";
> >   $dbh=DBI->connect($dsn,$user,$password)||die "cannot connect";
> >   $sth=$dbh->prepare("SELECT * FROM telephone");
> >   $sth->execute();
> >   while(@row=$sth->fetchrow_array) {
> >   print "@row\n";
> >   }
> >   $dbh->disconnect();
> >
> > t# ls -al training1.pl
> > -rwxr-xr-x   1 mysqlmysql357 Mar  3 18:26 training1.pl
> > # perl training1.pl
> > Can't locate DBI.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.00503/sun4-so
> > laris /usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-sol
> > aris /usr/local/lib/perl5/site_perl/5.005 .) at training1.pl line 3.
> > BEGIN failed--compilation aborted at training1.pl line 3.


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

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 for my application?

2001-03-03 Thread Mutsuura Associates, Inc.

Hello all,

I am brand new to MySQL. I have very limited experience with SQL type
databases. MySQL appears to be a very elaborate product capable of many
things. I've glanced at the documentation before writing this. I have 2
very general question to all you 'experienced' MySQL users.

Question #1)...

My application is in definite need of an SQL database manager. That much I
know. But what I'm looking for is a db manager that can handle backward
compatibility (ie: database version independence) of my application's
data.

Putting it in laymen's terms...

I have an application that creates and uses a database of data that it
uses now (say with version 1.0 of my software). Next year I come out with
version 2.0 of my software but I want my software to be capable of running
with previous versions of data (stored in the database) as well as new
versions.

In other words, I want to develop my software to be backward compatible
with previous versions of data. I know the application is my
responsibility, BUT will MySQL be capable of managing concurrent versions
of data inbetween software versions?

Questions #2)...

I've used INFORMIX E/SQL in the past but only a little. So I am vaguely
familiar with the 'style' of commands one must embed into the code to
retrieve data from the database manager.

Is there a 'standard' to SQL query command syntax? If I commit to MySQL
today and decide to use ORACLE, INFORMIX, GNUSQL, etc. down the road (for
whatever reason) will I have to rewrite my db interface handlers?

- - -

Sorry about the simplicity of these questions but you can tell I am
exploring what are my best options for introducing a db manager to my
application without making costly mistakes from the start.

Thank you
Attila


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

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: A newbie question

2001-03-03 Thread Seung-woo Nam

Hi
By saying "mysql -u root mysql" you are telling mysql that you are going to use
the database mysql which you have to use to add new users. Another way of doing
it is type "mysql -u root" to log in and type "use mysql" in mysql command
line. "test" is a database created by mysql by default when you install it so
that you can test creating tables and running quieries on it.

Seung-woo Nam

anil kumar wrote:

> hello All,
>   I am new to mysql database. I downloaded  mysql and  running on my
> system.
>  For adminiatrative purpose the command i run as written in manual is
>   "mysql -u root mysql"
>   I am unable to understand why i have to write  mysql after "-u root" why
> not any other database name "test".
>   I tried to run the command like this
>   "mysql -u root  test"
>and when i tried to add a user i ghot Error
>Table db.user does not exist.
>  I am unable to understand the meaning of above Error.
> Please help me to understand the problem.
>   Thanks in advance
>
> anil
>


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

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




Can't locate DBI.pm in

2001-03-03 Thread N Sikkandar Dulkarnai

I just trying to run the below perl script and got the following error. Any 
suggesstion pls.
  # more training1.pl
  #!/usr/bin/perl
  use DBI;
  $mysocket="/var/mysql.sock";
  $dsn="dbi:mysql:training;mysql_socket=$mysocket";
  $user="demo";
  $password="demo";
  $dbh=DBI->connect($dsn,$user,$password)||die "cannot connect";
  $sth=$dbh->prepare("SELECT * FROM telephone");
  $sth->execute();
  while(@row=$sth->fetchrow_array) {
  print "@row\n";
  }
  $dbh->disconnect();

t# ls -al training1.pl
-rwxr-xr-x   1 mysqlmysql357 Mar  3 18:26 training1.pl
# perl training1.pl
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00503/sun4-so
laris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-sol
aris /usr/local/lib/perl5/site_perl/5.005 .) at training1.pl line 3.
BEGIN failed--compilation aborted at training1.pl line 3. 



MyODBC

2001-03-03 Thread Pavel Trefny

I have problem at compilation run MyODBC.

./configure --with-unixODBC=/usr/local/odbc \
--with-mysql-libs=/usr/lib/mysql \
--with-mysql-includes=/usr/include \
--prefix=/usr/local/odbc/lib

make
cd . && autoheader
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-I/usr/include
 -I/usr/local/odbc/include  -g -O2 -c execute.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -I/usr/local/odbc/include -g
-O2
-Wp,-MD,.deps/execute.pp -c  -fPIC -DPIC execute.c -o execute.lo
execute.c: In function  nsert_param':
execute.c:347: warning: passing arg 1 of Mysql_odbc_escape_string' from
incompatible pointer type
execute.c:347: warning: passing arg 2 of Mysql_odbc_escape_string' makes
integer from pointer without a cast
execute.c:347: warning: passing arg 3 of Mysql_odbc_escape_string' makes
pointer from integer without a cast
execute.c:347: warning: passing arg 4 of Mysql_odbc_escape_string' makes
integer from pointer without a cast
execute.c:347: warning: passing arg 5 of Mysql_odbc_escape_string' makes
pointer from integer without a cast
execute.c:347: too many arguments to function Mysql_odbc_escape_string'
make: *** [execute.lo] Error 1

Pleas help
Thanks

--
S pozdravem
Pavel Trefny

=
Pavel Trefny, Ticha 338, Blatna 38801
[EMAIL PROTECTED]
tel. +420344421326
mob. tel. +420607643770, +420603921397
ICQ No : 20476221
server & network administrator
Czech Republic
=

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

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




Re: Can this query not be done in MySQL.

2001-03-03 Thread Michael Widenius


Hi!

Sorry for the late reply, but I was away for a one week work/vacation
trip to Rio.

> "Richard" == Richard Reina <[EMAIL PROTECTED]> writes:

Richard> Steve,
Richard> I never received Mr. Van Engen's response.  I appreciate your response. 
Richard> However, my question remains unanswered.  If you put "sequence" in the
Richard> GROUP BY it does not give you the value that correspond to the MAXIMUM
Richard> sequence.  As a matter of fact I can't find any combination of values
Richard> that you can put in the GROUP BY clause that will give you the values
Richard> that correspond with MAX.  What good is an aggregate function like MAX
Richard> if it does not give you the value ( and only that ) that corresponds to
Richard> that aggregate function.  In this case shouldn't (MAX(sequence)) give
Richard> you only those values that correspond to the maximum sequence for each
Richard> flight which would be:

Richard> +---+
Richard> |flight_no |sequence|City   |
Richard> | 127  | 2  |Boston |
Richard> | 391  | 1  |Miami  |
Richard> +---+


Richard> The documentation in the documentation under GROUP BY functions (section
Richard> 7.3.12) seems to advocate this syntax -- specifically with their example
Richard> of querying orders by MAX(payments) -- although they don't show the
Richard> results of their examples.

Richard> If this cannot be done in MySQL will someone with authority on the
Richard> subject -- perhaps Sasha or Monty -- simply say that MySQL cannot
Richard> perform this type of query. If it can be done will someone demonstrate
Richard> how it can be done in MySQL.  I believe I can do it in other DBMSs with
Richard> the following subselect:


Richard> SELECT soo.flight_no, soo.sequence, soo.city
Richard>  FROM stop_offs soo /* That's "stop_offs outer" */
Richard>  WHERE soo.sequence =
Richard>   (select max(soi.sequence)
Richard>   FROM stop_offs soi   /* "stop_offs inner" */
Richard>   where soi.flight_no = soo.flight_no )

Richard> however, it is my understanding that MySQL does not support subselects. 
Richard> I have once again included a copy of the table below. 

Richard> Once again, thank you for your attention in this matter.

Richard> Here is the table:
Richard> +--+
Richard> |  STOP_0FFS   | 
Richard> +--+
Richard> |FLIGHT_NO |CITY | SEQUENCE|
Richard> |127   |Chicago  |1|
Richard> |127   |Boston   |2|
Richard> |391   |Miami|1|
Richard> +--+

Richard> SELECT flight_no, MAX(sequence), city FROM stop_offs GROUP BY flight_no;

Richard> gives the result:

Richard> +---+
Richard> |flight_no |sequence|City   |
Richard> | 127  | 2  |Chicago|
Richard> | 391  | 1  |Miami  |
Richard> +---+

Richard> However Chicago is the city of the first stop off (sequence 1) not the
Richard> value that corresponds with a sequence of 2 which would be 'Boston'.

Richard> The desired result is the following:

Richard> +---+
Richard> |flight_no |sequence|City   |
Richard> | 127  | 2  |Boston |
Richard> | 391  | 1  |Miami  |
Richard> +---+

Without sub selects one can't do this easily, but it's still possible
to do by using the trick that is described in the MySQL manual under
the GROUP BY section:

Until MySQL has sub selects, you can use the following query:

select flight_no, MAX(sequence), substring(MAX(concat(rpad(sequence,2,' '),city)),3) 
from stops GROUP BY flight_no;

It's not that elegant, but its works (and is even in some cases faster
than sub selects)!

Regards,
Monty

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

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




configure can't find LinuxThreads

2001-03-03 Thread ethy

>Description:
   When running ./configure it can't find LinuxThreads.
   Environment: Linux 2.0.35
downloaded and expanded LinuxThreads-2.1.3.tar.gz.
It seems the tarball do not include pthread.h which
"configure" looks for.
>How-To-Repeat:
LinuxThreads-2.1.3.tar.gz does not include "pthread.h"

>Fix:
include minimal include files necessary to compile mySQL??

>Submitter-Id:  Ethy Brito
>Originator:
>Organization: Phonet S/C Ltda.
>MySQL support: none
>Synopsis:  trouble configuring mySQL on ancient Linux
>Severity:  critical
>Priority:  medium
>Category:  mysql
>Class: doc-bug
>Release:   mysql-3.23.32 (Source distribution)

>Environment:

System: Linux jupiter 2.0.35 #1 Thu Dec 3 10:21:40 EDT 1998 i586 unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx   1 root root   13 Jul 30  1998 /lib/libc.so.4 -> libc.so.4.7.6
-rwxr-xr-x   1 root root   634880 Jun  4  1996 /lib/libc.so.4.7.6
lrwxrwxrwx   1 root root   14 Jul 30  1998 /lib/libc.so.5 -> libc.so.5.4.44
-rwxr-xr-x   1 root root   580816 Mar 23  1998 /lib/libc.so.5.4.44
-rw-r--r--   1 root root  1120212 Feb  2  1998 /usr/lib/libc.a
lrwxrwxrwx   1 root root   19 Jul 30  1998 /usr/lib/libc.so -> 
/lib/libc.so.5.4.44
Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock 
--with-low-memory --with-mit-threads=yes --without-perl --enable-thread-safe-client 
--without-berkeley-db
Perl: This is perl, version 5.004_04 built for i586-linux

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

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




Perl/mysql.

2001-03-03 Thread N Sikkandar Dulkarnai

Hello there,

I just installed "mysql  Ver 11.12 Distrib 3.23.33, for sun-solaris2.6 (sparc)". How 
do I insert rows into mysql database.tablevia PERL ?. It would be appreciated if some 
one can send some basic structure of connecting into sql using perl and some useful 
links.

Thanks in advance.

Regards,

Sikkandar.



Re: Win 2000 Not starting-SOLVED

2001-03-03 Thread Lucy

Hi
I had pored for ages over the Manual prior to posting my problem.  I've
solved it - all the methods given in the Manual dont apply to 2000. Manual
states the various start
methods etc apply to both NT and 2000.  They don't, at least not for
Professional.  Forget the --standalone, the skip- etc etc.  The only method,
after exhaustive tries, that works is:
1.  Go to the dir where mysql is stored (I'd unzipped to d:)  (dont forget
to first edit my.cnf for d:)
2.  At
 d:\mysql>bin\mysql-nt --install
3.  d:\mysql>NET START mysql
etc.then start the monitor.
You must install it as a service, no other options (as for NT) seem to work
with Pro 2000.  Also, it's best to restart pc more frequently too.
Cheers, Lucy




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

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: Scaling mysql

2001-03-03 Thread vinod panicker

hey,
replication was ruled out coz the writes are very very frequent.  and consistency 
of data is a very important issue.

tx.
vinod

- Original Message --
"Jason Landry" <[EMAIL PROTECTED]> wrote:
To:<[EMAIL PROTECTED]>,
"vinod  panicker" <[EMAIL PROTECTED]>
From:"Jason Landry" <[EMAIL PROTECTED]>
Date:Sat, 3 Mar 2001 03:38:10 -0600
CC:<[EMAIL PROTECTED]>
Subject: Re:  Scaling mysql

Have you considered replication?  There's a pretty good chapter in the MySQL
manual on how to objectively determine the benefit to a master/slave setup
with n slaves (it depends on how often writes happen to the database).

- Original Message -
From: "vinod panicker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 1:24 PM
Subject: Scaling mysql


> hey,
> i'm having a problem with scaling a mysql server.  This is the
situation... i have a database with 5 tables containing user data.  Except
one, all the other tables have only 2 fields.  This data is queried often
and needs to be accessed by multiple web servers.  Each table would contain
something like 500,000 to 1,000,000 records.  I'm using PHP to access the
mysql database.  The system would be experiencing loads of 5000 concurrent
users.
>  Tips on how to scale this database to handle such a load would be
very helpful.  The H/W is pretty good - 2 gigs of RAM and a dual CPU.
>
> Tx.
> Vinod.
>
> _
> 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
>


_
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




Re: Query with multiple form fields

2001-03-03 Thread Jason Landry

I'm assuming you're using PHP... this example is rather simplistic; you can
create a whole routine for building a select statment.  You could have a
checkbox on the form that allows for AND/OR comparison (the name on the form
would be 'operator' in this example):

$query = "select * from $database where title like '%$title ";
if(!empty($quotation))
$query .= " $operator quotation like '%$quotation%'";



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 03, 2001 3:33 AM
Subject: Query with multiple form fields


> The following query
>
> SELECT * from $database WHERE title LIKE '%$title%' OR quotation LIKE
'%$quotation%'
>
> does not work as desired, if one of the two query fields in the HTML form
stays empty. How do I do this query properly, leaving the user the
opportunity to narrow the search by filling in as many fields as he wishes,
e. g. "list all books with THIS word in the title and/or THAT word in the
quotation".
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Scaling mysql

2001-03-03 Thread Jason Landry

Have you considered replication?  There's a pretty good chapter in the MySQL
manual on how to objectively determine the benefit to a master/slave setup
with n slaves (it depends on how often writes happen to the database).

- Original Message -
From: "vinod panicker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 1:24 PM
Subject: Scaling mysql


> hey,
> i'm having a problem with scaling a mysql server.  This is the
situation... i have a database with 5 tables containing user data.  Except
one, all the other tables have only 2 fields.  This data is queried often
and needs to be accessed by multiple web servers.  Each table would contain
something like 500,000 to 1,000,000 records.  I'm using PHP to access the
mysql database.  The system would be experiencing loads of 5000 concurrent
users.
>  Tips on how to scale this database to handle such a load would be
very helpful.  The H/W is pretty good - 2 gigs of RAM and a dual CPU.
>
> Tx.
> Vinod.
>
> _
> 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
>


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

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: Re: max connections

2001-03-03 Thread vinod panicker

thanks a million... i've got another problem that i've been struggling with for a long 
time now.  It needs to be fixed fast.. running out of time... the problem is this - 
i'm using PHP to connect to mysql using mysql_connect().  The script runs fine till a 
certain number of users.  This 'certain number' keeps changing.  When the machine is 
rebooted, the server supports around 150 clients... but soon restarts and i get mysql 
connection failed in the script.  I ran the servers with logging enabled, but the 
restart is not caused by any specific query as such.  In the .cnf file, i've just 
increased the max_connections variable.  The server runs smoothly for some time and 
then it just restarts without any warning... nothing in the .err file too!  weird... 
any hope, suggestions?

Tx.
Vinod

- Original Message --
"Jorge del Conde" <[EMAIL PROTECTED]> wrote:
To:"vinod  panicker" <[EMAIL PROTECTED]>
From:"Jorge del Conde" <[EMAIL PROTECTED]>
Date:Sat, 3 Mar 2001 03:51:30 -0600
CC:<[EMAIL PROTECTED]>
Subject: Re: Re:  max connections

Hi,

If you want to have 1000+ connections, you will need to modify and recompile
LinuxThreads.  Afterwards, you'll need to recompile MySQL while linking with
the new libpthread.a library.

Check the following section from the manual:
http://www.mysql.com/doc/L/i/Linux.html


Regards,
Jorge

MySQL Development Team
__  ___  __   __
   /  |/  /_ __/ __/ __ \/ /   Jorge del Conde <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\/ Mexico City, Mexico
<___/


- Original Message -
From: "vinod panicker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 03, 2001 2:52 AM
Subject: Re: Re: max connections


> hey,
> thanks for replying so soon.  the max limit of files and inodes have
been increased on the system.  So that is not a problem.  But what i really
meant to ask was if mysql scales well over 1000 connections (assuming that
i'm not having any external problems like the OS for instance).
>
> Tx.
> Vinod
>
> - Original Message --
> "Jorge del Conde" <[EMAIL PROTECTED]> wrote:
> To:<[EMAIL PROTECTED]>,
> "vinod  panicker" <[EMAIL PROTECTED]>
> From:"Jorge del Conde" <[EMAIL PROTECTED]>
> Date:Sat, 3 Mar 2001 01:17:41 -0600
> Subject: Re:  max connections
>
> Hi,
>
> The maximum number of connections that mysql can accept is restricted by
> both:  the OS and ulimit.  In other words, you can set max_connections as
> high as you want without bypassing the limits specified in ulimit.
>
> If you do ulimit -n you should get the number of connections allowed (1024
> by default I think) ..
>
> Read section 21.3 in the manual for having several servers running on
> different ports on the same machine.
>
> Regards,
> Jorge
>
> MySQL Development Team
> __  ___  __   __
>/  |/  /_ __/ __/ __ \/ /   Jorge del Conde <[EMAIL PROTECTED]>
>   / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
>  /_/  /_/\_, /___/\___\_\/ Mexico City, Mexico
> <___/
>
>
> - Original Message -
> From: "vinod panicker" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 02, 2001 1:09 PM
> Subject: max connections
>
>
> > hey,
> > i'm developing a product that heavily utilizes mysql databases
through
> PHP.  The max number of connections that any server can handle is needed
as
> i have to think of scaleability issues.  The servers are pretty powerful -
> it maxes out at 4G's 2x850 P-III.  I need max performance out of this box.
> It will be accessed by multiple web servers.
> > I also wanted to know if I can have 2 mysql servers on the same
> machine accessing and serving data from the *same* database... also, at
what
> number of connections does mysql go for a toss?
> >
> > Tx.
> > Vinod
>



_
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




Re: Re: max connections

2001-03-03 Thread Jorge del Conde

Hi,

If you want to have 1000+ connections, you will need to modify and recompile
LinuxThreads.  Afterwards, you'll need to recompile MySQL while linking with
the new libpthread.a library.

Check the following section from the manual:
http://www.mysql.com/doc/L/i/Linux.html


Regards,
Jorge

MySQL Development Team
__  ___  __   __
   /  |/  /_ __/ __/ __ \/ /   Jorge del Conde <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\/ Mexico City, Mexico
<___/


- Original Message -
From: "vinod panicker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 03, 2001 2:52 AM
Subject: Re: Re: max connections


> hey,
> thanks for replying so soon.  the max limit of files and inodes have
been increased on the system.  So that is not a problem.  But what i really
meant to ask was if mysql scales well over 1000 connections (assuming that
i'm not having any external problems like the OS for instance).
>
> Tx.
> Vinod
>
> - Original Message --
> "Jorge del Conde" <[EMAIL PROTECTED]> wrote:
> To:<[EMAIL PROTECTED]>,
> "vinod  panicker" <[EMAIL PROTECTED]>
> From:"Jorge del Conde" <[EMAIL PROTECTED]>
> Date:Sat, 3 Mar 2001 01:17:41 -0600
> Subject: Re:  max connections
>
> Hi,
>
> The maximum number of connections that mysql can accept is restricted by
> both:  the OS and ulimit.  In other words, you can set max_connections as
> high as you want without bypassing the limits specified in ulimit.
>
> If you do ulimit -n you should get the number of connections allowed (1024
> by default I think) ..
>
> Read section 21.3 in the manual for having several servers running on
> different ports on the same machine.
>
> Regards,
> Jorge
>
> MySQL Development Team
> __  ___  __   __
>/  |/  /_ __/ __/ __ \/ /   Jorge del Conde <[EMAIL PROTECTED]>
>   / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
>  /_/  /_/\_, /___/\___\_\/ Mexico City, Mexico
> <___/
>
>
> - Original Message -
> From: "vinod panicker" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 02, 2001 1:09 PM
> Subject: max connections
>
>
> > hey,
> > i'm developing a product that heavily utilizes mysql databases
through
> PHP.  The max number of connections that any server can handle is needed
as
> i have to think of scaleability issues.  The servers are pretty powerful -
> it maxes out at 4G's 2x850 P-III.  I need max performance out of this box.
> It will be accessed by multiple web servers.
> > I also wanted to know if I can have 2 mysql servers on the same
> machine accessing and serving data from the *same* database... also, at
what
> number of connections does mysql go for a toss?
> >
> > Tx.
> > Vinod
>
>
>
> _
> 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


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

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




Re: Query with multiple form fields

2001-03-03 Thread Cynic

aply logic in the app. i. e. build the where clause from the 
filled in fields only:

$where = array() ;
foreach( $HTTP_GET_VARS as $v ) {
if( '' != $v ) {
$where[] = "'%$v%'" ;
}
}
$where = implode( ' OR ' , $where ) ;
$query = "select blah $where" ;

This is total crap but I've been up all night, so sorry. But 
at least you get the idea.

At 10:33 3.3. 2001, [EMAIL PROTECTED] wrote the following:
-- 
>The following query
>
>SELECT * from $database WHERE title LIKE '%$title%' OR quotation LIKE '%$quotation%'
>
>does not work as desired, if one of the two query fields in the HTML form stays 
>empty. How do I do this query properly, leaving the user the opportunity to narrow 
>the search by filling in as many fields as he wishes, e. g. "list all books with THIS 
>word in the title and/or THAT word in the quotation".
>
>-
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--end of quote-- 




Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[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




Query with multiple form fields

2001-03-03 Thread georg

The following query

SELECT * from $database WHERE title LIKE '%$title%' OR quotation LIKE '%$quotation%'

does not work as desired, if one of the two query fields in the HTML form stays empty. 
How do I do this query properly, leaving the user the opportunity to narrow the search 
by filling in as many fields as he wishes, e. g. "list all books with THIS word in the 
title and/or THAT word in the quotation".

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

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




Myodbc install options

2001-03-03 Thread Hikmet İP

Hi,

We have been using MyODBC 2.50.36 and we are connected to MySQL server at Linux 
(Red Hat 7.0 2.2.16-22) under MS Win98.

But we can't get a result from Win98-ODBC Linux's MySQL clients -q parameter. 

-q parameter supplies "don't cache result, print it row by row".

How can we make a configuration in MyODBC under Win98 or how can we create a 
"C:\my.cnf" file?

Thanks.



Scaling mysql

2001-03-03 Thread vinod panicker

hey,
i'm having a problem with scaling a mysql server.  This is the situation... i have 
a database with 5 tables containing user data.  Except one, all the other tables have 
only 2 fields.  This data is queried often and needs to be accessed by multiple web 
servers.  Each table would contain something like 500,000 to 1,000,000 records.  I'm 
using PHP to access the mysql database.  The system would be experiencing loads of 
5000 concurrent users.
 Tips on how to scale this database to handle such a load would be very helpful.  
The H/W is pretty good - 2 gigs of RAM and a dual CPU.

Tx.
Vinod.

_
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




Re: Re: max connections

2001-03-03 Thread vinod panicker

hey,
thanks for replying so soon.  the max limit of files and inodes have been 
increased on the system.  So that is not a problem.  But what i really meant to ask 
was if mysql scales well over 1000 connections (assuming that i'm not having any 
external problems like the OS for instance).

Tx.
Vinod

- Original Message --
"Jorge del Conde" <[EMAIL PROTECTED]> wrote:
To:<[EMAIL PROTECTED]>,
"vinod  panicker" <[EMAIL PROTECTED]>
From:"Jorge del Conde" <[EMAIL PROTECTED]>
Date:Sat, 3 Mar 2001 01:17:41 -0600
Subject: Re:  max connections

Hi,

The maximum number of connections that mysql can accept is restricted by
both:  the OS and ulimit.  In other words, you can set max_connections as
high as you want without bypassing the limits specified in ulimit.

If you do ulimit -n you should get the number of connections allowed (1024
by default I think) ..

Read section 21.3 in the manual for having several servers running on
different ports on the same machine.

Regards,
Jorge

MySQL Development Team
__  ___  __   __
   /  |/  /_ __/ __/ __ \/ /   Jorge del Conde <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\/ Mexico City, Mexico
<___/


- Original Message -
From: "vinod panicker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 1:09 PM
Subject: max connections


> hey,
> i'm developing a product that heavily utilizes mysql databases through
PHP.  The max number of connections that any server can handle is needed as
i have to think of scaleability issues.  The servers are pretty powerful -
it maxes out at 4G's 2x850 P-III.  I need max performance out of this box.
It will be accessed by multiple web servers.
> I also wanted to know if I can have 2 mysql servers on the same
machine accessing and serving data from the *same* database... also, at what
number of connections does mysql go for a toss?
>
> Tx.
> Vinod



_
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