Re[4]: RH 7.2 connections problems w 16 web servers to 2 MySQL servers

2002-03-28 Thread Peter Zaitsev

Hello Sam,

Thursday, March 28, 2002, 10:21:39 AM, you wrote:

SI The good solution for this would be to put OOPS behind of apache.

SI What is OOPS ?

The OOPS is squid-like PROXY application which mostly used as WEB
accelerator (server side proxy). The main idea of using it with
PHP/MYSQL is to decrease number of clients apache has (how many do you
have now ?) also this decreases number of needed mysql connections and
so number of MySQL threads.This happens because OOPS is able to
get result quite fast from the server, buffer it and then slowly push
it to dialup client, while the same apache process is able to process
other request.

SI Is it like SQL Relay ? Others have said that we should be using a 
SI connection pooler  that it's a PHP/Apache config problem that we're 
SI running into. We may also move to BSD from Redhat.

I think you're running into performance problem mostly. At least you
should look at VMSTAT output then this problem occures.

SI   P.S Are you using mysql binary or version compiled with patched GLIBC
SI   if not the threads limit should be the cause.

SI We had to use the patched glibc. We have over 1,000 connections 
SI supported now.

Well. That's what I have afraid of. Unfortunately the Linux has
troubles scheduling large number of threads, that's why trying to keep
the number of threads as small as possible is good. You can look at
the results I've posted to the conference a week or so ago, or do you
own once with fork_XXX.pl scripts coming with mysql distribution.

The solutions for this problem I have so far are:

- Trying to decrease number of running threads using OOPS as I
advised, decreasing timeout, limiting number of mysql_pconnect in PHP
config and so on. Also one of often errors about this is using objects
which connect to MySQL in PHP - remember they would open more
connection to mysql then not passed/returned by reference.
- Try to Speed up threads handling. You may use Ingo's sheduler
available for recent kernels or NGPT thread package. Therefore this
packages are not quite well tested with mysql yet.

SI - Sam.

SI On Monday, March 11, 2002, at 06:06 AM, Peter Zaitsev wrote:

 Hello Michael,

 Monday, March 11, 2002, 3:38:28 PM, you wrote:


 I had a close problem once -  then having many active connections (and
 so threads) mysql speed may degrade a lot because of scheduling and
 convergency problem. This does not explain the mysql lock itself, but
 may be the reason (i.e too many threads may make mysql to lock or
 crush because of GLIBC limits)
   The good solution for this would be to put OOPS behind of apache.
 This gives two positive issues:
   - your apache server will have much less children and so will require
   much less memory and will basically work faster. In my case the
   number of children have dropped from 150 to 16 and required memory
   from about 1G to 200M (I'm running very complicated PHP scripts)
   - you will need much less number of connections for mysql.  In my
   case the number have dropped from about 500 connections from web
   server to 50, and load average on mysql server fell from 3.0-4.0 to
   0.5-1.0.


 P.S Are you using mysql binary or version compiled with patched GLIBC
 if not the threads limit should be the cause.


 MW Hi!

 Sam We have a very high volume site (3 million page views a day) 
 that's run
 Sam on 16 Apache / PHP web servers  2 MySQL servers. We are using 
 PHP with
 Sam persistent connections. Each MySQL serves 8 web servers  is 
 supposed to
 Sam act as a failover machine for the other group of 8 web servers.
 Sam
 Sam The failover won't work now as if one MySQL goes down the cost of 
 the 8
 Sam web servers switching over is so high the other MySQL locks up.
 Sam
 Sam Each Apache / PHP server takes up hundreds of connections even 
 when
 Sam they're idle so we ran into the Linux connection limit of 1000  
 had to
 Sam recompile to get past that.
 Sam
 Sam Our actual MySQL CPU useage is low but the goes when with the 
 connection
 Sam overhead when starting up or failing over a bank of machines.
 Sam
 Sam We get a mysterious MySQL lockup once a week at the same day  
 time.

 MW Could you please describe the lookup, exactly what happens ?

 MW What does 'mysqladmin var ext' show when this happens?
 MW What do you have in your log files ?

 Sam Questions :
 Sam
 Sam - Is our configuration of 2 sets of 8 Apache/PHP web servers  1 
 MySQL
 Sam servers just not a good idea ?

 MW This should not be a problem.

 Sam - Would we better off with FreeBSD ?

 MW If you are running a CMP machine, then Linux preforms normally 
 better
 MW than FreeBSD.

 MW To be able to give some recommendations we need to know more about
 MW this setup.

 Sam - Is there anyone doing any similar setups with lots of web 
 servers  a
 Sam few MySQLs ?

 MW We have several hundred of paying support customers with this setup.

 Sam - Is there any way to get Apache / PHP to use fewer connections ?

 MW Stevens Rousseys exellent 

New Problem with LAMP

2002-03-28 Thread Dennis Peyerl


Hi there

The database is now running, i've created my tables and put the data 
inside. This is fine.
Next step is to create a PHP-Website which communicates with the 
database, but i am not able to connect over my apache (this is what it 
seems to me).

to log into the database I use
  mysql -p dkv
(password is ppp
user is dcp)

anything is ok.


my php-script looks like this:

?php
$host = localhost;
$user = dcp;
$pass = ppp;
$conex = mysql_connect($host, $user, $pass);
if($conex)
{
echo Connection established.br\n;
mysql_close();
}
else
{
echo No Connectionbr;
echo mysql_errno() . : . mysql_error . br;
}
?

If I put this into a file on  the server and access it with my browser, 
I get this error:

Warning:  Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (2) in /eshop/apache/share/htdocs/sql/ connect.php on 
line 5
Warning:  MySQL Connection Failed: Can't connect to local MySQL server 
through socket '/tmp/mysql.sock' (2)
 in /eshop/apache/ share/htdocs/sql/connect.php on line 5
No Connection
2002:mysql_error

What am I doing wrong? Could it be, that i don't have the necessary 
modules loaded into my apache? I am new to this, please be kind with me 
:-

Thanks in advance
dcp





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

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




Re: New Problem with LAMP

2002-03-28 Thread Me

Hi!

Check your my.cnf file for the line :

socket  = path to sock

Then change the path to /tmp/mysql.sock or create a symbolic link
/tmp/mysql.sock to the path that was inthere.

Restart mysql and that should get you going.

EG


 Hi there

 The database is now running, i've created my tables and put the data
 inside. This is fine.
 Next step is to create a PHP-Website which communicates with the
 database, but i am not able to connect over my apache (this is what it
 seems to me).

 to log into the database I use
   mysql -p dkv
 (password is ppp
 user is dcp)

 anything is ok.


 my php-script looks like this:

 ?php
 $host = localhost;
 $user = dcp;
 $pass = ppp;
 $conex = mysql_connect($host, $user, $pass);
 if($conex)
 {
 echo Connection established.br\n;
 mysql_close();
 }
 else
 {
 echo No Connectionbr;
 echo mysql_errno() . : . mysql_error . br;
 }
 ?

 If I put this into a file on  the server and access it with my browser,
 I get this error:

 Warning:  Can't connect to local MySQL server through socket
 '/tmp/mysql.sock' (2) in /eshop/apache/share/htdocs/sql/ connect.php on
 line 5
 Warning:  MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/tmp/mysql.sock' (2)
  in /eshop/apache/ share/htdocs/sql/connect.php on line 5
 No Connection
 2002:mysql_error

 What am I doing wrong? Could it be, that i don't have the necessary
 modules loaded into my apache? I am new to this, please be kind with me
 :-

 Thanks in advance
 dcp





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

 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: New Problem with LAMP (CORRECTION)

2002-03-28 Thread Me

Correction!

Look for the line socket in the [mysqld] section!

EG



Hi!

Check your my.cnf file for the line :

socket  = path to sock

Then change the path to /tmp/mysql.sock or create a symbolic link
/tmp/mysql.sock to the path that was inthere.

Restart mysql and that should get you going.

EG



- Original Message -
From: Dennis Peyerl [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 12:30 PM
Subject: New Problem with LAMP



 Hi there

 The database is now running, i've created my tables and put the data
 inside. This is fine.
 Next step is to create a PHP-Website which communicates with the
 database, but i am not able to connect over my apache (this is what it
 seems to me).

 to log into the database I use
   mysql -p dkv
 (password is ppp
 user is dcp)

 anything is ok.


 my php-script looks like this:

 ?php
 $host = localhost;
 $user = dcp;
 $pass = ppp;
 $conex = mysql_connect($host, $user, $pass);
 if($conex)
 {
 echo Connection established.br\n;
 mysql_close();
 }
 else
 {
 echo No Connectionbr;
 echo mysql_errno() . : . mysql_error . br;
 }
 ?

 If I put this into a file on  the server and access it with my browser,
 I get this error:

 Warning:  Can't connect to local MySQL server through socket
 '/tmp/mysql.sock' (2) in /eshop/apache/share/htdocs/sql/ connect.php on
 line 5
 Warning:  MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/tmp/mysql.sock' (2)
  in /eshop/apache/ share/htdocs/sql/connect.php on line 5
 No Connection
 2002:mysql_error

 What am I doing wrong? Could it be, that i don't have the necessary
 modules loaded into my apache? I am new to this, please be kind with me
 :-

 Thanks in advance
 dcp





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

 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: To run MySQL Server from the remote machine

2002-03-28 Thread Roger Baklund

* Chetan Lavti
  Is it possible to run the MySQL Server from the remote machine..??
  Mysql provides a Api's for shutting down the server from the remote
  place i.e. ( mysql_shutdown(mysqlhadler))
  but I can't see any api for starting the Mysql server from the remote
  machine.

The client needs to connect to the server _before_ it can send any commands
to it... thus the server must be running before the client can send any
commands, and a 'start server' command does not make any sense.

  Does it mean that every time when I have to run the server it will be
  done manually...

The server can be started manually or automatically. If it is not started
automatically, you will have to start it manually before you can use it,
yes... (not sure if I understand your question...)

--
Roger


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

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




does one need to add the taglib element ( tld file)

2002-03-28 Thread Chuck Amadi

Hi can someone confirm that one does not need to create a tld file ie 
tag lib descripter and deploy to my META-INF subdirectory of my root 
application. Also does one need to add the taglib element to my web.xml 
file and a jsp page directive.

The reason is i didn't require any of these procedures when i made my 
connection utilising DBTags  to my PostgrSql Database.

I can't recall needing to do the above as all i need to do was was make 
a connection as below :
Im aware this is fairly unsecure method.

sql:connection id=conn1
  sql:urljdbc:postgresql://***.**.*.**/test1/sql:url
  sql:driverorg.postgresql.Driver/sql:driver
  sql:userIdchucka/sql:userId
  sql:password/sql:password
/sql:connection

Plz advice as im sure i just have to deploy mm.gjt.mysql-2.0.4-bin.jar 
to my webapps/volunteers/WEB-INF/lib dir path.
note i have tried numerous ways to get this thing going thus it must be 
my development server playing up again .

Cheers Chuck Amadi
Systems Programmer



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

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




Re: New Problem with LAMP (CORRECTION)

2002-03-28 Thread Dennis Peyerl

Thank you very much
it workes now.


Could you tell me, how come, that the search-path points to /tmp/mysql.sock?
I've just created a link, but isn't it possibly to change the apache of 
trying to connect to /tmp/mysql.sock?

thnax
dcp

Me wrote:

Correction!

Look for the line socket in the [mysqld] section!

EG



Hi!

Check your my.cnf file for the line :

socket  = path to sock

Then change the path to /tmp/mysql.sock or create a symbolic link
/tmp/mysql.sock to the path that was inthere.

Restart mysql and that should get you going.

EG




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

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




problem with a server

2002-03-28 Thread magramunt

Hi!
I was running an application that connected to a MySql server on the same
computer (workstation W2K). There was no problem.
However, I've tried to install the same system (application and MySql
server) on a Windows server, and the application fails to connect to the
server.
With the workstation, the user that connected to the server was:
username@localhost, or username@pc_name
Actually, in the server, I receive the message that: user
username@server_domain_name is not a valid user for the server.
Do you know how to solve the problem? Do you know how to give rights to
this user?
Thank you very much!

marc


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

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




does one need to add the taglib element ( tld file)

2002-03-28 Thread Chuck Amadi

Hi can someone confirm that one does not need to create a tld file ie 
tag lib descripter and deploy to my META-INF subdirectory of my root 
application. Also does one need to add the taglib element to my web.xml 
file and a jsp page directive.

The reason is i didn't require any of these procedures when i made my 
connection utilising DBTags  to my PostgrSql Database.

I can't recall needing to do the above as all i need to do was was make 
a connection as below :
Im aware this is fairly unsecure method.

sql:connection id=conn1
  sql:urljdbc:postgresql://***.**.*.**/test1/sql:url
  sql:driverorg.postgresql.Driver/sql:driver
  sql:userIdchucka/sql:userId
  sql:password/sql:password
/sql:connection

Plz advice as im sure i just have to deploy mm.gjt.mysql-2.0.4-bin.jar 
to my webapps/volunteers/WEB-INF/lib dir path.
note i have tried numerous ways to get this thing going thus it must be 
my development server playing up again .

Cheers Chuck Amadi
Systems Programmer



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

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




Re: how to check if table exists?

2002-03-28 Thread Don Read


On 27-Mar-2002 Ken Anderson wrote:
 
 
 
 
  
  What is the fastest way to check if a table exists?
  Do a select and catch the error?
  Try to create the table, and catch the error?
  Other options?
  Thanks,
  Ken

Yes, in php:

function tableexists($tbl) {
$res = @mysql_query( SELECT count(*) FROM $tbl);
return ($res ? true : false);
}


Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)

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

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




Re: New Problem with LAMP (CORRECTION)

2002-03-28 Thread Me

Hi!

I'm not very used to php but its in php.ini :

mysql.default_socket


EG



- Original Message -
From: Dennis Peyerl [EMAIL PROTECTED]
To: Me [EMAIL PROTECTED]
Cc: mysql [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 1:00 PM
Subject: Re: New Problem with LAMP (CORRECTION)


 Thank you very much
 it workes now.


 Could you tell me, how come, that the search-path points to
/tmp/mysql.sock?
 I've just created a link, but isn't it possibly to change the apache of
 trying to connect to /tmp/mysql.sock?

 thnax
 dcp

 Me wrote:

 Correction!
 
 Look for the line socket in the [mysqld] section!
 
 EG
 
 
 
 Hi!
 
 Check your my.cnf file for the line :
 
 socket  = path to sock
 
 Then change the path to /tmp/mysql.sock or create a symbolic link
 /tmp/mysql.sock to the path that was inthere.
 
 Restart mysql and that should get you going.
 
 EG
 



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

 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




Unicode problem

2002-03-28 Thread Victoria Reznichenko

thien,
Thursday, March 28, 2002, 11:05:27 PM, you wrote:

t I am a developer of My SQL, and I am developing an application use unicode
t so I would like to ask you which version that support Unicode and where can
t I get it.
t Now I am using My SQL version 3.23.49
t thanks alots

MySQL doesn't currently supports unicode. 
It will come in version 4.1. You can read 
about MySQL future plans at:
http://www.mysql.com/doc/T/O/TODO_MySQL_4.1.html





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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

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




newbie installing MySQL/InnoDB on RH 7.1

2002-03-28 Thread Egor Egorov

Voytek,
Thursday, March 28, 2002, 6:54:13 PM, you wrote:

VE I've installed RedHat7.1 off RH7.1 CDs, also, installed MySQL that came with
VE it,
VE the installed MySQL did NOT have InnoDB support;
VE I then d/l off mysql.com

VE MySQL-Max-3.23.49a-1.i386.rpm
VE I installed it using:
VE rpm --install MySQL-Max-3.23.49a-1.i386.rpm

VE (I think that's how it's meant to be installed, I'm a newbie)
VE howver, on restart. the 'original CD revison' started, NOT, MAX

VE then, i tried starting MySQL-Max by explicitly calling it, it said:
VE 'you have wrong error files'

VE SO:

VE using webmin, I removed all mysql packages;
VE then, using webmin, installed MySQL-Max-3.23.49a-1.i386.rpm

VE now it tell me, the MySQL-Max-3.23.49a is only an extension:

VE 
VE Optional MySQL server binary that supports features
VE  like transactional tables. To active this binary, just install 
this
VE  package after the MySQL package.
VE -

VE but, reading on mysql download page, implies, MySQL-Max-3.23.49a-1.i386.rpm
VE is all I need...

VE help
VE so, at this time:
VE accoriding to webmin I have:

VE Packages matching mysql

VE Package Class Description
VE MySQL-Max 3.23.49a-1 Applications/Databases MySQL - server with Berkeley DB
VE and Innodb support 

You must first install original MySQL (rpm) package and then you can
install MySQK-max RPM. You can read about mysqld-max at:
  http://www.mysql.com/doc/m/y/mysqld-max.html

If you want to use InnoDB tables you should specify InnoDB startup
options in my.cnf file, take a look at:
  http://www.mysql.com/doc/I/n/InnoDB_start.html
You can find info about configuration parametrs and example if you
check this link.





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



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

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




sql

2002-03-28 Thread Harry Rorarius

I am a new comer to the sql world.  I have some but brief knowledge of perl.
here goes!

I am using mysql on a Winnt platform and I have perl 5 installed on it.  I
did setup dbi in perl and I know that mod is working.  I have been trying to
get one of the scripts that came with the copy of mysql
(mysql_setpermissions.pl) to work.  I have it in my cgi-bin (the only place
I execute perl scripts.  When I run this script it does nothing it just
hangs until the cgi times out.

Most of the things I have read about in all the documentation and even this
mail help is reared for the Unix/Linux users.  I have tried to get a linux
server to work but that is a different issue.

anyways I must be missing some clues to get mysql to talk to my scripts and
to my web browser. Is there anyone out there with Winnt to mysql experience

HELP


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

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




Database Design Question

2002-03-28 Thread mysql

Hi all,

I am in the process of designing a MySQL database that will run on Redhat
7.1, but I am fairly sketchy on MySQL and performance.

What I want to do is have a database that keeps track of large distribution
lists. Each list has a unique ID, an owner (which is a reference to an ID in
another table) and a creation date.

My question is this: Would it be more efficient to have each entry in the
list stored in this table in the database, or would I be better off having a
reference to a file that is stored on the hard disk?

Users must be able to view, add, modify and delete entire lists and single
entries in the lists.

I am using MySQL, PHP and Perl with an Apache Webserver.

Cheers,

Ben


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

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




Re: newbie installing MySQL/InnoDB on RH 7.1

2002-03-28 Thread voytek

On Thu, 28 Mar 2002 14:46:01 +0200, Egor Egorov wrote:

You must first install original MySQL (rpm) package and then you can
install MySQK-max RPM. You can read about mysqld-max at:
  http://www.mysql.com/doc/m/y/mysqld-max.html

If you want to use InnoDB tables you should specify InnoDB startup
options in my.cnf file, take a look at:
  http://www.mysql.com/doc/I/n/InnoDB_start.html
You can find info about configuration parametrs and example if you
check this link.

Egor, thanks !

I obviously misunderstood mysql.com's pages at:


Downloads for the Max 3.23 version
http://www.mysql.com/downloads/mysql-max-3.23.html

MySQL has during the years grown to be a quite big and capable SQL server with a lot 
of useful extensions that can be 
enabled at compile time. As not all users will have use for all extensions, we have 
solved this by providing two different 
MySQL binaries. 

The standard MySQL 3.23 binary that is optimized for raw speed and without 
transactions. 
The MySQL-Max 3.23 binary which includes support for the most requested features, like 
support for Berkeley DB (BDB) 
and/or InnoDB tables. 


I took it as 'it's a stand alone, no need for non-max'

thanks for the help, I'll try again,

as I'm rather new to rpm thing, can you pls tell me:

if I installed RedHat7.1, and, MySQL that came with RH CD;

them I download latest MySQL rpm file:

am I supposed to:
rpm -UPGRADE OPTION rpm file;
or 
rpm -INSTALL OPTION rpm file

?

also, after I install MySQL 3.23 binary rpm, followed by MySQLMAX 3.23 binary rpm, 
and, edit the my.cnf as you note:

do I end up with two MySQLd ? so, I can run either max, or, not max ?

does these rpms include mysql client, or what do I need to d/l ?

(doing the RH install, it has separate option for client, and mysqld, hence, I'm 
asking)




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

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




Problem with index, where clause and order by

2002-03-28 Thread Michael Bonfert

Hi,

assume a table as follows:

CREATE TABLE Posts (
   Board varchar(100) NOT NULL,
   Number int(11) unsigned NOT NULL auto_increment,
   Posted int(11) unsigned DEFAULT '0' NOT NULL,
   Subject text,
   Body text,

   PRIMARY KEY (Number),
   KEY index1 (Number, Board),
   KEY index2 (Board),
   KEY index3 (Posted, Board),
   KEY index4 (Board, Number)
);

and followind  SQL statement:
SELECT * FROM  Posts WHERE Board  = 'board1'  ORDER BY Board DESC, Number
DESC

according to the manual
http://www.mysql.com/doc/O/R/ORDER_BY_optimisation.html
= SELECT * FROM t1 WHERE key_part1=1 ORDER BY key_part1 DESC,key_part2
DESC

the statement should use index4, instead index2 is used.
The usage of 'limit'  or deleting index2 does not effect the index usage.

Surprisingly the statement
SELECT * FROM  Posts WHERE Board   'board1'  ORDER BY Board DESC, Number
DESC
uses index4.



Why isn't index4 used in  the  first  SQL statement.
How can I transform the statement that index4 will be used.


Thanks

Michael




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

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




Fw: sql

2002-03-28 Thread Harry Rorarius


- Original Message -
From: Harry Rorarius [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 7:46 AM
Subject: sql


 I am a new comer to the sql world.  I have some but brief knowledge of
perl.
 here goes!

 I am using mysql on a Winnt platform and I have perl 5 installed on it.  I
 did setup dbi in perl and I know that mod is working.  I have been trying
to
 get one of the scripts that came with the copy of mysql
 (mysql_setpermissions.pl) to work.  I have it in my cgi-bin (the only
place
 I execute perl scripts.  When I run this script it does nothing it just
 hangs until the cgi times out.

 Most of the things I have read about in all the documentation and even
this
 mail help is reared for the Unix/Linux users.  I have tried to get a linux
 server to work but that is a different issue.

 anyways I must be missing some clues to get mysql to talk to my scripts
and
 to my web browser. Is there anyone out there with Winnt to mysql
experience

 HELP

I have been working with this script (mysql_setpermissions.pl) for a while
and I chanded the path for my.cnf because in Winnt Mysql uses my.ini and
that is used for the admin program.  Mysql does not automaticly use my.cnf,
so I set the path.  The error I get know is:
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:


syntax error at F:\web\cgi-bin\mysql_setpermission.pl line 71, near
exit(0); # the end.
  (Might be a runaway multi-line .. string starting on line 67)
Can't use global $_ in my at F:\web\cgi-bin\mysql_setpermission.pl line
102, near = $_
syntax error at F:\web\cgi-bin\mysql_setpermission.pl line 118, near }
Execution of F:\web\cgi-bin\mysql_setpermission.pl aborted due to
compilation errors.

This is the script:

#!/perl/bin
## Emacs, this is -*- perl -*- mode? :-)
##
##Permission setter for MySQL
##
##mady by Luuk de Boer ([EMAIL PROTECTED]) 1998.
##it's made under GPL ...:-))
##
##

## History
##
## 1.0 first start of the program
## 1.1 some changes from monty and after that
## initial release in mysql 3.22.10 (nov 1998)
## 1.2 begin screen now in a loop + quit is using 0 instead of 9
## after ideas of Paul DuBois.
## 1.2a Add Grant, References, Index and Alter privilege handling (Monty)

 TODO
#
# empty ... suggestions ... mail them to me ...


$version=1.2;

use DBI;
use Getopt::Long;
use strict;
use vars qw($dbh $hostname $opt_user $opt_password $opt_help $opt_host
 $opt_socket $opt_port $host $version);


$dbh=$host=$opt_user= $opt_password= $opt_help= $opt_host= $opt_socket= ;
$opt_port=0;

#read_my_cnf();  # Read options from ~/.my.cnf
read_c:/mysql/my.cnf;

GetOptions(user=s,password=s,help,host=s,socket=s,port=i);

usage() if ($opt_help); # the help function

if ($opt_host eq '')
{
  $hostname = localhost;
}
else
{
  $hostname = $opt_host;
}

# ask for a password if no password is set already
if ($opt_password eq '')
{
  system stty -echo;
  print Password for user $opt_user to connect to MySQL: ;
  $opt_password = STDIN;
  chomp($opt_password);
  system stty echo;
  print \n;
}


# make the connection to MySQL
$dbh=
DBI-connect(DBI:mysql:mysql:host=$hostname:port=$opt_port:mysql_socket=$op
t_socket,$opt_user,$opt_password, {PrintError = 0}) ||
  die(Can't make a connection to the mysql server.\n The error:
$DBI::errstr);

# the start of the program
q1();
exit(0); # the end...

#
# below all subroutines of the program
#

###
# the beginning of the program
###
sub q1 { # first question ...
  my ($answer,$end);
  while (! $end) {
print #x70;
print \n;
print ## Welcome to the permission setter $version for MySQL.\n;
print ## made by Luuk de Boer\n;
print #x70;
print \n;
print What would you like to do:\n;
print   1. Set password for a user.\n;
print   2. Add a database + user privilege for that database.\n;
print  - user can do all except all admin functions\n;
print   3. Add user privilege for an existing database.\n;
print  - user can do all except all admin functions\n;
print   4. Add user privilege for an existing database.\n;
print  - user can do all except all admin functions + no
create/drop\n;
print   5. Add user privilege for an existing database.\n;
print  - user can do only selects (no update/delete/insert
etc.)\n;
print   0. exit this program\n;
print \nMake your choice [1,2,3,4,5,0]: ;
while (STDIN) {
  $answer = $_;
  chomp($answer);
  if ($answer =~ /1|2|3|4|5|0/) {
setpwd if ($answer == 1);
addall($answer) if ($answer =~ /^[2345]$/);
if ($answer == 0) {
  print Sorry, hope we can help you next time \n\n;
  $end = 1;
}
  } else {
print Your answer was $answer\n;
print and that's wrong  Try again\n;
  }
  last;
}
  

Re: newbie installing MySQL/InnoDB on RH 7.1

2002-03-28 Thread Curtis Maurand


rpm -e the mysql product from the CD's to uninstall the originals.

then rpm  -ivh MySQL-Max-3.23.49a-1.i386.rpm to install the mysql-max
product and you're golden.

Curtis

Voytek Eymont said:
 I need some newbie help...

 I've installed RedHat7.1 off RH7.1 CDs, also, installed MySQL that came
 with it,

 the installed MySQL did NOT have InnoDB support;

 I then d/l off mysql.com

 MySQL-Max-3.23.49a-1.i386.rpm

 I installed it using:

 rpm --install MySQL-Max-3.23.49a-1.i386.rpm

 (I think that's how it's meant to be installed, I'm a newbie)

 howver, on restart. the 'original CD revison' started, NOT, MAX

 then, i tried starting MySQL-Max by explicitly calling it, it said:

 'you have wrong error files'

 SO:

 using webmin, I removed all mysql packages;
 then, using webmin, installed MySQL-Max-3.23.49a-1.i386.rpm

 now it tell me, the MySQL-Max-3.23.49a is only an extension:

 
 Optional MySQL server binary that supports features
 like transactional tables. To active this binary, just
 install this package after the MySQL package.
 -

 but, reading on mysql download page, implies,
 MySQL-Max-3.23.49a-1.i386.rpm is all I need...

 help

 so, at this time:

 accoriding to webmin I have:

 Packages matching mysql

 Package Class Description
 MySQL-Max 3.23.49a-1 Applications/Databases MySQL - server with
 Berkeley DB and Innodb support

 perl-DBD-MySQL 1.2215-1  Applications/CPAN A MySQL interface for perl

 php-mysql 4.0.4pl1-9 Development/Languages A module for PHP
 applications that use MySQL databases.

 --

 webmin says:

 MySQL Database Server
 The MySQL admin program /usr/bin/mysqladmin was not found on your
 system. Maybe MySQL is not installed, or your module configuration is
 incorrect.


 can this MySQL run as a server ?
 where is a client

 [root@charly /]# /etc/rc.d/init.d/mysqld start
 bash: /etc/rc.d/init.d/mysqld: No such file or directory
 [root@charly /]#



 clueless,




 Voytek Eymont
 http://www.sbt.net.au/links/


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

 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




Fw: sql

2002-03-28 Thread Harry Rorarius


- Original Message -
From: Harry Rorarius [EMAIL PROTECTED]
To: Mysql list [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 9:18 AM
Subject: Fw: sql



 - Original Message -
 From: Harry Rorarius [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 28, 2002 7:46 AM
 Subject: sql


  I am a new comer to the sql world.  I have some but brief knowledge of
 perl.
  here goes!
 
  I am using mysql on a Winnt platform and I have perl 5 installed on it.
I
  did setup dbi in perl and I know that mod is working.  I have been
trying
 to
  get one of the scripts that came with the copy of mysql
  (mysql_setpermissions.pl) to work.  I have it in my cgi-bin (the only
 place
  I execute perl scripts.  When I run this script it does nothing it just
  hangs until the cgi times out.
 
  Most of the things I have read about in all the documentation and even
 this
  mail help is reared for the Unix/Linux users.  I have tried to get a
linux
  server to work but that is a different issue.
 
  anyways I must be missing some clues to get mysql to talk to my scripts
 and
  to my web browser. Is there anyone out there with Winnt to mysql
 experience
 
  HELP
 
 I have been working with this script (mysql_setpermissions.pl) for a while
 and I chanded the path for my.cnf because in Winnt Mysql uses my.ini and
 that is used for the admin program.  Mysql does not automaticly use
my.cnf,
 so I set the path.  The error I get know is:
 The specified CGI application misbehaved by not returning a complete set
of
 HTTP headers. The headers it did return are:


 syntax error at F:\web\cgi-bin\mysql_setpermission.pl line 71, near
 exit(0); # the end.
   (Might be a runaway multi-line .. string starting on line 67)
 Can't use global $_ in my at F:\web\cgi-bin\mysql_setpermission.pl line
 102, near = $_
 syntax error at F:\web\cgi-bin\mysql_setpermission.pl line 118, near }
 Execution of F:\web\cgi-bin\mysql_setpermission.pl aborted due to
 compilation errors.

 This is the script:

 #!/perl/bin
 ## Emacs, this is -*- perl -*- mode? :-)
 ##
 ##Permission setter for MySQL
 ##
 ##mady by Luuk de Boer ([EMAIL PROTECTED]) 1998.
 ##it's made under GPL ...:-))
 ##
 ##


 ## History
 ##
 ## 1.0 first start of the program
 ## 1.1 some changes from monty and after that
 ## initial release in mysql 3.22.10 (nov 1998)
 ## 1.2 begin screen now in a loop + quit is using 0 instead of 9
 ## after ideas of Paul DuBois.
 ## 1.2a Add Grant, References, Index and Alter privilege handling (Monty)

  TODO
 #
 # empty ... suggestions ... mail them to me ...


 $version=1.2;

 use DBI;
 use Getopt::Long;
 use strict;
 use vars qw($dbh $hostname $opt_user $opt_password $opt_help $opt_host
  $opt_socket $opt_port $host $version);


 $dbh=$host=$opt_user= $opt_password= $opt_help= $opt_host= $opt_socket=
;
 $opt_port=0;

 #read_my_cnf();  # Read options from ~/.my.cnf
 read_c:/mysql/my.cnf;

 GetOptions(user=s,password=s,help,host=s,socket=s,port=i);

 usage() if ($opt_help); # the help function

 if ($opt_host eq '')
 {
   $hostname = localhost;
 }
 else
 {
   $hostname = $opt_host;
 }

 # ask for a password if no password is set already
 if ($opt_password eq '')
 {
   system stty -echo;
   print Password for user $opt_user to connect to MySQL: ;
   $opt_password = STDIN;
   chomp($opt_password);
   system stty echo;
   print \n;
 }


 # make the connection to MySQL
 $dbh=

DBI-connect(DBI:mysql:mysql:host=$hostname:port=$opt_port:mysql_socket=$op
 t_socket,$opt_user,$opt_password, {PrintError = 0}) ||
   die(Can't make a connection to the mysql server.\n The error:
 $DBI::errstr);

 # the start of the program
 q1();
 exit(0); # the end...

 #
 # below all subroutines of the program
 #

 ###
 # the beginning of the program
 ###
 sub q1 { # first question ...
   my ($answer,$end);
   while (! $end) {
 print #x70;
 print \n;
 print ## Welcome to the permission setter $version for MySQL.\n;
 print ## made by Luuk de Boer\n;
 print #x70;
 print \n;
 print What would you like to do:\n;
 print   1. Set password for a user.\n;
 print   2. Add a database + user privilege for that database.\n;
 print  - user can do all except all admin functions\n;
 print   3. Add user privilege for an existing database.\n;
 print  - user can do all except all admin functions\n;
 print   4. Add user privilege for an existing database.\n;
 print  - user can do all except all admin functions + no
 create/drop\n;
 print   5. Add user privilege for an existing database.\n;
 print  - user can do only selects (no update/delete/insert
 etc.)\n;
 print   0. exit this program\n;
 print \nMake your choice [1,2,3,4,5,0]: ;
 while (STDIN) {
   $answer = $_;
   chomp($answer);
   if ($answer =~ /1|2|3|4|5|0/) {
 setpwd if ($answer == 1);
 

Re: Database Design Question

2002-03-28 Thread Chris Adams

On 3/28/02 1:39 PM [EMAIL PROTECTED] wrote:

 
 What I want to do is have a database that keeps track of large distribution
 lists. Each list has a unique ID, an owner (which is a reference to an ID in
 another table) and a creation date.
 
 My question is this: Would it be more efficient to have each entry in the
 list stored in this table in the database, or would I be better off having a
 reference to a file that is stored on the hard disk?
 
 Users must be able to view, add, modify and delete entire lists and single
 entries in the lists.
 


I would recommend:

A table of lists (one row for each list with owner, ID and creation Date
(add modification date?))

A table of list entries (one row for each entry)
A third table linking the list to list entry.

You may have to parse the lists at first to separate the list entries but
this method maintains a lot of flexibility:

To delete an entire list remove the row from the lists table.  This would
allow you to maintain the list entries separately or you could also use a
DELETE FROM linkingTable WHERE listID=$whatever.



Deleting individual records would involve a single row in the list entry
table and a DELETE FROM linkingTable WHERE listEntryID=$whatever.

You probably would not have to sacrifice speed for flexibility: in small
tables (200 records with an index) this type of operation  takes less than
.001 of a second on my (shared) server.

Hope this helps!

Chris


-- 
Chris Adams  
Cypress Lake Studios
Hypermedia, Quicktime, and Internet Design
http://www.cypresslakestudios.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




RE: Problem with index, where clause and order by

2002-03-28 Thread Michael C. Neel

You can try to force an index with:

SELECT * FROM  Posts USE INDEX(index4) WHERE Board  = 'board1'  ORDER BY
Board DESC, Number DESC


Mike

-Original Message-
From: Michael Bonfert [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 28, 2002 9:06 AM
To: [EMAIL PROTECTED]
Subject: Problem with index, where clause and order by


Hi,

assume a table as follows:

CREATE TABLE Posts (
   Board varchar(100) NOT NULL,
   Number int(11) unsigned NOT NULL auto_increment,
   Posted int(11) unsigned DEFAULT '0' NOT NULL,
   Subject text,
   Body text,

   PRIMARY KEY (Number),
   KEY index1 (Number, Board),
   KEY index2 (Board),
   KEY index3 (Posted, Board),
   KEY index4 (Board, Number)
);

and followind  SQL statement:
SELECT * FROM  Posts WHERE Board  = 'board1'  ORDER BY Board DESC,
Number DESC

according to the manual
http://www.mysql.com/doc/O/R/ORDER_BY_optimisation.html
= SELECT * FROM t1 WHERE key_part1=1 ORDER BY key_part1 DESC,key_part2
DESC

the statement should use index4, instead index2 is used.
The usage of 'limit'  or deleting index2 does not effect the index
usage.

Surprisingly the statement
SELECT * FROM  Posts WHERE Board   'board1'  ORDER BY Board DESC,
Number DESC uses index4.



Why isn't index4 used in  the  first  SQL statement.
How can I transform the statement that index4 will be used.


Thanks

Michael




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

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




Problem with index, where clause and order by

2002-03-28 Thread Michael Bonfert

Hi,

assume a table as follows:

CREATE TABLE Posts (
   Board varchar(100) NOT NULL,
   Number int(11) unsigned NOT NULL auto_increment,
   Posted int(11) unsigned DEFAULT '0' NOT NULL,
   Subject text,
   Body text,

   PRIMARY KEY (Number),
   KEY index1 (Number, Board),
   KEY index2 (Board),
   KEY index3 (Posted, Board),
   KEY index4 (Board, Number)
);

and followind  SQL statement:
SELECT * FROM  Posts WHERE Board  = 'board1'  ORDER BY Board DESC, Number
DESC

according to the manual
http://www.mysql.com/doc/O/R/ORDER_BY_optimisation.html
= SELECT * FROM t1 WHERE key_part1=1 ORDER BY key_part1 DESC,key_part2
DESC

the statement should use index4, instead index2 is used.
The usage of 'limit'  or deleting index2 does not effect the index usage.

Surprisingly the statement
SELECT * FROM  Posts WHERE Board   'board1'  ORDER BY Board DESC, Number
DESC
uses index4.



Why isn't index4 used in  the  first  SQL statement.
How can I transform the statement that index4 will be used.


Thanks

Michael



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

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




RE: Database Design Question

2002-03-28 Thread Nick Arnett



 -Original Message-
 From: Ben Holness [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]

...

 My question is this: Would it be more efficient to have each entry in the
 list stored in this table in the database, or would I be better
 off having a
 reference to a file that is stored on the hard disk?

If you mean efficient in terms of performance, the answer depends on how big
the data is that would go in the files v. a database record, and how often
they'll be accessed.  If you mean more efficient in terms of disk space,
there's probably little difference if the files are large, but a big
difference if there are lots of little ones.  How much difference for the
latter depends on what file system you're using.

In any event, you'll probably have to experiment.  If you're talking about a
lot of relatively small files, putting the data into database fields will
probably win.

Nick


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

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




Re: Database Design Question

2002-03-28 Thread Scalper

Hi Ben:

Performance would definitely be better if you store the data in the 
database as opposed to simply storing references to files.  Sounds like you 
could solve this with 2 tables with one for the actual lists (assuming the 
structure of all your list is the same) and the other for the list header 
info (like owner and creation date).

Craig

At 07:39 AM 3/28/2002, you wrote:
Hi all,

I am in the process of designing a MySQL database that will run on Redhat
7.1, but I am fairly sketchy on MySQL and performance.

What I want to do is have a database that keeps track of large distribution
lists. Each list has a unique ID, an owner (which is a reference to an ID in
another table) and a creation date.

My question is this: Would it be more efficient to have each entry in the
list stored in this table in the database, or would I be better off having a
reference to a file that is stored on the hard disk?

Users must be able to view, add, modify and delete entire lists and single
entries in the lists.

I am using MySQL, PHP and Perl with an Apache Webserver.

Cheers,

Ben


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

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




deleting logfiles

2002-03-28 Thread Victoria Reznichenko

J,
Wednesday, March 27, 2002, 4:46:08 PM, you wrote:

JvDBKA I'm running RH Linux 7.0,and Mysql  Version: 3.23.22-beta, and the
JvDBKA mysqld.log grows very rapidly.
JvDBKA Is there a way to turn it off ?
JvDBKA Logrotation is not really an option in this case, the only
JvDBKA possibilities are not logging or delete it every day.
JvDBKA Any hints ?

What about moving your mysql.log to mysql.old and then execute
mysqladmin flush-logs?
Look at:
 http://www.mysql.com/doc/L/o/Log_file_maintenance.html

JvDBKA JvD,Netherlands




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




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

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




Select data from local database into another host over

2002-03-28 Thread Egor Egorov

erich,
Wednesday, March 27, 2002, 5:22:00 PM, you wrote:

e Does anybody have an idea how to select data from a local database into another
e host server ?

e For information, I'm currently using mySQL 3.23.

mysqldump?
You can read about mysqldump utility at:
http://www.mysql.com/doc/m/y/mysqldump.html

e Eric Huwaert





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



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

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




Re: newbie installing MySQL/InnoDB on RH 7.1

2002-03-28 Thread Egor Egorov

voytek,
Thursday, March 28, 2002, 3:45:48 PM, you wrote:

You must first install original MySQL (rpm) package and then you can
install MySQK-max RPM. You can read about mysqld-max at:
  http://www.mysql.com/doc/m/y/mysqld-max.html

If you want to use InnoDB tables you should specify InnoDB startup
options in my.cnf file, take a look at:
  http://www.mysql.com/doc/I/n/InnoDB_start.html
You can find info about configuration parametrs and example if you
check this link.

v Egor, thanks !


v as I'm rather new to rpm thing, can you pls tell me:
v if I installed RedHat7.1, and, MySQL that came with RH CD;
v them I download latest MySQL rpm file:

v am I supposed to:
v rpm -UPGRADE OPTION rpm file;
v or 
v rpm -INSTALL OPTION rpm file
v ?

It would be better if you download MySQL (rpm) and MySQL-max (rpm)
from the MySQL site and install them by using:
 rpm --install rpm_package_name

v also, after I install MySQL 3.23 binary rpm, followed by MySQLMAX 3.23 binary rpm, 
and, edit the my.cnf as you note:
v do I end up with two MySQLd ? so, I can run either max, or, not max ?

You can run mysqld-max or safe_mysqld script. safe_mysqld will try to start any mysqld 
with the -max prefix.
If you want to check InnoDB support you should run the following command:
   SHOW VARIABLES LIKE 'have_%';
The value for 'have_innodb' must be 'YES'.

v does these rpms include mysql client, or what do I need to d/l ?
v (doing the RH install, it has separate option for client, and mysqld, hence, I'm 
asking)

No, you should install client rpm package.







-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



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

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




synopsis of the problem (one line)

2002-03-28 Thread root

Description:

How-To-Repeat:

Fix:


Submitter-Id:  submitter ID
Originator:root
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.49a (Official MySQL Binary)

Environment:

System: Linux MMSPortal 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 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-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-98)
Compilation info: CC='gcc'  CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro 
-O3 -fno-omit-frame-pointer'  CXX='gcc'  CXXFLAGS='-Wimplicit -Wreturn-type 
-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat 
-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings 
-Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy 
-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 
-fno-omit-frame-pointer'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Jan  1  2000 /lib/libc.so.6 - libc-2.2.4.so
-rwxr-xr-x1 root root  1282588 Sep  4  2001 /lib/libc-2.2.4.so
-rw-r--r--1 root root 27304836 Sep  4  2001 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep  4  2001 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client 
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static 
--with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' 
--prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client 
--enable-local-infile 'CFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro 
-O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpr!
o -O3 -fno-omit-frame-pointer' CXX=gcc
















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

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




Capacité Mysql

2002-03-28 Thread Tony Jarriault

Bonjour,

J'utilise Mysql 3.23... sous un environnement Solaris 7. La taille de la 
base de donnée est de 1Go 5.
Quelles sont les limites pour le bon fonctionnment de mysql ?
Existe il un moyen plus rapide de faire des copies de bases que le dump ?

Merci

Cordialement,

Tony Jarriault

---
Service webmaster : mailto:[EMAIL PROTECTED]
Tel : 01-34-49-06-69
MGN : http://www.mgn.fr
---

Tony Jarriault
mailto:[EMAIL PROTECTED]
Tel : 01-34-49-06-43
MATRA GLOBAL NETSERVICES
Societé du groupe PROSODIE
8, rue Grange Dame Rose
78140 Vélizy


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

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: Adding an index to a table

2002-03-28 Thread James Riordon

At 15:07 +0800 03/28/2002, Sammy Lau was thought to have said :

?http://www.mysql.com/doc/C/R/CREATE_INDEX.html

Granted, I should have looked before I spoke for the first question.

   2 - Do I have to do anything special like stop requests to the
  server while I add the index.
   3 - How safe is this to do?

I do not see the answer for #2 and #3 in the recommended reading. Can 
anyone comment on those questions, or should I just backup and dive 
on in?

Many thanks.

James

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

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




sql where exists

2002-03-28 Thread Ben Edwards

having problems working out sql where exists syntax.


Tried 
  select * 
  from   sections s 
  where  exists ( 
select 0 
from   pages s 
where s.page = p.page
)


Any ideas,
Ben
--
[EMAIL PROTECTED]+44 (0)7970 269 522
http://www.subvertise.org   -- Altering the Corporate Image
http://www.criticaldistribution.org -- Buy Alternative Video Online
http://www.videonetwork.org -- Community/Radical Video
http://www.spamcop.net/ -- Killing SPAM feels good!

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

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: Capacité Mysql

2002-03-28 Thread David yahoo

Here we speak english.
Ici on parle anglais.

Tu peut copier les fichiers binaires des tables de mysql (*.MYD *.MYI *.frm)
dans le DATADIR
ex : linux /var/lib/mysql 
par contre il doit y avoir
des problemes avec l intégrité des données.

Je te conseil de lire la doc de mysql en francais ss nexen.net.

a+



Bonjour,

J'utilise Mysql 3.23... sous un environnement Solaris 7. La taille de la
base de donnée est de 1Go 5.
Quelles sont les limites pour le bon fonctionnment de mysql ?
Existe il un moyen plus rapide de faire des copies de bases que le dump ?

Merci

Cordialement,

Tony Jarriault

---
Service webmaster : mailto:[EMAIL PROTECTED]
Tel : 01-34-49-06-69
MGN : http://www.mgn.fr
---

Tony Jarriault
mailto:[EMAIL PROTECTED]
Tel : 01-34-49-06-43
MATRA GLOBAL NETSERVICES
Societé du groupe PROSODIE
8, rue Grange Dame Rose
78140 Vélizy


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

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: where exists sql problem

2002-03-28 Thread George Pitcher

Whoa,

I've had this message 3 times now. Is there a problem somewhere?

George
- Original Message -
From: Ben Edwards [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 3:38 PM
Subject: where exists sql problem


 having problems working out sql where exists syntax.

 Tried query
   select *
   from   sections s
   where  exists

 select 0
 from   pages s
 where s.page = p.page
 )

 Any ideas,
 Ben
 --
 [EMAIL PROTECTED]+44 (0)7970 269 522
 http://www.subvertise.org   -- Altering the Corporate Image
 http://www.criticaldistribution.org -- Buy Alternative Video Online
 http://www.videonetwork.org -- Community/Radical Video
 http://www.spamcop.net/ -- Killing SPAM feels good!

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

 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




Capacite MySQL [ translation ]

2002-03-28 Thread Patrick Ouellet


Since I never saw much people speaking french using
this mailing list I though translating this message
for english users

Hi,

I use MySQL 3.23 under Solaris 7. The size of the Database
is 1Gig 5.
What are the limits for propoer MySQL operation.
Is there a faster way to copy a DB than using Dump?

Thanx

Sincerly,

Tony Jarriault.

-

Bonjour,

J'utilise Mysql 3.23... sous un environnement Solaris 7. La taille de la 
base de donnée est de 1Go 5.
Quelles sont les limites pour le bon fonctionnment de mysql ?
Existe il un moyen plus rapide de faire des copies de bases que le dump ?

Merci

Cordialement,

Tony Jarriault

---
Service webmaster : mailto:[EMAIL PROTECTED]
Tel : 01-34-49-06-69
MGN : http://www.mgn.fr
---

Tony Jarriault
mailto:[EMAIL PROTECTED]
Tel : 01-34-49-06-43
MATRA GLOBAL NETSERVICES
Societé du groupe PROSODIE
8, rue Grange Dame Rose
78140 Vélizy

sql, query

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Patrick Ouellet - Techniciens Specialiste
[EMAIL PROTECTED]
Recherche  Developpement
Les Entreprises Microtec inc.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
First they ignore you. Then they laugh at you.
Then they fight you. Then you win.
-Mohandas Gandhi
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
All source code included (if any ) is
copyright Microtec Technologies Inc. 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: sql where exists

2002-03-28 Thread Alex Kitainik

mySQL does not support nested 'selects'. Read the manual, please :)

Ben Edwards wrote:

 having problems working out sql where exists syntax.

 Tried
   select *
   from   sections s
   where  exists (
 select 0
 from   pages s
 where s.page = p.page
 )

 Any ideas,
 Ben
 --
 [EMAIL PROTECTED]+44 (0)7970 269 522
 http://www.subvertise.org   -- Altering the Corporate Image
 http://www.criticaldistribution.org -- Buy Alternative Video Online
 http://www.videonetwork.org -- Community/Radical Video
 http://www.spamcop.net/ -- Killing SPAM feels good!

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

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

--
Alex Kitainik



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

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




RE: Database Design Question

2002-03-28 Thread Ben Holness

Hi Chris/Nick/Scalper,

Thanks for the replies. I am not too sure how to implement this in tables,
so I will give an example:

Let's say I have three lists - a,b and c. List a contains 10,000 entries,
list b contains 2,500 entries and list c contains 75,000 entries.

I have a table of lists, with list ID, owner and date fields:
a,Ben,28/03/2002
b,Ben,28/03/2002
c,Tom,28/03/2002

Then I have another table for each list, with all of the entries. The fields
would be list ID and entry:

a,entry1
a,entry2
a,entry3
...
b,entry1
b,entry2
...
c,entry1
c,entry2
c,entry3
...

Have I understood the two table concept correctly?
How does the third table fit in?

I guess that if two (or more) of the entries overlap, I could make things
even better by having a multi-value field for the list ID in the second
table, allowing:

bc,entry65

if entry65 was common to lists b and c ... Is there a limit to the number of
values in a multi-value field? (Does MySQL offer multivalue fields?) and
would this be appropriate?

Cheers,

Ben


 I would recommend:

 A table of lists (one row for each list with owner, ID and
 creation Date
 (add modification date?))

 A table of list entries (one row for each entry)
 A third table linking the list to list entry.


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

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




hmm

2002-03-28 Thread Harry Rorarius

ok

I thought Mysql was a server that could be used as a online database?
If it is, is there some material I have not read that tells me how to do
this?
I understood most of the information I read about Mysql.  I was under the
understanding sql is the way to make a online database

Harry


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

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

2002-03-28 Thread Christopher Thompson

On Thursday 28 March 2002 9:48 am, Harry Rorarius wrote:
 I thought Mysql was a server that could be used as a online database?

Yes

 If it is, is there some material I have not read that tells me how to do
 this?

What are you trying to do?  You have not been at all clear in your 
requirements.

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

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




newbie question about InnoDB

2002-03-28 Thread Olivier Vanekem

hi,

I've downloaded mysql-max-nt v.3.23.49, have setup InnoDB startup support. I
am now in the process of creating tables. When these are standard tables no
problem, eg:

create table test (id integer not null, primary key(id)) type=InnoDB;

works fine !

I have problems when I have tables with foreign keys. Here is my sql script:

CREATE TABLE answer
(
id_answer INTEGER NOT NULL,
text_answer VARCHAR (255),
id_evaluation INTEGER NOT NULL,
id_question INTEGER NOT NULL,
scale_answer INTEGER,
PRIMARY KEY(id_answer),
INDEX evaluation_ind (id_evaluation),
INDEX question_ind (id_question),
FOREIGN KEY (id_evaluation) REFERENCES evaluation (id_evaluation),
FOREIGN KEY (id_question) REFERENCES question (id_question)
) type=InnoDB;

There I end up with an error 1005 errno 150 I've seen in the doc that my
foreign key syntax might be wrong, but what is wrong ?? Note the same script
works fine without type=InnoDB.

Any idea ??

Olivier


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

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




SQL query question - using LIKE

2002-03-28 Thread Mark Stringham

I have a  simple search form that allows the user to search a contact db
based on criteria that they choose.
Search by -
first name - text box
last name - text box
region - drop down
loan officer - drop down

I want the user to be able to receive results if they choose all possible
criteria or just one criteria.
My question is about query structure.  How do I query the database when I
have multiple criteria selected?


Any help is appreciated.

Mark


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

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

2002-03-28 Thread Roger Baklund

* Harry Rorarius
 I thought Mysql was a server that could be used as a online database?

Yes, it is...

 If it is, is there some material I have not read that tells me how to do
 this?

Probably :o)

 I understood most of the information I read about Mysql.  I was under the
 understanding sql is the way to make a online database

When you say 'online database' I assume you mean a database accessed through
the www, the http protocol part of internet...?

There is no http or www functionality in mysql. You must use a programming
language or some other tool to link the database with the browser, using the
mysql API and usually some CGI library. There are a number of languages to
choose between: c, c++, perl, php, python, java, tcl, eiffel, and any
language with ODBC support:

URL: http://www.mysql.com/doc/C/l/Clients.html 

There are some examples here, using perl:

URL: http://www.mysql.com/doc/P/e/Perl_DBI_Class.html 

Note that these examples does not show how you make CGI applications, that
is a different question. A CGI application is a program running on the web
server, using http and a web browser for user interaction. The application
can be an 'online database'. The output of the program is usually html
(could be xml), the program code is mainly different variations over the
sequence: 1) getting the input parameters, 2) prepare some sql statements,
3) execute the statements, 4) collecting the result, and 5) create the final
html and present it to the user. Normally you use a CGI library to maintain
the http protocol handling, but for output all you really need is to output
Content-type: text/html and a blank line before the html.

--
Roger


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

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




RE: SQL query question - using LIKE

2002-03-28 Thread Peter Lovatt

Hi


$query = 'SELECT *
  FROM Table
  WHERE
  FirstName LIKE %'.$firstname.'%' ;
  if($lastname)$query.= ', AND LastName LIKE %'.$lastname.'%';
  if($region)$query.= ', AND Region LIKE %'.$region.'%';
  if($loan_officer)$query.= ', AND Loan_officer LIKE
%'.$loan_officer.'%';
etc.

$mysql_result = mysql_query($query, $mysql_link);

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
[EMAIL PROTECTED]
tel. 0121-242-1473
---

 -Original Message-
 From: Mark Stringham [mailto:[EMAIL PROTECTED]]
 Sent: 28 March 2002 17:21
 To: MySQL
 Subject: SQL query question - using LIKE


 I have a  simple search form that allows the user to search a contact db
 based on criteria that they choose.
 Search by -
 first name - text box
 last name - text box
 region - drop down
 loan officer - drop down

 I want the user to be able to receive results if they choose all possible
 criteria or just one criteria.
 My question is about query structure.  How do I query the database when I
 have multiple criteria selected?


 Any help is appreciated.

 Mark


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

 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: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-28 Thread savaidis

Is there something similar for Greeks too?
(not that matters very much as I run on internet host but in case..)


Makis


 -Original Message-
 From: Ken Menzel [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 26, 2002 10:25 PM
 To: Philip Semanchuk
 Cc: [EMAIL PROTECTED]
 Subject: Re: SELECT w/LIKE on Swedish character ö finds ], why?


 Hi Philip,
   before running your test next time try this:

 vi /etc/my.cnf

 insert into this file:

 [mysqld]
 default-character-set  = swe7

 then stop mysql (mysqladmin shutdown)

 and restart (safe_mysqld)

 then try your test again.  It worked fine for me.

 Ken


  Philip Semanchuk wrote:
  
   Hi everyone,
   I am having a little trouble with searching for Swedish
 characters. When I
   SELECT using LIKE I get matches that I do not expect. I have
 created a
   simple test case that is entirely reproduced below. To summarize,
 I insert
   one row into a single-column table that contains the right square
 bracket
   character (ASCII 0x5d). When I search for the Swedish letter ö
 (ISO-8859-1
   0xf6) I find the row containing the right bracket.
  
   We're running RedHat 7.2 with nothing fancy added in as we're
 Linux novices
   and just playing around with the system to see how it works.
 MySQL -V
   produces this:
   mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
  
   Here's my test:
  
   mysql create database swedish_character_test;
   Query OK, 1 row affected (0.00 sec)
  
   mysql use swedish_character_test;
   Database changed
   mysql create table simple (name varchar(255) NOT NULL);
   Query OK, 0 rows affected (0.00 sec)
  
   mysql insert into simple (name) values (']');
   Query OK, 1 row affected (0.00 sec)
  
   mysql select name from simple where name like '%ö%';
   +--+
   | name |
   +--+
   | ]|
   +--+
   1 row in set (0.00 sec)
  
   I'd appreciate any help understanding why ö = ] in this case.



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

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

2002-03-28 Thread Steve Rapaport


By the way you're using the terms, I would guess you're hoping
to make a new database, and place it on the web.  

In that case, Mysql is probably at too low a level of
detail for your needs.  To solve your problem you
would need to learn:

HTML
CGI
middleware (ASP, PHP, etc)
MySQL
SQL
database design

My guess is you are new to most or all of these.  In this case
you would do better with one of these two prepackaged database products:

1. Filemaker Pro  http://www.filemaker.com/
2. Microsoft Access 2000 (you know where)

Both give you, to some extent, the ability to construct a
database, configure the interface, and put it on the web,
without knowing much SQL, middleware, etc.  In the case of
Filemaker, you don't even need to know HTML or be artistic.

Perhaps this helps.

Steve Rapaport



] 
] I thought Mysql was a server that could be used as a online database?
] If it is, is there some material I have not read that tells me how to do
] this?
] I understood most of the information I read about Mysql.  I was under the
] understanding sql is the way to make a online database
] 
] Harry
] 
] 
] -
] Before posting, please check:
]http://www.mysql.com/manual.php   (the manual)
]http://lists.mysql.com/   (the list archive)
] 
] To request this thread, e-mail [EMAIL PROTECTED]
] To unsubscribe, e-mail 
] [EMAIL PROTECTED]
] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
] 

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

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




Re: [Newbie] MATCH and INDEX question (using a JOIN in a MATCH statement)

2002-03-28 Thread Dan Tappin

Well after some pondering I found a pretty easy work around:

SELECT main.id, description, maincat.name, subcat.name from main
LEFT JOIN maincat ON maincat.id=main.maincatid
LEFT JOIN subcat ON subcat.id=main.subcatid
WHERE MATCH (description) AGAINST ('keywords')
OR
WHERE MATCH (maincat.name) AGAINST ('keywords')
OR
WHERE MATCH (subcat.name) AGAINST ('keywords')

You can even add the MATCHes to your select to get a total relavence:

(MATCH (description) AGAINST ('keywords') + MATCH (maincat.name) AGAINST
('keywords') + MATCH (subcat.name) AGAINST ('keywords')) as relavence

which you can also sort by.

I hope this helps somebody.

Dan

 At 13:43 -0700 3/26/02, Dan Tappin wrote:
 This is a follow-up to a MySQL keyword text search question I had answer a
 few days ago.
 
 I have table 'main' which has two INT columns 'maincat' and 'subcat' which
 hold an index number from to other tables maincat and subcat.  These table
 each hold descriptive names ('name') for each of the main categories and sub
 categories.
 
 I have no problem using MATCH to search the various fields of 'main' using
 an INDEX.  The problem is I want to create a search across the related
 'name' fields of the other two tables.
 
 Here is what I have so far:
 
 select main.id, description, maincat.name, subcat.name from main LEFT JOIN
 clients ON forsale.clientid=clients.id WHERE MATCH (description) AGAINST
 ('keywords')
 
 This works but I can only MATCH in the columns of 'main'.
 
 Now my first thought was to try this:
 
 select main.id, description, maincat.name, subcat.name from main LEFT JOIN
 clients ON forsale.clientid=clients.id WHERE MATCH (description,
 maincat.name, subcat.name) AGAINST ('keywords')
 
 Which results in an error.
 
 Can anyone tell me if I can do this using MATCH?
 
 Nope.
 
 The columns named in the MATCH() must match the columns for a FULLTEXT
 index, and indexes don't cross tables.
 
 
 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




queries ( your help appreciated)

2002-03-28 Thread David Rice

I am quite new to coding and have managed so far but, i've been havin 
trouble with queries.
Okay well here goes, it is quite simple but i can't figure it out, and 
haven't found any helpfull documentation

I have a mysql database, and i want to sort a table by date Where the 
resulting records will be greater than (i.e. tommorow) ttodays date

If someone could give me an example code of how it is done, it would be much 
appreciated

thanks,
-dave



_
Chat with friends online, try MSN Messenger: http://messenger.msn.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: queries ( your help appreciated)

2002-03-28 Thread Steven Hajducko

Hey David.

I think this is what you want?

select * from table order by date_column ASC; ( for ascending order..)
select * from table order by date_column DESC; ( for descending order..)

Replace 'table' with the name of your table and date_column with the
name of the column that contains the dates.

--
sh

On Thu, 2002-03-28 at 10:15, David Rice wrote:
 I am quite new to coding and have managed so far but, i've been havin 
 trouble with queries.
 Okay well here goes, it is quite simple but i can't figure it out, and 
 haven't found any helpfull documentation
 
 I have a mysql database, and i want to sort a table by date Where the 
 resulting records will be greater than (i.e. tommorow) ttodays date
 
 If someone could give me an example code of how it is done, it would be much 
 appreciated
 
 thanks,
 -dave
 
 
 
 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.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




Repost

2002-03-28 Thread Jonathan Wilzig

Sorry to repost. I got one answer and stumped the guy trying to help (thanks
again btw). If anyone has seen this or has any ideas, any help would be
greatly appreciated.

---
RH 7.2.
mysql-3.23.44

I have a single server running mysql. I have added one database I use. For
some unknown reason, it appears that mysql is trying to replicate to
something, failing and causing mysql to stop responding almost daily.
/etc/my.cnf has no reference to any master/slave or replication options. I
am thoroughly confused. Any help would be appreciated. My hostname.err log
is filled with lines like this (about 1 per minute)


020326 10:18:58  Slave thread: error connecting to master: Unknown MySQL
Server Host '' (4) (107), retry in 60 sec

Thanks in advance.

-
Jonathan Wilzig
Wireless Services Corp.
[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




help: query

2002-03-28 Thread Norman Zhang

Hi,

I have setup a table with user login name and password. The password is
encrypted with the MySQL's password(). How do I compare these info with the
user's input.

I had

$query = select * from auth where
 usrname='$logname' and usrpass=password('$logpass');

mysql_query($query);

But I can't compare the passwords. If I take out usrpass=..., MySQL can find
a match. Please help.

Regards,
Norman


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

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: queries ( your help appreciated)

2002-03-28 Thread DL Neil

David, Steven,

 I think this is what you want?

 select * from table order by date_column ASC; ( for ascending order..)
 select * from table order by date_column DESC; ( for descending
order..)

 Replace 'table' with the name of your table and date_column with the
 name of the column that contains the dates.

...and add a clause to take care of the temporal constraint, eg

WHERE dateColNm  NOW()

(depending upon the format of the date column)

Recommend a quick look at the manual - it has a quick intro/tutorial
chapter that covers this ground quite neatly!

Regards,
=dn


  I am quite new to coding and have managed so far but, i've been
havin
  trouble with queries.
  Okay well here goes, it is quite simple but i can't figure it out,
and
  haven't found any helpfull documentation
 
  I have a mysql database, and i want to sort a table by date Where
the
  resulting records will be greater than (i.e. tommorow) ttodays date
 
  If someone could give me an example code of how it is done, it would
be much
  appreciated
 
  thanks,
  -dave
 
 
 
  _
  Chat with friends online, try MSN Messenger:
http://messenger.msn.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




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

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

2002-03-28 Thread Steven Hajducko

Is there a master.info file somewhere?

What's your my.cnf look like?

If you want, you can email me the file and I'll be happy to try and
help.

--
sh

On Thu, 2002-03-28 at 10:40, Jonathan Wilzig wrote:
 Sorry to repost. I got one answer and stumped the guy trying to help (thanks
 again btw). If anyone has seen this or has any ideas, any help would be
 greatly appreciated.
 
 ---
 RH 7.2.
 mysql-3.23.44
 
 I have a single server running mysql. I have added one database I use. For
 some unknown reason, it appears that mysql is trying to replicate to
 something, failing and causing mysql to stop responding almost daily.
 /etc/my.cnf has no reference to any master/slave or replication options. I
 am thoroughly confused. Any help would be appreciated. My hostname.err log
 is filled with lines like this (about 1 per minute)
 
 
 020326 10:18:58  Slave thread: error connecting to master: Unknown MySQL
 Server Host '' (4) (107), retry in 60 sec
 
 Thanks in advance.
 
 -
 Jonathan Wilzig
 Wireless Services Corp.
 [EMAIL PROTECTED]
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



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

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




Re: queries ( your help appreciated)

2002-03-28 Thread Steven Hajducko

D'oh.  Forgot he wanted after now :)

Thanks.

On Thu, 2002-03-28 at 10:46, DL Neil wrote:
 David, Steven,
 
  I think this is what you want?
 
  select * from table order by date_column ASC; ( for ascending order..)
  select * from table order by date_column DESC; ( for descending
 order..)
 
  Replace 'table' with the name of your table and date_column with the
  name of the column that contains the dates.
 
 ...and add a clause to take care of the temporal constraint, eg
 
 WHERE dateColNm  NOW()
 
 (depending upon the format of the date column)
 
 Recommend a quick look at the manual - it has a quick intro/tutorial
 chapter that covers this ground quite neatly!
 
 Regards,
 =dn
 
 
   I am quite new to coding and have managed so far but, i've been
 havin
   trouble with queries.
   Okay well here goes, it is quite simple but i can't figure it out,
 and
   haven't found any helpfull documentation
  
   I have a mysql database, and i want to sort a table by date Where
 the
   resulting records will be greater than (i.e. tommorow) ttodays date
  
   If someone could give me an example code of how it is done, it would
 be much
   appreciated
  
   thanks,
   -dave
  
  
  
   _
   Chat with friends online, try MSN Messenger:
 http://messenger.msn.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
 
 
 



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

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




Re: SQL query question - using LIKE

2002-03-28 Thread DL Neil

Mark, Peter,

The query below assumes that the user will search of FirstName and none
or more of the other fields - which was not how the question reads (to
me).

To answer the question it would be useful to know how you are accessing
MySQL - are you using PHP (as per example code below) for example?

When the form data is received it is (very) necessary to 'clean' and
validate the data. Part of this process involves the question was this
field filled out?. Thus front end-processing is the time for the
query's WHERE clause to be built up. The last question is going to be
has at least one field been filled out?!

The methodology of Peter's reply still applies. There are a number of
tutorials available on various sites (but can't point you at one because
don't know which tool you're using!!!). Would certainly recommend
researching a few...

Regards,
=dn


 $query = 'SELECT *
   FROM Table
   WHERE
   FirstName LIKE %'.$firstname.'%' ;
   if($lastname)$query.= ', AND LastName LIKE
%'.$lastname.'%';
   if($region)$query.= ', AND Region LIKE %'.$region.'%';
   if($loan_officer)$query.= ', AND Loan_officer LIKE
 %'.$loan_officer.'%';
 etc.

 $mysql_result = mysql_query($query, $mysql_link);

 HTH

 Peter

 ---
 Excellence in internet and open source software
 ---
 Sunmaia
 www.sunmaia.net
 [EMAIL PROTECTED]
 tel. 0121-242-1473
 ---

  -Original Message-
  From: Mark Stringham [mailto:[EMAIL PROTECTED]]
  Sent: 28 March 2002 17:21
  To: MySQL
  Subject: SQL query question - using LIKE
 
 
  I have a  simple search form that allows the user to search a
contact db
  based on criteria that they choose.
  Search by -
  first name - text box
  last name - text box
  region - drop down
  loan officer - drop down
 
  I want the user to be able to receive results if they choose all
possible
  criteria or just one criteria.
  My question is about query structure.  How do I query the database
when I
  have multiple criteria selected?
 
 
  Any help is appreciated.
 
  Mark
 
 

 -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
 


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

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




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

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




RE: Database Design Question

2002-03-28 Thread Jienan Chen

In your situation (or any situation, IMHO),
multi-value fields defeat the purpose of good database
design.

I think you are on the right track if you are willing
to tolerate a little redundancy for the sake of
simplicity (as a one-to-many relationship). If you
really want to structure it as a many-to-many
relationship, then try the following (I throw my 2
cents without knowing exactly what you are dealing
with in terms of data structures):

Table 1: list (entity table)
listId, owner, date, ...

Table 2: entry (entity table)
entryId, entryDetails (attribute 1, 2, 3, ...)...
Note: Lump all entries from different lists together
and use an auto_increment primary key and a unique key
constraint for every entry.

Table 3: listEntry (relation table)
listId, entryId
Such as:
A, entry10
B, entry20
B, entry65
C, entry65
D, entry50
Note: Make (listId, entryId) a primary key or at least
a unique key.
 
Hope this helps.

Jack


--- Ben Holness [EMAIL PROTECTED] wrote:
 Hi Chris/Nick/Scalper,
 
 Thanks for the replies. I am not too sure how to
 implement this in tables,
 so I will give an example:
 
 Let's say I have three lists - a,b and c. List a
 contains 10,000 entries,
 list b contains 2,500 entries and list c contains
 75,000 entries.
 
 I have a table of lists, with list ID, owner and
 date fields:
 a,Ben,28/03/2002
 b,Ben,28/03/2002
 c,Tom,28/03/2002
 
 Then I have another table for each list, with all of
 the entries. The fields
 would be list ID and entry:
 
 a,entry1
 a,entry2
 a,entry3
 ...
 b,entry1
 b,entry2
 ...
 c,entry1
 c,entry2
 c,entry3
 ...
 
 Have I understood the two table concept correctly?
 How does the third table fit in?
 
 I guess that if two (or more) of the entries
 overlap, I could make things
 even better by having a multi-value field for the
 list ID in the second
 table, allowing:
 
 bc,entry65
 
 if entry65 was common to lists b and c ... Is there
 a limit to the number of
 values in a multi-value field? (Does MySQL offer
 multivalue fields?) and
 would this be appropriate?
 
 Cheers,
 
 Ben
 
 
  I would recommend:
 
  A table of lists (one row for each list with
 owner, ID and
  creation Date
  (add modification date?))
 
  A table of list entries (one row for each entry)
  A third table linking the list to list entry.
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.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: SQL query question - using LIKE

2002-03-28 Thread Mark Stringham

DL -

Points well taken -
I am using php and doing simple validation
EX  -   if ($fname !=) {
add fname string to search variable;
}

And if none of the fields have been filled out I'll return an error msg.
As you mentioned, Peter's logic still applies here and it has given me
enough to work with.
But I am certainly open for more suggestion/ feedback.

Thanks

Mark




-Original Message-
From: DL Neil [EMAIL PROTECTED]
To: Peter Lovatt [EMAIL PROTECTED]; Mark Stringham
[EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Date: Thursday, March 28, 2002 11:52 AM
Subject: Re: SQL query question - using LIKE


Mark, Peter,

The query below assumes that the user will search of FirstName and none
or more of the other fields - which was not how the question reads (to
me).

To answer the question it would be useful to know how you are accessing
MySQL - are you using PHP (as per example code below) for example?

When the form data is received it is (very) necessary to 'clean' and
validate the data. Part of this process involves the question was this
field filled out?. Thus front end-processing is the time for the
query's WHERE clause to be built up. The last question is going to be
has at least one field been filled out?!

The methodology of Peter's reply still applies. There are a number of
tutorials available on various sites (but can't point you at one because
don't know which tool you're using!!!). Would certainly recommend
researching a few...

Regards,
=dn


 $query = 'SELECT *
   FROM Table
   WHERE
   FirstName LIKE %'.$firstname.'%' ;
   if($lastname)$query.= ', AND LastName LIKE
%'.$lastname.'%';
   if($region)$query.= ', AND Region LIKE %'.$region.'%';
   if($loan_officer)$query.= ', AND Loan_officer LIKE
 %'.$loan_officer.'%';
 etc.

 $mysql_result = mysql_query($query, $mysql_link);

 HTH

 Peter

 ---
 Excellence in internet and open source software
 ---
 Sunmaia
 www.sunmaia.net
 [EMAIL PROTECTED]
 tel. 0121-242-1473
 ---

  -Original Message-
  From: Mark Stringham [mailto:[EMAIL PROTECTED]]
  Sent: 28 March 2002 17:21
  To: MySQL
  Subject: SQL query question - using LIKE
 
 
  I have a  simple search form that allows the user to search a
contact db
  based on criteria that they choose.
  Search by -
  first name - text box
  last name - text box
  region - drop down
  loan officer - drop down
 
  I want the user to be able to receive results if they choose all
possible
  criteria or just one criteria.
  My question is about query structure.  How do I query the database
when I
  have multiple criteria selected?
 
 
  Any help is appreciated.
 
  Mark
 
 

 -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
 


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

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





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

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




Re: Database Design Question

2002-03-28 Thread DL Neil

Nick,

 This is pretty familiar to me because I'm analyzing the behavior of
people
 in on-line discussions, so I'm gathering such data.

Which begs the questions:
- in what way are you analyzing behavior? and
- in what way are you analyzing this list-community?

=dn
MySQL list busting

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

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




Re: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-28 Thread Ken Menzel

Hi Makis,
default-character-set  = greek

Try that, best wishes,
Ken

P.S.  also for anyone else asking here are all the charsets included
in MySQL by default.  You can also create your own.

mysql show variables like char%;
++
--
-+
| Variable_name  | Value
|
++
--
-+
| character_set  | latin1
|
| character_sets | latin1 dec8 dos german1 hp8 koi8_ru latin2 swe7
usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr
win1251ukr greek win1250 croat cp1257 latin5 |
++
--
-+
2 rows in set (0.00 sec)



- Original Message -
From: savaidis [EMAIL PROTECTED]
To: Ken Menzel [EMAIL PROTECTED]; Philip Semanchuk
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 12:40 PM
Subject: RE: SELECT w/LIKE on Swedish character ö finds ], why?


 Is there something similar for Greeks too?
 (not that matters very much as I run on internet host but in case..)


 Makis


  -Original Message-
  From: Ken Menzel [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 26, 2002 10:25 PM
  To: Philip Semanchuk
  Cc: [EMAIL PROTECTED]
  Subject: Re: SELECT w/LIKE on Swedish character ö finds ], why?
 
 
  Hi Philip,
before running your test next time try this:
 
  vi /etc/my.cnf
 
  insert into this file:
 
  [mysqld]
  default-character-set  = swe7
 
  then stop mysql (mysqladmin shutdown)
 
  and restart (safe_mysqld)
 
  then try your test again.  It worked fine for me.
 
  Ken
 
 
   Philip Semanchuk wrote:
   
Hi everyone,
I am having a little trouble with searching for Swedish
  characters. When I
SELECT using LIKE I get matches that I do not expect. I have
  created a
simple test case that is entirely reproduced below. To
summarize,
  I insert
one row into a single-column table that contains the right
square
  bracket
character (ASCII 0x5d). When I search for the Swedish letter ö
  (ISO-8859-1
0xf6) I find the row containing the right bracket.
   
We're running RedHat 7.2 with nothing fancy added in as we're
  Linux novices
and just playing around with the system to see how it works.
  MySQL -V
produces this:
mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
   
Here's my test:
   
mysql create database swedish_character_test;
Query OK, 1 row affected (0.00 sec)
   
mysql use swedish_character_test;
Database changed
mysql create table simple (name varchar(255) NOT NULL);
Query OK, 0 rows affected (0.00 sec)
   
mysql insert into simple (name) values (']');
Query OK, 1 row affected (0.00 sec)
   
mysql select name from simple where name like '%ö%';
+--+
| name |
+--+
| ]|
+--+
1 row in set (0.00 sec)
   
I'd appreciate any help understanding why ö = ] in this case.
 
 
 

 
-
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail
[EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
 


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

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




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

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




RE: Database Design Question

2002-03-28 Thread Nick Arnett



 -Original Message-
 From: DL Neil [mailto:[EMAIL PROTECTED]]

...

 Which begs the questions:
 - in what way are you analyzing behavior? and
 - in what way are you analyzing this list-community?

There's too much to read, is the simple answer to the first question.
Over the last few years, I've developed some methods of identifying the most
influential people in on-line discussions by discovering social networks.
Among them, I'm quite sure, are people who are opinion leaders.  By
identifying them, it's possible to track ideas and trends.

Not long after I first started doing this, I did some brainstorming about it
with O'Reilly  Associates, which uses such techniques to help decide which
open source projects have momentum, so that they can make better decisions
about what books to publish.  In fact, MySQL v. mSQL was one of the early
areas they studied.  I also started a company, Opion Inc., to do this kind
of analysis for the stock market, movies and other areas.  Opion recently
sold its technology to Intelliseek (and I have no idea what they're doing
with it, but it's not hard to imagine).  They seem to have a server on-line
at www.opion.com, but it's secured.

As for this community, my analysis is limited to reading the messages that
either have interesting subjects or senders.  By eyeballing the folder that
contains them, that is, since my software tries to figure out what's
interesting as well.

Just to put some fears to rest, which usually come up quickly, I long ago
recognized that the list of influential people is something of a spammer's
dream.  Equally long ago, it was obvious that such lists have to be
unavailable to anyone else.  It's an interesting, familiar paradox -- how to
use the data without revealing enough that it could be abused.

I don't want to get any further into the various issues around this research
here unless it has something to do directly with MySQL.

Nick


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

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




Re: SQL query question - using LIKE

2002-03-28 Thread DL Neil

Mark,
Tutorials: Start at the PHP home page and look for the links page.
DevShed would be a good start.
Regards,
=dn

- Original Message -
From: Mark Stringham [EMAIL PROTECTED]
To: DL Neil [EMAIL PROTECTED]; Peter Lovatt
[EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Sent: 28 March 2002 19:16
Subject: Re: SQL query question - using LIKE


 DL -

 Points well taken -
 I am using php and doing simple validation
 EX  -   if ($fname !=) {
 add fname string to search variable;
 }

 And if none of the fields have been filled out I'll return an error
msg.
 As you mentioned, Peter's logic still applies here and it has given me
 enough to work with.
 But I am certainly open for more suggestion/ feedback.

 Thanks

 Mark




 -Original Message-
 From: DL Neil [EMAIL PROTECTED]
 To: Peter Lovatt [EMAIL PROTECTED]; Mark Stringham
 [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
 Date: Thursday, March 28, 2002 11:52 AM
 Subject: Re: SQL query question - using LIKE


 Mark, Peter,
 
 The query below assumes that the user will search of FirstName and
none
 or more of the other fields - which was not how the question reads
(to
 me).
 
 To answer the question it would be useful to know how you are
accessing
 MySQL - are you using PHP (as per example code below) for example?
 
 When the form data is received it is (very) necessary to 'clean' and
 validate the data. Part of this process involves the question was
this
 field filled out?. Thus front end-processing is the time for the
 query's WHERE clause to be built up. The last question is going to be
 has at least one field been filled out?!
 
 The methodology of Peter's reply still applies. There are a number of
 tutorials available on various sites (but can't point you at one
because
 don't know which tool you're using!!!). Would certainly recommend
 researching a few...
 
 Regards,
 =dn
 
 
  $query = 'SELECT *
FROM Table
WHERE
FirstName LIKE %'.$firstname.'%' ;
if($lastname)$query.= ', AND LastName LIKE
 %'.$lastname.'%';
if($region)$query.= ', AND Region LIKE %'.$region.'%';
if($loan_officer)$query.= ', AND Loan_officer LIKE
  %'.$loan_officer.'%';
  etc.
 
  $mysql_result = mysql_query($query, $mysql_link);
 
  HTH
 
  Peter
 
  ---
  Excellence in internet and open source software
  ---
  Sunmaia
  www.sunmaia.net
  [EMAIL PROTECTED]
  tel. 0121-242-1473
  ---
 
   -Original Message-
   From: Mark Stringham [mailto:[EMAIL PROTECTED]]
   Sent: 28 March 2002 17:21
   To: MySQL
   Subject: SQL query question - using LIKE
  
  
   I have a  simple search form that allows the user to search a
 contact db
   based on criteria that they choose.
   Search by -
   first name - text box
   last name - text box
   region - drop down
   loan officer - drop down
  
   I want the user to be able to receive results if they choose all
 possible
   criteria or just one criteria.
   My question is about query structure.  How do I query the
database
 when I
   have multiple criteria selected?
  
  
   Any help is appreciated.
  
   Mark
  
  
 

 -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail
[EMAIL PROTECTED]
   To unsubscribe, e-mail
   [EMAIL PROTECTED]
   Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
  
 
 

 -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
 
 
 




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

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




select a certain num of items in sql query

2002-03-28 Thread Aman Raheja

Suppose I want to select items 10 to 30 from a table tab, which has 36 rows.
What could be the sql query ?
Thank you.
Aman

PS: I am using cgi-perl.


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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

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




Re: newbie question about InnoDB

2002-03-28 Thread Heikki Tuuri

Olivier,

please check that the data types of corresponding columns in the referenced
tables are the same, and that you have created the necessary indexes in also
the referenced tables.

I tested the following:

C:\m\client_debugmysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.46-max-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql CREATE TABLE evaluation(id_evaluation INTEGER NOT NULL, primary key
(id_e
valuation)) type = innodb;
Query OK, 0 rows affected (1.12 sec)

mysql
mysql CREATE TABLE question(id_question INTEGER NOT NULL, primary key
(id_quest
ion)) type = innodb;
Query OK, 0 rows affected (0.10 sec)

mysql
mysql CREATE TABLE answer(
- id_answer INTEGER NOT NULL,
- text_answer VARCHAR (255),
- id_evaluation INTEGER NOT NULL,
- id_question INTEGER NOT NULL,
- scale_answer INTEGER,
- PRIMARY KEY(id_answer),
- INDEX evaluation_ind (id_evaluation),
- INDEX question_ind (id_question),
- FOREIGN KEY (id_evaluation) REFERENCES evaluation
(id_evaluation),
- FOREIGN KEY (id_question) REFERENCES question (id_question))
type=Inn
oDB;
Query OK, 0 rows affected (0.88 sec)

mysql

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB

..
hi,

I've downloaded mysql-max-nt v.3.23.49, have setup InnoDB startup support. I
am now in the process of creating tables. When these are standard tables no
problem, eg:
create table test (id integer not null, primary key(id)) type=InnoDB;
works fine !
I have problems when I have tables with foreign keys. Here is my sql script:

CREATE TABLE answer(
id_answer INTEGER NOT NULL,
text_answer VARCHAR (255),
id_evaluation INTEGER NOT NULL,
id_question INTEGER NOT NULL,
scale_answer INTEGER,
PRIMARY KEY(id_answer),
INDEX evaluation_ind (id_evaluation),
INDEX question_ind (id_question),
FOREIGN KEY (id_evaluation) REFERENCES evaluation (id_evaluation),
FOREIGN KEY (id_question) REFERENCES question (id_question))
type=InnoDB;

There I end up with an error 1005 errno 150 I've seen in the doc that my
foreign key syntax might be wrong, but what is wrong ?? Note the same script
works fine without type=InnoDB.

Any idea ??

Olivier



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

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




Re: select a certain num of items in sql query

2002-03-28 Thread Tyler Longren

This worked for me:
SELECT * FROM table ORDER BY id ASC LIMIT 9,21;

There's probably a better way to do that though.

tyler

- Original Message -
From: Aman Raheja [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 2:04 PM
Subject: select a certain num of items in sql query


 Suppose I want to select items 10 to 30 from a table tab, which has 36
rows.
 What could be the sql query ?
 Thank you.
 Aman

 PS: I am using cgi-perl.


 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx


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

 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




Queries help (part II)

2002-03-28 Thread David Rice

Hey thanks i got it to work sort of

$query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date DESC LIMIT 
3;

that works
but i want it to show them ascending  and when i change it to

$query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date ASC; DESC 
LIMIT 3;

it doesn't work

any thoughts?

_
Send and receive Hotmail on your mobile device: http://mobile.msn.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: Queries help (part II)

2002-03-28 Thread Rick Emery

$query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date ASC LIMIT
3;
-Original Message-
From: David Rice [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 2:20 PM
To: [EMAIL PROTECTED]
Subject: Queries help (part II)


Hey thanks i got it to work sort of

$query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date DESC LIMIT

3;

that works
but i want it to show them ascending  and when i change it to

$query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date ASC; DESC 
LIMIT 3;

it doesn't work

any thoughts?

_
Send and receive Hotmail on your mobile device: http://mobile.msn.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: select a certain num of items in sql query

2002-03-28 Thread denonymous

From: Aman Raheja [EMAIL PROTECTED]

 Suppose I want to select items 10 to 30 from a table tab, which has 36
rows.
 What could be the sql query ?
 Thank you.
 Aman

 PS: I am using cgi-perl.



How are these items identified as items 10 to 30 in the table?

Does that mean that when you SELECT * FROM the table, those are the items
that are displayed in rows 10-30? If so, you shouldn't depend on them being
as such. It's much better to always have an ORDER BY fieldname clause in
your query.

At any rate, though, you can specify a range with LIMIT offset,numrows,
such as this:

SELECT * FROM tablename ORDER BY field1 LIMIT 10;
   (selects rows 1-10)
SELECT * FROM tablename ORDER BY field1 LIMIT 10,20;
   (selects rows 11-20)
SELECT * FROM tablename ORDER BY field1 LIMIT 20,30;
   (selects rows 21-30)
SELECT * FROM tablename ORDER BY field1 LIMIT 9,20;
   (selects rows 10-30)


--
denonymous
www.coldcircuit.net



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

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




Re: Queries help (part II)

2002-03-28 Thread David M. Peak

If you only want it ascending, take out the DESC as in:

$query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date ASC LIMIT
3;

- Original Message -
From: David Rice [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 12:19 PM
Subject: Queries help (part II)


 Hey thanks i got it to work sort of

 $query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date DESC
LIMIT
 3;

 that works
 but i want it to show them ascending  and when i change it to

 $query = SELECT * FROM gigs  WHERE date  '$today' ORDER BY date ASC;
DESC
 LIMIT 3;

 it doesn't work

 any thoughts?

 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.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: Database Design Question

2002-03-28 Thread Ben Holness

Thanks very much to every who helped me with my MySQL problem!

I will probably go with the three table solution as it also eliminates the
need for yet another table!

Cheers,

Ben

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

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




hits

2002-03-28 Thread Alex Behrens

Hey Guys,

I'm working on a script that displays reviews by a category for my site and
I want the pull-down menu to be ordered by the amount of hits each category
or review
has, is it possible to sort by the amount of hits for a row value?

My table is structured as follows:

Name, Url, Author, E-mail, Number, Category, Description

I want to be able to track the amount of hits per category and I the same
categories for displaying all reviews in the table.

Does mysql integrate a function like this?

Thanks!

-Alex Big Al Behrens
E-mail: [EMAIL PROTECTED]
Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
Phone: 651-482-8779
Cell: 651-329-4187
Fax: 651-482-1391
ICQ: 3969599
Owner of the 3D-Unlimited Network:
http://www.3d-unlimited.com
Send News:
[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: hits

2002-03-28 Thread Colin Faber

UPDATE tbl SET Number = Number + 1 WHERE blah;



Alex Behrens wrote:
 
 Hey Guys,
 
 I'm working on a script that displays reviews by a category for my site and
 I want the pull-down menu to be ordered by the amount of hits each category
 or review
 has, is it possible to sort by the amount of hits for a row value?
 
 My table is structured as follows:
 
 Name, Url, Author, E-mail, Number, Category, Description
 
 I want to be able to track the amount of hits per category and I the same
 categories for displaying all reviews in the table.
 
 Does mysql integrate a function like this?
 
 Thanks!
 
 -Alex Big Al Behrens
 E-mail: [EMAIL PROTECTED]
 Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
 Phone: 651-482-8779
 Cell: 651-329-4187
 Fax: 651-482-1391
 ICQ: 3969599
 Owner of the 3D-Unlimited Network:
 http://www.3d-unlimited.com
 Send News:
 [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

-- 
Colin Faber
(303) 859-1491
fpsn.net, Inc.

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

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




synopsis of the problem (one line)

2002-03-28 Thread root

Description:

How-To-Repeat:

Fix:


Submitter-Id:  submitter ID
Originator:
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.49a (Official MySQL Binary)

Environment:

System: Linux machigu 2.2.19 #93 Thu Jun 21 01:09:03 PDT 2001 i586 unknown
Architecture: i586

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/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro 
-O3 -fno-omit-frame-pointer'  CXX='gcc'  CXXFLAGS='-Wimplicit -Wreturn-type 
-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat 
-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings 
-Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy 
-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 
-fno-omit-frame-pointer'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Mar 28 19:29 /lib/libc.so.6 - libc-2.2.3.so
-rwxr-xr-x1 root root  4783716 May 26  2001 /lib/libc-2.2.3.so
-rw-r--r--1 root root 24721042 May 26  2001 /usr/lib/libc.a
-rw-r--r--1 root root  178 May 26  2001 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client 
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static 
--with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' 
--prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client 
--enable-local-infile 'CFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro 
-O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpr!
o -O3 -fno-omit-frame-pointer' CXX=gcc



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

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




Re: hits

2002-03-28 Thread Alex Behrens

Yeah, but thats not what I'm asking, how can I get this info from the table?
Does mysql have a built-in feature that stoes the hit information and if so,
how do I pull this info from the table?

Thanks!

-Alex Big Al Behrens
E-mail: [EMAIL PROTECTED]
Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
Phone: 651-482-8779
Cell: 651-329-4187
Fax: 651-482-1391
ICQ: 3969599
Owner of the 3D-Unlimited Network:
http://www.3d-unlimited.com
Send News:
[EMAIL PROTECTED]
- Original Message -
From: Colin Faber [EMAIL PROTECTED]
To: Alex Behrens [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 4:17 PM
Subject: Re: hits


 UPDATE tbl SET Number = Number + 1 WHERE blah;



 Alex Behrens wrote:
 
  Hey Guys,
 
  I'm working on a script that displays reviews by a category for my site
and
  I want the pull-down menu to be ordered by the amount of hits each
category
  or review
  has, is it possible to sort by the amount of hits for a row value?
 
  My table is structured as follows:
 
  Name, Url, Author, E-mail, Number, Category, Description
 
  I want to be able to track the amount of hits per category and I the
same
  categories for displaying all reviews in the table.
 
  Does mysql integrate a function like this?
 
  Thanks!
  
  -Alex Big Al Behrens
  E-mail: [EMAIL PROTECTED]
  Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
  Phone: 651-482-8779
  Cell: 651-329-4187
  Fax: 651-482-1391
  ICQ: 3969599
  Owner of the 3D-Unlimited Network:
  http://www.3d-unlimited.com
  Send News:
  [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

 --
 Colin Faber
 (303) 859-1491
 fpsn.net, Inc.

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

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





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

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




pb while querying in strange db name

2002-03-28 Thread David yahoo

Hi all,

I ve got a database with the name 
db-name
when making : 
select * from db-name.table;
I get a error.
something is wrong in your syntex near : -name ...

How can I tell mysql that db-name is a database name ?

Thanks.




_
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: pb while querying in strange db name

2002-03-28 Thread David yahoo

we have to escape name 
select * from `db-name`.`table-name`;
works.

great mysql.!



_
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




MYSQL REPLICATION

2002-03-28 Thread Joe Bifano

I am trying to configure mysql for redundancy using replication and the
built-in mysql master/slave configuration. What I don't understand, even
after much reading, is how to recover from a failure. If host B is slave to
host A, and A goes down, B could then be manually or automatically
configured to be master itself, and thus take over A's role completely.
However, if B was not completely caught up from A before the failure took
place, then once A was back up the two would be out of sync, and A could
contain data B did not, and B would undoubtedly contain data A did not. How
do you avoid this situation or re-sync the two after a failure like this?

I'm finding it difficult to locate a concise and cohesive method to create a
redundant database system using mysql. Any other resources or references
would be heartily appreciated.

Joe

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

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: pb while querying in strange db name

2002-03-28 Thread Todd Williamsen

You need to use the use command

Mysql \u [databasename]

Now you may run the query

Mysql select * FROM dbname.table;

-Original Message-
From: David yahoo [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 28, 2002 4:25 PM
Cc: [EMAIL PROTECTED]
Subject: pb while querying in strange db name


Hi all,

I ve got a database with the name 
db-name
when making : 
select * from db-name.table;
I get a error.
something is wrong in your syntex near : -name ...

How can I tell mysql that db-name is a database name ?

Thanks.




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


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

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


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

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




Re: hits

2002-03-28 Thread Alex Behrens

Ok thanks guys.

Thanks!

-Alex Big Al Behrens
E-mail: [EMAIL PROTECTED]
Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
Phone: 651-482-8779
Cell: 651-329-4187
Fax: 651-482-1391
ICQ: 3969599
Owner of the 3D-Unlimited Network:
http://www.3d-unlimited.com
Send News:
[EMAIL PROTECTED]
- Original Message -
From: Mike [EMAIL PROTECTED]
To: Alex Behrens [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 4:37 PM
Subject: Re: hits


 I don't think mysql has a feature like that. Check the manual at
 www.mysql.com.

 I think you will need to make another table to count the hits per
category.
 Then do a join between the two tables to get the results you want.

 Mike
 - Original Message -
 From: Alex Behrens [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 28, 2002 5:08 PM
 Subject: hits


  Hey Guys,
 
  I'm working on a script that displays reviews by a category for my site
 and
  I want the pull-down menu to be ordered by the amount of hits each
 category
  or review
  has, is it possible to sort by the amount of hits for a row value?
 
  My table is structured as follows:
 
  Name, Url, Author, E-mail, Number, Category, Description
 
  I want to be able to track the amount of hits per category and I the
same
  categories for displaying all reviews in the table.
 
  Does mysql integrate a function like this?
 
  Thanks!
  
  -Alex Big Al Behrens
  E-mail: [EMAIL PROTECTED]
  Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
  Phone: 651-482-8779
  Cell: 651-329-4187
  Fax: 651-482-1391
  ICQ: 3969599
  Owner of the 3D-Unlimited Network:
  http://www.3d-unlimited.com
  Send News:
  [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


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.330 / Virus Database: 184 - Release Date: 2/28/02


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

 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




huge sql dump strange file

2002-03-28 Thread David yahoo

Hi all,

I make a huge sql dump to mysql client
ie :
mysql  dump.sql

the dump.sql is nearly 650  MB.

I get some strange file near my table files :

12 -rw-rw1 mysqlmysql8678 mar 28 22:26
/var/lib/mysql/doz/#sql-9a8_17.frm
 63428 -rw-rw1 mysqlmysql64880640 mar 28 22:51
/var/lib/mysql/doz/#sql-9a8_17.MYD
129304 -rw-rw1 mysqlmysql132075520 mar 28 23:39
/var/lib/mysql/doz/#sql-9a8_17.MYI

can I delete them ?

Thanks.


_
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: hits

2002-03-28 Thread Mike

I don't think mysql has a feature like that. Check the manual at
www.mysql.com.

I think you will need to make another table to count the hits per category.
Then do a join between the two tables to get the results you want.

Mike
- Original Message -
From: Alex Behrens [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 5:08 PM
Subject: hits


 Hey Guys,

 I'm working on a script that displays reviews by a category for my site
and
 I want the pull-down menu to be ordered by the amount of hits each
category
 or review
 has, is it possible to sort by the amount of hits for a row value?

 My table is structured as follows:

 Name, Url, Author, E-mail, Number, Category, Description

 I want to be able to track the amount of hits per category and I the same
 categories for displaying all reviews in the table.

 Does mysql integrate a function like this?

 Thanks!
 
 -Alex Big Al Behrens
 E-mail: [EMAIL PROTECTED]
 Urgent E-mail: [EMAIL PROTECTED] (Please be brief!)
 Phone: 651-482-8779
 Cell: 651-329-4187
 Fax: 651-482-1391
 ICQ: 3969599
 Owner of the 3D-Unlimited Network:
 http://www.3d-unlimited.com
 Send News:
 [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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 2/28/02


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

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 REPLICATION

2002-03-28 Thread Steven Hajducko

Let's say A and B are running together.

Then someone does a large update query and A is done with, while B is in
the middle of it, and A crashes.

You can switch over to B, which won't contain the data, but it'll have a
good snapshot of what the data was before the crash.

When you recover the A machine, ( if you recover it.. ) and restart, B
will catch up from where A left off.  Remember, however, that if you
update B while A is down, A won't have that data. ( Which is what I
think you're asking about? )

This is like any backup solution or when you are replicating anywhere
for redundancy.  You can only backup so much before a crash happens. 
When you do crash, then you at least have a good starting point of data.

If you're asking about an actual recovery process.. Let's say B becomes
the master machine for awhile.  When the A machine is recovered, you
take a snapshot of B's data and put it over on A.  Then start A and have
it slave to B and it will catch up from that point.

If you want actual instructions, just think of creating A as a new slave
to B.  Follow the instructions in the mysql docs about creating a slave.

--
sh

On Thu, 2002-03-28 at 14:54, Joe Bifano wrote:
 I am trying to configure mysql for redundancy using replication and the
 built-in mysql master/slave configuration. What I don't understand, even
 after much reading, is how to recover from a failure. If host B is slave to
 host A, and A goes down, B could then be manually or automatically
 configured to be master itself, and thus take over A's role completely.
 However, if B was not completely caught up from A before the failure took
 place, then once A was back up the two would be out of sync, and A could
 contain data B did not, and B would undoubtedly contain data A did not. How
 do you avoid this situation or re-sync the two after a failure like this?
 
 I'm finding it difficult to locate a concise and cohesive method to create a
 redundant database system using mysql. Any other resources or references
 would be heartily appreciated.
 
 Joe
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



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

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




Re: how to check if table exists?

2002-03-28 Thread BD

At 06:20 AM 3/28/2002, you wrote:

On 27-Mar-2002 Ken Anderson wrote:
 
 
 
 
 
   What is the fastest way to check if a table exists?
   Do a select and catch the error?
   Try to create the table, and catch the error?
   Other options?
   Thanks,
   Ken

Yes, in php:

function tableexists($tbl) {
 $res = @mysql_query( SELECT count(*) FROM $tbl);
 return ($res ? true : false);
}

Don,
 There may be a way to improve your function. Change the select 
statement to Select 1 from $tbl LIMIT 1.  Because some table types like 
InnoDb will physically count the rows in the table and can take several 
seconds or even minutes. Selecting a constant is extremely fast especially 
with the LIMIT of 1. If the table doesn't exist you get an error. Works for 
me. ;-)

Brent


_
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: MYSQL REPLICATION

2002-03-28 Thread Scott Helms

Joe,

Replication is pretty much instantaneous (depending on network speed),
since the servers communicate using the binary log files.  Having said that,
there is no replication scheme for any database product that can guarantee
(over asynchronous replication) that some data won't be lost or mangled in
the event of a true problem.  If you are looking for this type of
replication, you have to go to hardware and synchronous networks (the
connection between the boxes is as fast as the local changes).  Since this
is a MySQL list, you probably aren't interested in huge EMC Symmetrix system
doing your replication ;)  To deal with the recovery process after the
fall simply take the data directory from the surviving slave and migrate
it to the master, restart the replication and off you go.  Please note that
this applies to current versions of MySQL (3.2x) and is changing the new
(4.x) tree.

Scott Helms

- Original Message -
From: Joe Bifano [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 5:54 PM
Subject: MYSQL REPLICATION


 I am trying to configure mysql for redundancy using replication and the
 built-in mysql master/slave configuration. What I don't understand, even
 after much reading, is how to recover from a failure. If host B is slave
to
 host A, and A goes down, B could then be manually or automatically
 configured to be master itself, and thus take over A's role completely.
 However, if B was not completely caught up from A before the failure took
 place, then once A was back up the two would be out of sync, and A could
 contain data B did not, and B would undoubtedly contain data A did not.
How
 do you avoid this situation or re-sync the two after a failure like this?

 I'm finding it difficult to locate a concise and cohesive method to create
a
 redundant database system using mysql. Any other resources or references
 would be heartily appreciated.

 Joe

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

 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




mysql fulltext index doesnt seems to do things

2002-03-28 Thread David yahoo

Hi all,

I have a uge table data about 700mb pii 333 200mb ram. mysql 4.02.
I try to add a full text index
alter table listing add fulltext (about,title,description);

but it seems to do noit effect the ib files in the datadir seems to keep the
same length no grow.
when querying it say no full text index for that columns

ERROR 1191: Can't find FULLTEXT index matching the column list

the mysql client seems to consume when asking for idexin via a
alter table listing add fulltext (about,title,description);
query.
so I kill him

what can i do ?

thanks.


_
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: RH 7.2 - mysql Problem !

2002-03-28 Thread Trond Eivind Glomsrød

Ian Linekrans [EMAIL PROTECTED] writes:

 Hi All !
 The configuration:
 
 - Redhat 7.2 (Enigma) pre-build installation.
 - Mysql with the following rpms installed:
   MySQL-3.23.49a-1.i386.rpm
   MySQL-client-3.23.49a-1.i386.rpm
 
 The installation and connection as root to the database server works
 fine but when changing the root password according to all the
  different ways as described by mysql manuals and then trying to
 reconnect results in the following error :
 
 ERROR 1045: Access denied for user: 'root@localhost' (Using password
 YES)
 Segmentation fault
 
 The same error message appears when changing the password for an another
 user in the database. Note if no password is set everything works fine !
 
 Soo whats is the deal !!!
 
 Anyone who has the same problem  - feel free to contact me if you have a
 solution.

You're using mysql rpms from MySQL - use the ones from Red Hat, they
are known to work well.

You should also be able to copy over the ones from the Skipjack beta
and use them - they are the latest version (49a doesn't seem to be a
tarball release, it was made because the binaries were bad
AFAIK. Wasn't a problem for us).
-- 
Trond Eivind Glomsrød
Red Hat, Inc.

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

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




auto_increment question

2002-03-28 Thread Jeff Habermann

This is my first time posting to this list, so please forgive me if I am not
doing this correctly.  I will break this into post into two parts: what i
want to know and why.  Is there a way to get auto_increment fields to fill
in gaps in the numbering sequence if some records have been deleted?

Here is an example of my problem:
I have two tables in MySQL:
1.web_hits:  date datetime not null, client mediumint unsigned not null, URL
varchar(500) not null
2.clients: idx mediumint unsigned not null unique auto_increment, name
varchar(255) not null

web_hits holds information about web traffic on our network.  There are
more fields that what i have listed, but this is all that is needed for this
example.  It records the time of the web hit, the URL, and the ID of person
who made the hit.  The ID can be looked up in the clients table.

Now, after a while the web_hits table starts to get really big, because of
this we start deleting the old entries from the web_hits table based on the
date field.  Because of this deletion some clients in the clients table may
not be used any more.  So we have a query that will delete those from the 
clients table as
well.  Now, because of this deletion, there are sequence gaps in the idx
field.  We would like to be able to use those numbers again for incoming
clients...Is this possible?

Thank you,
Jeff



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


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

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




Importing fixed-length records

2002-03-28 Thread David Yee

Hi.  How can I import a text file containing all fixed-length records into
MySQL?  Is there a way to do it with LOAD INFILE?  The text file was
originally designed for import into Oracle.  Thanks.

David


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

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: DRDB vs. MySQL replication

2002-03-28 Thread Jeremy Zawodny

On Thu, Mar 28, 2002 at 09:37:47AM +0300, Peter Zaitsev wrote:

 Also a good thing with DRBD you will not have to store and track
 replication log files and the setup will not require to take MySQL
 down to copy the snapshot of database.

Why would you need to take down MySQL for a backup (assuming you use
MyISAM tables at least)?
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.47-max: up 49 days, processed 1,405,071,328 queries (329/sec. avg)

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

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




client dependent timezone

2002-03-28 Thread Maxim Vysotskiy

Hello mysql,

So nobody here (even at MySQL AB) knows how to set a timezone for a
MySQL client ? Not for whole server but per client? (or maybe for
database???)
I already posted this question here few days ago - and didn't get any
reply.
Please! Somebody help!

-- 
Best regards,
 Maxim  mailto:[EMAIL PROTECTED]


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

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




filemaker to mysql

2002-03-28 Thread rory oconnor

I have a new client that wants to use filemaker on his mac to enter data
for site information.  I'm sure that I can take that and export the
files and import into the site's MySQL database...but I'm wondering if
it is possible to link his filemaker database to the MySQL database
using ODBC?  I have done this with MS Access on a PC, but not filemaker
on a mac.

Has anybody done this or know where I can get more information?

Thanks!

Rory


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

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: client dependent timezone

2002-03-28 Thread Gerald R. Jensen

Per client? Per database? The only timezone setting in the MySQL manual is
for the server (tz), and permits you to set it to your local timezone so it
does not return values in GMT.

If you want clients to have different timezones, perhaps you should write
that capabilty into your front-end application.

Gerald Jensen

- Original Message -
From: Maxim Vysotskiy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 6:46 PM
Subject: client dependent timezone


Hello mysql,

So nobody here (even at MySQL AB) knows how to set a timezone for a
MySQL client ? Not for whole server but per client? (or maybe for
database???)
I already posted this question here few days ago - and didn't get any
reply.
Please! Somebody help!

--
Best regards,
 Maxim  mailto:[EMAIL PROTECTED]


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

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




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

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




Re[2]: client dependent timezone

2002-03-28 Thread Maxim Vysotskiy

Hello Gerald,

But how people build web-applications then ? How can you use
web-hosting in GMT+1 if web-application will be in use in GMT+5 for
example?
Have anybody an experience of resolving this problem (without
embedding this functionality to backend app, because backend app is
allready contains ~2 lines of code, and somewhere near to 1000
queries).

If someone knows how to play this around - please help!

Friday, March 29, 2002, 3:02:57 AM, you wrote:

GRJ Per client? Per database? The only timezone setting in the MySQL manual is
GRJ for the server (tz), and permits you to set it to your local timezone so it
GRJ does not return values in GMT.

GRJ If you want clients to have different timezones, perhaps you should write
GRJ that capabilty into your front-end application.

GRJ Gerald Jensen

GRJ - Original Message -
GRJ From: Maxim Vysotskiy [EMAIL PROTECTED]
GRJ To: [EMAIL PROTECTED]
GRJ Sent: Thursday, March 28, 2002 6:46 PM
GRJ Subject: client dependent timezone


GRJ Hello mysql,

GRJ So nobody here (even at MySQL AB) knows how to set a timezone for a
GRJ MySQL client ? Not for whole server but per client? (or maybe for
GRJ database???)
GRJ I already posted this question here few days ago - and didn't get any
GRJ reply.
GRJ Please! Somebody help!

GRJ --
GRJ Best regards,
GRJ  Maxim  mailto:[EMAIL PROTECTED]


-- 
Best regards,
 Maximmailto:[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]: client dependent timezone

2002-03-28 Thread Maxim Vysotskiy

Hello Gerald,

But how people build web-applications then ? How can you use
web-hosting in GMT+1 if web-application will be in use in GMT+5 for
example?
Have anybody an experience of resolving this problem (without
embedding this functionality to backend app, because backend app is
allready contains ~2 lines of code, and somewhere near to 1000
queries).

If someone knows how to play this around - please help!

Friday, March 29, 2002, 3:02:57 AM, you wrote:

GRJ Per client? Per database? The only timezone setting in the MySQL manual is
GRJ for the server (tz), and permits you to set it to your local timezone so it
GRJ does not return values in GMT.

GRJ If you want clients to have different timezones, perhaps you should write
GRJ that capabilty into your front-end application.

GRJ Gerald Jensen

GRJ - Original Message -
GRJ From: Maxim Vysotskiy [EMAIL PROTECTED]
GRJ To: [EMAIL PROTECTED]
GRJ Sent: Thursday, March 28, 2002 6:46 PM
GRJ Subject: client dependent timezone


GRJ Hello mysql,

GRJ So nobody here (even at MySQL AB) knows how to set a timezone for a
GRJ MySQL client ? Not for whole server but per client? (or maybe for
GRJ database???)
GRJ I already posted this question here few days ago - and didn't get any
GRJ reply.
GRJ Please! Somebody help!

GRJ --
GRJ Best regards,
GRJ  Maxim  mailto:[EMAIL PROTECTED]


-- 
Best regards,
 Maximmailto:[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




Help with JOIN query

2002-03-28 Thread Jeff Habermann

What i want to do seems simple, but i can not for the life of me figure out
how to do it.
Tables:  These tables are not related in any way.

A
--
1
2
3
4
5

B
--
1,Bob
3,Jack
7,Janet
8,Gary
9,Kelly

I would like to combine tables A and B with a SELECT statement to get this:

SELECT
--
1,1,Bob
2,3,Jack
3,7,Janet
4,8,Gary
5,9,Kelly

So basically i want to join two tables, but i dont have anything to match
on...Basically, i am trying to take a column from one table and add it to
another table for a SELECT statement.  I am not sure if JOIN is even what i
am looking for here.  To do this, i am assuming both tables have the exact
same number of records.
Any ideas on how i can do this?

Thanks,
Jeff

SQL query


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


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

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




Two tables, which did not match?

2002-03-28 Thread Daniel Smith


I have a question about determining which case
occurred when there are no matches - using two tables.

Scenario:
- two tables, one for photos, and one for collections
- zero or more photos can belong to a collection
- the database may not know the collection_id requested
 (i.e. the user on the browser side did something to request
 a non-existent collection)

We can hit:
a) no collection
b) a collection that hasn't had any photos moved/uploaded to it yet, or..
c) a collection with one or more photos (the normal, everything's fine case)

Here's the php setting up the query...

// shortened version for posting question...
// there are many more fields...
$sql_str =EOD
select
photo.photo_id AS photo_id,
collection.collection_dir AS collection_dir
from photo, collection
where photo.collection_id = $collection
and collection.collection_id = $collection
EOD;
$sql_result = $db-query($sql_str);

When I check the number of rows returned, and get
0, I have no way (yet) of knowing why (no collection,
or just no photos in a collection).

Should I be using COUNT/GROUP BY?

thanks for any ideas!

-- 
Daniel L. Smith - [EMAIL PROTECTED] - Sonoma County, CA
AIM: JavaE36M3  ICQ: 12834734
http://resume.daniel.org






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

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




AJP News 28-03-2002 dla mysql

2002-03-28 Thread AJP

*** WYSYKA JEDNORAZOWA - PRZEPRASZAMY JEELI NIE TRAFILIMY W PASTWA ZAINTERESOWANIA 
***

Wraz z najlepszymi yczeniami witecznymi przekazujemy za porednictwem Pastwa konta 
e-mail ([EMAIL PROTECTED]) krtki przegld atrakcji z naszej oferty:

1. Dla Twojego DOMU I RODZINY proponujemy projektor multimedialny (do komputera, TV, 
video, kamery, DVD) SHARP PG-M15S w cenie 10'990 + odtwarzacz DVD GRATIS !!!

2. Jeeli prowadzisz MA FIRM LUB BIURO pomoemy zadba o niski koszt Twoich kopii i 
wydrukw proponujc kopiarko-drukark cyfrow SHARP AR-121 (format A4, prdko 12 
kopii/min.) ktra:
- jako drukarka laserowa GDI jest o 60% tasza w eksploatacji od najpopularniejszych 
drukarek laserowych dostpnych na rynku
- jako kopiarka daje gwarancj niskich kosztw eksploatacji (w odrnieniu do kopiarek 
wykorzystujcych kardrid)
- pomoe Tobie uzyska kopi/wydruk znakomitej, cyfrowej jakoci (600 DPI) w trybie 
FOTO
Interesujca jest niespotykana dotychczas cena kopiarki cyfrowej SHARP AR-121 z 
moduem drukarki laserowej: 2'890 z !!! (w wersji kopiarki cyfowej bez druku 
komputerowego: 2'490 z).

3. Dla posiadajcych WIKSZE POTRZEBY mamy w ofercie promocyjnej cyfrow 
kopiarko-drukark sieciow SHARP AR-235 (format A3, prdko 23 kopie/min., pami 
16MB, duplex, sorter elektroniczny, karta sieciowa, modu druku PCL6, dwustronny 
podajnik oryginaw). Cena tak bogato wyposaonego centrum druku/kopiowania Twojej 
Firmy zamyka si w atrakcyjnej kwocie 18'990 z, a zakup premiowany jest 100Hz 
TELEWIZOREM 28 marki SHARP !!!
* do wszystkich podanych cen naley doliczy podatek VAT 22%

Proponujemy Pastwu rwnie atrakcyjne formy finansowania oraz uytkowania urzdze 
kopiujcych - leasing lub dzierawa patna za kopie.  

Zapraszamy do zapoznania si z pen ofert naszej firmy: 
www.ajp-supplies.pl/oferta.html oraz pozostaymi promocjami: 
www.ajp-supplies.pl/promocje.html dostpnymi w sieci naszych oddziaw 
www.ajp-supplies.pl/oddzialy.html 




Pastwa adres e-mail zosta pozyskany z internetowej bazy adresw e-mail. Mamy 
nadziej, e przesane informacje znajduj si w obszarze Pastwa zainteresowa - 
jeeli nie serdecznie przepraszamy.
Wiadomo nadano na adres e-mail publicznie dostpny w Internecie zgodnie z art. 25, 
ust. 2, pkt 2 Ustawy o ochronie danych osobowych (Dz.U. nr 133, poz. 883 z dnia 29 
sierpnia 1997 r. z pniejszymi zmianami).

MateriayEksploatacyjneAJP  Sp. z o.o.
AUTORYZOWANY  DYSTRYBUTOR  SHARP
WARSZAWA * POZNA * KRAKW * GDYNIA
tel./fax (061) 66-32-797;  www.ajp-supplies.pl


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

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




database design

2002-03-28 Thread @Basebeans.com

Subject: database design
From: deco [EMAIL PROTECTED]
 ===
I'm having a problem getting this to fit...

I have a file with a bunch of data stored... This data represents messages,
one after the other, with message header followed by message data.

I'm porting this to a mysql database. The thing is the message data is
defined in an external file, which defines foi each message type a bunch of
fields that can be double, long, short, ushort, etc...
I can parse this file easily, and i'm storing this data in java with no
difficulty.

The thing is: My DB would be something like:
A table holding data types (not programming types, but data types), which
holds information about every type that can appear in a file...
Another one where values read from the file are stored, with a foreign key
to the corresponding data type.

Thing is: if the value for this data types can be a double, or a long, or
a char, or a short, if my table is like (data_type, value) what field type
would i give to value? Cause it can be a lot of things. I can put the
biggest one, but then i would be using a lot more space to hold the db than
i would need.

I was hoping for some possibility of a dynamic size field, that could answer
to my needs... Maybe i'll need to set it as a binary object or something.
Any help?

Thanks in advance
Ricardo Rocha



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

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]: client dependent timezone

2002-03-28 Thread Gerald R. Jensen

Depends on the language you are writing in, and the level of your
programming skills.

If your users/guests have database entries, it would be a rather trivial
task to set their timezone in a column in the database, then write your app
to calculate their local time based on the offset from GMT. You would either
have to rely on the user to use a form or image map of some sort to select a
timezone (ala Red Hat's installer), or devise a way to ready the clock on
their local machine.

IMHO, this is a programming problem as opposed to a MySQL database issue.


- Original Message -
From: Maxim Vysotskiy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 28, 2002 7:14 PM
Subject: Re[2]: client dependent timezone


Hello Gerald,

But how people build web-applications then ? How can you use
web-hosting in GMT+1 if web-application will be in use in GMT+5 for
example?
Have anybody an experience of resolving this problem (without
embedding this functionality to backend app, because backend app is
allready contains ~2 lines of code, and somewhere near to 1000
queries).

If someone knows how to play this around - please help!

Friday, March 29, 2002, 3:02:57 AM, you wrote:

GRJ Per client? Per database? The only timezone setting in the MySQL manual
is
GRJ for the server (tz), and permits you to set it to your local timezone
so it
GRJ does not return values in GMT.

GRJ If you want clients to have different timezones, perhaps you should
write
GRJ that capabilty into your front-end application.

GRJ Gerald Jensen

GRJ - Original Message -
GRJ From: Maxim Vysotskiy [EMAIL PROTECTED]
GRJ To: [EMAIL PROTECTED]
GRJ Sent: Thursday, March 28, 2002 6:46 PM
GRJ Subject: client dependent timezone


GRJ Hello mysql,

GRJ So nobody here (even at MySQL AB) knows how to set a timezone for a
GRJ MySQL client ? Not for whole server but per client? (or maybe for
GRJ database???)
GRJ I already posted this question here few days ago - and didn't get any
GRJ reply.
GRJ Please! Somebody help!

GRJ --
GRJ Best regards,
GRJ  Maxim  mailto:[EMAIL PROTECTED]


--
Best regards,
 Maximmailto:[EMAIL PROTECTED]


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

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




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

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




PHP4, Mysql , Apache and RedHat Linux 7.x, URGENT! HELP!!

2002-03-28 Thread Admin/Admin

Hi all,
I have installed a clean RedHatLinux 7.1, and 7.2, and have selected
the PHP and mysqlshare components to install. I also have configured the
httpd.conf to use the php modules with Override ALL option. But when I want
to run any php, including the one that need to access the mysql server,
only the source code are shown, but not exdecute the PHP. Rather I update
the apache and PHP or not, still the same result. How to configure the
httpd.conf or php.ini or anything else to make the PHP run? Or anyone who
have experience on running PHP in RedHat Linux 7.x??


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

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: auto_increment question

2002-03-28 Thread Joel Rees
Jeff Habermann asked:

 well.  Now, because of this deletion, there are sequence gaps in the "idx"
 field.  We would like to be able to use those numbers again for incoming
 clients...Is this possible?

It looks like you can, but IMHO, it would probably be more effective to add
a DELETED flag to your records, and just have your routine that adds new
records look for records with the DELETED flag set before it tries an
insert. The WHERE clauses in your normal queries would include 'DELETED = 0'
to filter out the deleted records.

Another possibility is to make your index (in this case, client ID) so huge
that you don't care if there are gaps. An unsigned INT (instead of
MEDIUMINT) will give you so many keys that it will take over thirteen years
at an average ten new clients per second to overflow.

Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka




sql, query




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

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


Re: Importing fixed-length records

2002-03-28 Thread Joel Rees

David Yee queried:


 Hi.  How can I import a text file containing all fixed-length records into
 MySQL?  Is there a way to do it with LOAD INFILE?  The text file was
 originally designed for import into Oracle.  Thanks.

http://www.mysql.com/doc/ 'import' SEARCH/

http://www.mysql.com/doc/m/y/mysqlimport.html
4.8.7 mysqlimport, Importing Data from Text Files

Mysqlimport provides a command-line interface to the LOAD DATA INFILE SQL
statement. Most options to mysqlimport correspond directly to the same
options to LOAD DATA INFILE. See section 6.4.9 LOAD DATA INFILE Syntax.

LINK/

http://www.mysql.com/doc/L/O/LOAD_DATA.html
6.4.9 LOAD DATA INFILE Syntax

etc/

HTH

Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka



sql, query



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

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




  1   2   >