Advice please

2002-12-02 Thread George Pitcher
Hi,

I am about to start the planning process in moving my FileMaker/Lasso/PHP
site over to MySQL/PHP.

Before I get too far down the road, should I be using InnoDB or MyISAM
tables? The service is initially going to be hosted on WinNT but may move
over to Linux later.

My main database has about 21000 records (but 400+ fields). The number of
fields will decrease to less than 100 in the normalisation process with
FileMaker's internal calculations/scrips being handled by eithe MySQL
functions or PHP routines.

I built  prototype about 9 months ago using MyISAM and although it was OK I
am wondering if there are any benefits/drawbacks of using InnoDB instead.
The prototype is pretty much out of date now as the FileMker dn has moved on
in leaps and bounds since then. On top of that the requirement is now to
interact more with the company's other databases (MySQL and Oracle).

Any comments would be welcome.

George


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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

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




how to abort a query

2002-12-02 Thread Andreas Metzner
Hi all,

I want to give the user of a client app
the possibility of aborting a query, that
was wrong or took too much time etc.

mySQL doc says the only way to do this,
is to kill the whole connection from another
thread (Win32).

When I do this, the killing thread crashes
before returning from mysql_kill (..)

Any idea ?

Andreas Metzner
MAN Roland AG

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

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




Users and their priveleges in a mySQL Database

2002-12-02 Thread Andi S. Giri
Hello

Can mysql have different tables for different users ? Say user 'TEST1'
creates a table called 'XYZ' and also user 'TEST2' creates the same table
name 'XYZ'

Is it allowed ? If it is, can this two tables can be accesed by a third user
say 'Superuser' provided the priveleges are given by 'TEST1' and 'TEST2' ?

This is similar to schema objects (USER_OBJECTS) in ORACLE.

Andi Giri


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

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




Re: mysql and php

2002-12-02 Thread Jerry M . Howell II
Thank you Daniel,

   You remided me that I once had a page with the following instead mysql_error()
and that gave me the verbosity that I needed to get things working. Looks like my
wife changed some fields in the database without thinking how they might affect the
script. Can't believe I didn't compare the database to the script in the first place.
gr

On Mon, 2 Dec 2002 23:34:45 -0500
Jerry M. Howell II <[EMAIL PROTECTED]> wrote:

> Error in input query
> 
>  start of php database code *
> 
> $connection = mysql_connect("localhost", "hostbyk1_admin",
> "") or
> die("Invalid
> server or user");
> mysql_select_db("hostbyk1_order",$connection);
> 
> / ***
> Make sure you replace USERS with your table name
> ***/
> $query = "insert into client
> (  last_name,first_name,address,city,
> state,country,zip,phone,email,
> refer,ip_address,package,domain,color,due_date)·
> values('$last_name','$first_name','$address','$city',
> '$state','$country','$zip','$phone','$email',
> '$refer','$ip','$package','$domain','$color','$due_date')";
> /* **
> this is what does the work, if you get this error, you know you·
> connected to the dbase, but something is wrong with your query
> ***/
> $result = mysql_query($query,$connection)or die("Error in input
> query");
>  End of php database code *
> 
> as you can see the username is hostbyk1_admin
> 
> password I actualy changed for obvious reasons
> 
> the database I'm trying to acsess is hostbyk1_order
> 
> and the table name is client
> 
> I also tested it from the command line and can access the
> database just fine
> it might be a scripting error but I've searched the web for
> templates and they
> all seem to use this format so I'm stumped
> 
> On Mon, 2 Dec 2002 23:59:35 -0500
> daniel <[EMAIL PROTECTED]> wrote:
> 
> > this is a vague one , would be good to copy and paste the php debug message
> > >= Original Message From Jerry M. Howell II <[EMAIL PROTECTED]> =
> > >Hello all,
> > >
> > >   We are leasing a dedicated server and seem to pe having problems getting 
> > our
> > >php script working with mysql. The script was working fine with the last 
> > server
> > >we were on so I'm wondering if you all have any sugestions. We are hosting on 
> > a
> > >redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
> > >MySQL-client-3.23.53a-1.i386.rpm
> > >MySQL-devel-3.23.53a-1.i386.rpm
> > >MySQL-shared-3.23.53a-1.i386.rpm
> > >
> > >We have talked to the ppl that set the server up and they assure us it's a 
> > scripting
> > >error with our php file. That script I will save for the php list unless you 
> > all feal
> > >it's nessisary topost it here. Is there any permision issues I should look 
> > into or
> > >something they might have overlooked in the install? I apreciate any help I 
> > can get
> > >on this issue.
> > >
> > >thnx
> > >--
> > >Jerry M. Howell II
> > >
> > >-
> > >Before posting, please check:
> > >   http://www.mysql.com/manual.php   (the manual)
> > >   http://lists.mysql.com/   (the list archive)
> > >
> > >To request this thread, e-mail <[EMAIL PROTECTED]>
> > >To unsubscribe, e-mail 
> > <[EMAIL PROTECTED]>
> > >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Jerry M. Howell II
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> 


-- 
Jerry M. Howell II

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

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




Re: mysql and php

2002-12-02 Thread Alex Pukinskis
Why not change your error message display so it's more informative? 
Instead of

	die("Error in input query");

try this:

	or die ("Error in input query: " . mysql_error() . "($query)");

That way, you can see exactly what MySQL says the error was, and exactly 
how the query came out.  It's really hard to debug this sort of thing 
without seeing the fully formed query.

-Alex

On Monday, December 2, 2002, at 09:34  PM, Jerry M.Howell II wrote:

Error in input query

 start of php database code *

$connection = mysql_connect("localhost", "hostbyk1_admin",
"") or
die("Invalid
server or user");
mysql_select_db("hostbyk1_order",$connection);

/ ***
Make sure you replace USERS with your table name
***/
$query = "insert into client
(  last_name,first_name,address,city,
state,country,zip,phone,email,
refer,ip_address,package,domain,color,due_date)·
values('$last_name','$first_name','$address','$city',
'$state','$country','$zip','$phone','$email',
'$refer','$ip','$package','$domain','$color','$due_date')";
/* **
this is what does the work, if you get this error, you know you·
connected to the dbase, but something is wrong with your query
***/
$result = mysql_query($query,$connection)or die("Error in input
query");
 End of php database code *

as you can see the username is hostbyk1_admin

password I actualy changed for obvious reasons

the database I'm trying to acsess is hostbyk1_order

and the table name is client

I also tested it from the command line and can access the
database just fine
it might be a scripting error but I've searched the web for
templates and they
all seem to use this format so I'm stumped

On Mon, 2 Dec 2002 23:59:35 -0500
daniel <[EMAIL PROTECTED]> wrote:


this is a vague one , would be good to copy and paste the php debug 
message
= Original Message From Jerry M. Howell II 
<[EMAIL PROTECTED]> =
Hello all,

  We are leasing a dedicated server and seem to pe having problems 
getting
our

php script working with mysql. The script was working fine with the 
last
server

we were on so I'm wondering if you all have any sugestions. We are 
hosting on
a

redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they 
have
MySQL-client-3.23.53a-1.i386.rpm
MySQL-devel-3.23.53a-1.i386.rpm
MySQL-shared-3.23.53a-1.i386.rpm

We have talked to the ppl that set the server up and they assure us 
it's a
scripting

error with our php file. That script I will save for the php list 
unless you
all feal

it's nessisary topost it here. Is there any permision issues I should 
look
into or

something they might have overlooked in the install? I apreciate any 
help I
can get

on this issue.

thnx
--
Jerry M. Howell II

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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail

<[EMAIL PROTECTED]>

Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php








--
Jerry M. Howell II

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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail 
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: I don't understand this error!

2002-12-02 Thread Freedom Advocate
On Tuesday 03 December 2002 12:21 am, daniel wrote:
> INSERT INTO (comment_lines)
> VALUES('02075030009219','09','20','35','N','','3','');
>
> maybe even that
>
> >= Original Message From daniel <[EMAIL PROTECTED]> =
> >INSERT INTO comment_lines VALUES('02075030009219','09','20','35','N','
> >','3','');

But the previous thousands of lines had no problem. The 3 is the line
number and is defined as a mediumint(5) unsigned and shouldn't require ' and
'. I'm more concerned because the data in the error command is not contained
in the line number that it applies to or the one before or after it.

James
mysql SQL sql (how come insert and into don't work?)



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

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




RE: I don't understand this error!

2002-12-02 Thread daniel
INSERT INTO (comment_lines) 
VALUES('02075030009219','09','20','35','N','','3','');

maybe even that
>= Original Message From daniel <[EMAIL PROTECTED]> =
>INSERT INTO comment_lines VALUES('02075030009219','09','20','35','N','
>','3','');
>
>try that u didnt seem to have quortation around the 3
>>= Original Message From Freedom Advocate <[EMAIL PROTECTED]> =
>>This is the command I am having problems with and the error that I am
>getting.
>>What follows is some things I did to troubleshoot this problem. I can't see
>>any problems with the SQL and as I note below, the line works fine when I
>>apply it to the DB after getting the error. Help!
>>
>>[root@Casey root]# mysql -u root -p < po_file
>>Enter password:
>>ERROR 1064 at line 950282: You have an error in your SQL syntax near
>>'02075030009219','09','20','35','N',' ',00013,'
>>  ',00.9500,00.6318,'' at line 1
>>
>>/* This is the line before the error occurs and the command used to get 
it.*/
>>[root@Casey root]# cat -n po_file | grep 950281 | more
>>950281  INSERT INTO comment_lines
>>VALUES('02075030009219','09','20','35','N'
>>,' ',2,'REQUISITIONED BY BILLYBOB
>>');
>>
>>/* Here is the bad line 950282 below. I put it into it's own test file and
>>tried the command line again.  Didn't get an error (with empty and all
>>previous data. */
>>[root@Casey root]# cat test.sql
>>use purchase_orders;
>>INSERT INTO comment_lines VALUES('02075030009219','09','20','35','N'
>>,' ',3,'');
>>
>>
>>/* This is the line after the error occurs and the command used to get it.*/
>>[root@Casey root]# cat -n po_file | grep 950283 | more
>>950283  INSERT INTO comment_lines
>>VALUES('02075030009219','09','20','35','N'
>>,' ',4,'');
>>
>>
>>mysql> describe comment_lines;
>>+---+---+--+-+-+---+
>>| Field | Type  | Null | Key | Default | Extra |
>>+---+---+--+-+-+---+
>>| po_index  | varchar(18)   |  | PRI | |   |
>>| batch_month   | char(2)   |  | PRI | 0   |   |
>>| batch_day | char(2)   |  | PRI | 0   |   |
>>| batch_number  | char(2)   |  | PRI | 0   |   |
>>| changed_indicator | char(1)   |  | | |   |
>>| maintenance_code  | char(1)   |  | | |   |
>>| line_number   | mediumint(5) unsigned |  | PRI | 0   |   |
>>| comment   | varchar(40)   |  | | |   |
>>+---+---+--+-+-+---+
>>
>>
>>
>>root@Casey root]# ls -al po_file
>>-rw-r--r--1 root root 468787771 Dec  2 20:56 po_file
>>
>>
>>
>>-
>>Before posting, please check:
>>   http://www.mysql.com/manual.php   (the manual)
>>   http://lists.mysql.com/   (the list archive)
>>
>>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: mysql and php

2002-12-02 Thread Jerry M . Howell II
Error in input query

 start of php database code *

$connection = mysql_connect("localhost", "hostbyk1_admin",
"") or
die("Invalid
server or user");
mysql_select_db("hostbyk1_order",$connection);

/ ***
Make sure you replace USERS with your table name
***/
$query = "insert into client
(  last_name,first_name,address,city,
state,country,zip,phone,email,
refer,ip_address,package,domain,color,due_date)·
values('$last_name','$first_name','$address','$city',
'$state','$country','$zip','$phone','$email',
'$refer','$ip','$package','$domain','$color','$due_date')";
/* **
this is what does the work, if you get this error, you know you·
connected to the dbase, but something is wrong with your query
***/
$result = mysql_query($query,$connection)or die("Error in input
query");
 End of php database code *

as you can see the username is hostbyk1_admin

password I actualy changed for obvious reasons

the database I'm trying to acsess is hostbyk1_order

and the table name is client

I also tested it from the command line and can access the
database just fine
it might be a scripting error but I've searched the web for
templates and they
all seem to use this format so I'm stumped

On Mon, 2 Dec 2002 23:59:35 -0500
daniel <[EMAIL PROTECTED]> wrote:

> this is a vague one , would be good to copy and paste the php debug message
> >= Original Message From Jerry M. Howell II <[EMAIL PROTECTED]> =
> >Hello all,
> >
> >   We are leasing a dedicated server and seem to pe having problems getting 
> our
> >php script working with mysql. The script was working fine with the last 
> server
> >we were on so I'm wondering if you all have any sugestions. We are hosting on 
> a
> >redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
> >MySQL-client-3.23.53a-1.i386.rpm
> >MySQL-devel-3.23.53a-1.i386.rpm
> >MySQL-shared-3.23.53a-1.i386.rpm
> >
> >We have talked to the ppl that set the server up and they assure us it's a 
> scripting
> >error with our php file. That script I will save for the php list unless you 
> all feal
> >it's nessisary topost it here. Is there any permision issues I should look 
> into or
> >something they might have overlooked in the install? I apreciate any help I 
> can get
> >on this issue.
> >
> >thnx
> >--
> >Jerry M. Howell II
> >
> >-
> >Before posting, please check:
> >   http://www.mysql.com/manual.php   (the manual)
> >   http://lists.mysql.com/   (the list archive)
> >
> >To request this thread, e-mail <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> 
> 


-- 
Jerry M. Howell II

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

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




RE: I don't understand this error!

2002-12-02 Thread daniel
INSERT INTO comment_lines VALUES('02075030009219','09','20','35','N',' 
','3','');

try that u didnt seem to have quortation around the 3
>= Original Message From Freedom Advocate <[EMAIL PROTECTED]> =
>This is the command I am having problems with and the error that I am 
getting.
>What follows is some things I did to troubleshoot this problem. I can't see
>any problems with the SQL and as I note below, the line works fine when I
>apply it to the DB after getting the error. Help!
>
>[root@Casey root]# mysql -u root -p < po_file
>Enter password:
>ERROR 1064 at line 950282: You have an error in your SQL syntax near
>'02075030009219','09','20','35','N',' ',00013,'
>  ',00.9500,00.6318,'' at line 1
>
>/* This is the line before the error occurs and the command used to get it.*/
>[root@Casey root]# cat -n po_file | grep 950281 | more
>950281  INSERT INTO comment_lines
>VALUES('02075030009219','09','20','35','N'
>,' ',2,'REQUISITIONED BY BILLYBOB
>');
>
>/* Here is the bad line 950282 below. I put it into it's own test file and
>tried the command line again.  Didn't get an error (with empty and all
>previous data. */
>[root@Casey root]# cat test.sql
>use purchase_orders;
>INSERT INTO comment_lines VALUES('02075030009219','09','20','35','N'
>,' ',3,'');
>
>
>/* This is the line after the error occurs and the command used to get it.*/
>[root@Casey root]# cat -n po_file | grep 950283 | more
>950283  INSERT INTO comment_lines
>VALUES('02075030009219','09','20','35','N'
>,' ',4,'');
>
>
>mysql> describe comment_lines;
>+---+---+--+-+-+---+
>| Field | Type  | Null | Key | Default | Extra |
>+---+---+--+-+-+---+
>| po_index  | varchar(18)   |  | PRI | |   |
>| batch_month   | char(2)   |  | PRI | 0   |   |
>| batch_day | char(2)   |  | PRI | 0   |   |
>| batch_number  | char(2)   |  | PRI | 0   |   |
>| changed_indicator | char(1)   |  | | |   |
>| maintenance_code  | char(1)   |  | | |   |
>| line_number   | mediumint(5) unsigned |  | PRI | 0   |   |
>| comment   | varchar(40)   |  | | |   |
>+---+---+--+-+-+---+
>
>
>
>root@Casey root]# ls -al po_file
>-rw-r--r--1 root root 468787771 Dec  2 20:56 po_file
>
>
>
>-
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
<[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



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

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




RE: mysql and php

2002-12-02 Thread daniel
this is a vague one , would be good to copy and paste the php debug message
>= Original Message From Jerry M. Howell II <[EMAIL PROTECTED]> =
>Hello all,
>
>   We are leasing a dedicated server and seem to pe having problems getting 
our
>php script working with mysql. The script was working fine with the last 
server
>we were on so I'm wondering if you all have any sugestions. We are hosting on 
a
>redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
>MySQL-client-3.23.53a-1.i386.rpm
>MySQL-devel-3.23.53a-1.i386.rpm
>MySQL-shared-3.23.53a-1.i386.rpm
>
>We have talked to the ppl that set the server up and they assure us it's a 
scripting
>error with our php file. That script I will save for the php list unless you 
all feal
>it's nessisary topost it here. Is there any permision issues I should look 
into or
>something they might have overlooked in the install? I apreciate any help I 
can get
>on this issue.
>
>thnx
>--
>Jerry M. Howell II
>
>-
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
>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 and php

2002-12-02 Thread Jerry M . Howell II
Hello all,

   We are leasing a dedicated server and seem to pe having problems getting our
php script working with mysql. The script was working fine with the last server
we were on so I'm wondering if you all have any sugestions. We are hosting on a
redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
MySQL-client-3.23.53a-1.i386.rpm
MySQL-devel-3.23.53a-1.i386.rpm
MySQL-shared-3.23.53a-1.i386.rpm

We have talked to the ppl that set the server up and they assure us it's a scripting
error with our php file. That script I will save for the php list unless you all feal
it's nessisary topost it here. Is there any permision issues I should look into or
something they might have overlooked in the install? I apreciate any help I can get
on this issue.

thnx
-- 
Jerry M. Howell II

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

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: ATAF 6.0 is released and is ready to be downloaded FORWINDOWS USERS!

2002-12-02 Thread Jan Steinman
>From: <[EMAIL PROTECTED]>
>
>I'm writing to inform you that ATAF version 6.0 is released today, and is ready to be 
>downloaded...

Since many folks on this list are using various UNIX versions, you should mention 
prominently that this is a Windows-centric product -- a fact that is rather deeply 
buried on your website, which I did not search out until I discovered I was 
downloading a ".zip" file.

 SQL SQL QSL LQS LSQ 
-- 
: Jan Steinman -- nature Transography(TM): 
: Bytesmiths -- artists' services: 
: Buy My Step Van! 

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

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




I don't understand this error!

2002-12-02 Thread Freedom Advocate
This is the command I am having problems with and the error that I am getting. 
What follows is some things I did to troubleshoot this problem. I can't see 
any problems with the SQL and as I note below, the line works fine when I 
apply it to the DB after getting the error. Help!

[root@Casey root]# mysql -u root -p < po_file
Enter password:
ERROR 1064 at line 950282: You have an error in your SQL syntax near 
'02075030009219','09','20','35','N',' ',00013,'
  ',00.9500,00.6318,'' at line 1

/* This is the line before the error occurs and the command used to get it.*/
[root@Casey root]# cat -n po_file | grep 950281 | more
950281  INSERT INTO comment_lines 
VALUES('02075030009219','09','20','35','N'
,' ',2,'REQUISITIONED BY BILLYBOB
');

/* Here is the bad line 950282 below. I put it into it's own test file and
tried the command line again.  Didn't get an error (with empty and all 
previous data. */
[root@Casey root]# cat test.sql
use purchase_orders;
INSERT INTO comment_lines VALUES('02075030009219','09','20','35','N'
,' ',3,'');


/* This is the line after the error occurs and the command used to get it.*/
[root@Casey root]# cat -n po_file | grep 950283 | more
950283  INSERT INTO comment_lines 
VALUES('02075030009219','09','20','35','N'
,' ',4,'');


mysql> describe comment_lines;
+---+---+--+-+-+---+
| Field | Type  | Null | Key | Default | Extra |
+---+---+--+-+-+---+
| po_index  | varchar(18)   |  | PRI | |   |
| batch_month   | char(2)   |  | PRI | 0   |   |
| batch_day | char(2)   |  | PRI | 0   |   |
| batch_number  | char(2)   |  | PRI | 0   |   |
| changed_indicator | char(1)   |  | | |   |
| maintenance_code  | char(1)   |  | | |   |
| line_number   | mediumint(5) unsigned |  | PRI | 0   |   |
| comment   | varchar(40)   |  | | |   |
+---+---+--+-+-+---+



root@Casey root]# ls -al po_file
-rw-r--r--1 root root 468787771 Dec  2 20:56 po_file



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

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




Changing directory from which SOURCE reads SQL script files.

2002-12-02 Thread John Connolly
Hi all:

	Using script files is convenient because it allows storage of 
frequently used queries, and facilitates editing long queries without 
having to retype the whole thing.

	Something that would make script files more convenient is to change 
the directory from which SOURCE reads them.

	My databases (probably everyone's?) are located in the directory:

	/usr/local/mysql/

	It is in this directory that SOURCE looks for script files. Thus the 
command:

	mysql> SOURCE home_runs.sql

	looks for the script file:

	/usr/local/mysql/home_runs.sql

	But often script files are located elsewhere, e.g., when downloaded 
from the web, or when created and stored elsewhere for organizational 
purposes. For the SOURCE command to access such scripts, the absolute 
path must be given, e.g.:

	mysql> SOURCE /Users/jack/Desktop/Du_Bois_scripts/mortality.sql

	It would be nice to re-set the "default" directory to 
/Users/jack/Desktop/Du_Bois_scripts, so that one would  have only to 
type:

	mysql> SOURCE mortality.sql

	to run the mortality.sql script that is located in 
/Users/jack/Desktop/Du_Bois_scripts.

	Is that somehow possible? Or is there a common workaround?

	I thought of putting a script in the default directory 
(/usr/local/mysql/) that in turn calls the desired script. I.e., put a 
script in /usr/local/mysql that contains only the line:

	SOURCE /Users/jack/Desktop/Du_Bois_scripts/mortality.sql

	But that requires fiddling with two scripts as one goes along, and I'm 
wondering whether there is a more straightforward solution.

	Also tried to use a user variable to supply the re-used portion of the 
directory path, but that just produced an error:

			mysql> set @thing="scripts" ;

			mysql> source concat(@thing,"/jacks/hr.sql");
			ERROR:
			Failed to open file 'concat(@thing,"/jacks/hr.sql")', error: 2

	Finally, if indeed it is not possible to re-set the "default" 
directory, I'm wondering why? Is it a security thing? Just curious.

	Thanks all.

	Best,

	Jack Connolly
	Hanover, MA
	
	


	++
	| version()  |
	++
	| 3.23.52-entropy.ch |
	++

	. running under Mac OS 10.2 (Jaguar).

	

	

	
	


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

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



Security issues with LOAD DATA

2002-12-02 Thread cwilli14
I developed a PHP application where users can update a mySQL table using
LOAD DATA. Recently I installed this application on another web server where
the File Permissions have been set such that this method of uploading data
is no longer valid. Since phpMyAdmin is not an option I am trying to find an
alternative or workaround such that users can upload a comma delimited text
file containing the table records.

Any suggestions will be appreciated.
Christopher Williams


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

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




Security issues with LOAD DATA

2002-12-02 Thread Chris Williams
I developed a PHP application where users can update a mySQL table using
LOAD DATA. Recently I installed this application on another web server where
the File Permissions have been set such that this method of uploading data
is no longer valid. Since phpMyAdmin is not an option I am trying to find an
alternative or workaround such that users can upload a comma delimited text
file containing the table records.

Any suggestions will be appreciated.
Christopher Williams


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

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 picking the right index(s)

2002-12-02 Thread Justin French
Hi All,

I'm after a little help/advice with indexing...

I have a table for measuring hits on each page within a site:

year month page hits

basically, my php script looks for a row matching this year (2002), this
month (12) and this page (something.php).  if it finds it, increment by 1,
otherwise insert a row.

All is working fine.

However, I'm not sure what column(s) would be best for indexing... this
small PHP script gets called on every hit of every page (with one or two
queries), so I'd like to optimise it in any way I can, finding a balance
between

a) quickly finding out if the row already exists
b) quickly inserting the row if it doesn't

I'm not worried about how long reporting the stats takes.


Or am I worried about nothing?

sql,query



Justin French

http://Indent.com.au
Web Development & 
Graphic Design



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

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

2002-12-02 Thread Rodney Broom
From: Peter Abilla <[EMAIL PROTECTED]>

> In this example, I have the table 'bar' and the column 'fooID'.

It sounds to me like you've actually got two tables. If this is the case, you can do 
something like:

  SELECT bar.foo
FROM bar, baz
   WHERE baz.fooID in (baz.fooID)

Which would give you all of the bar records whos fooID links to baz.fooID. If you 
really are working with just one table, then I suspect that you haven't told us 
everthing. 

If you did this:

> SELECT foo 
> FROM   bar
> WHERE  fooID in (bar.fooID)

you'll probably get every record in the table. By any chance, is bar.fooID a delimited 
list of IDs?

---
Rodney Broom
President, R.Broom Consulting
http://www.rbroom.com/

sql



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

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




how can i enlarge key field length of myisam table???

2002-12-02 Thread Byoung-In Han
MySQL Document Says.

Maximum key length is 500 bytes by default (can be changed by
recompiling). In cases of keys longer than 250 bytes, a bigger key block
size than the default of 1024 bytes is used for this key. 

how can i recompile to enlarge maximum key length??? 

i want to create table like this... 

create table test( field1 text not null,primary key (field1(1024)) )  <-
it dosen't work

that is, i want primary key length to be more than 1024... \


I can enlarge key field size to 255 while no recompiling. .

create table test( field1 text not null,primary key (field1(255)) )   <-
it works


According to mysql document, I can enlarge key field length by
recompliling. how can I do???


Please. answer me ASAP


Thanks

 




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

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




unix socket

2002-12-02 Thread dave qnx
I see mysqld has options to only use unix domain
socket and not bind to tcpip port. Is there a way to
do it the other way around? don't use unix socket,
only use tcpip?

Also, can I disable the unix sockets during the build
time, so that mysql will only use tcpip? Is there a
way to tell mysql to actually use tcpip when I use
"localhost" as the server name?

The unix domain socket support in qnx (www.qnx.com) is
not very reliable, it is causing more trouble than
what it worth...

Thanks!

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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




change the data directory

2002-12-02 Thread Julia Simmons
I have just installed the mysql binary on solaris 8.
I would like have the data go to a different directory than /local/mysql/data.
How do I get it to do that?

I tried starting it with the --datadir set, but that didn't work.
I tried setting datadir in the /etc/my.cnf file, but that didn't work.
I tried making /local/mysql/data a softlink to a different place, but
that didn't work.
I tried making /local/mysql/data/mysql a softlink to a different place, but
that didn't work.


Thanks!

Julia

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

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: setting auto-increment to start at higher number

2002-12-02 Thread DL Neil
RD,

> How can I set auto-increment in mysql to start counting at say 5
rather
>  than 1


The manual is your friend.
Enter auto_increment into the search facility. Read 6.5.3 CREATE TABLE
Syntax - which illustrates the answer, or move on to the better description
in the next 'hit' 6.5.4 ALTER TABLE Syntax.

Regards,
=dn


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

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




Blob accepts LongBlob without error

2002-12-02 Thread Ryan @ Common Ground . To
I have successfully inserted and retrieved binary image files within 
MySQL.  No big deal.

However, for quite some time I was perplexed because only about half my 
image was going through.

It seems that MySQL accepts insertion of a string into a BLOB field that 
is longer than the maximum length of the BLOB data-type and it will 
still accept it.

Perhaps MySQL should output an error or at least a warning to know the 
string is too long.

Thanks much,

-Ryan Hatch


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

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

2002-12-02 Thread Adolfo Bello
Isn't this sort of impossible?
You are asking for something like "a set which contains as an element
the set itself"

WHERE fooId IN (fooId)

Adolfo

> -Original Message-
> From: Peter Abilla [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 02, 2002 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: sql:WHERE IN SYNTAX
> 
> 
> Question about SQL "WHERE IN" syntax:
> 
> I know that something like this is fine to do:
> 
> (1)
> SELECT foo 
> FROM   bar
> WHERE  fooID in ('1','2')
> 
> In the example above, the parenthesis includes the itemized 
> fooID's.  But, I want to do a similar thing where instead of 
> the actual fooID's in the WHERE IN clause, I reference a 
> column that contains the fooID's, like:
> 
> (2)
> SELECT foo 
> FROM   bar
> WHERE  fooID in (bar.fooID)
> 
> In this example, I have the table 'bar' and the column 'fooID'.
> 
> Is (2) possible?  If not, what other strategies are there?  
> Please help.
> 
> PSA
> 
> 
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> 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: Table setup question

2002-12-02 Thread Adolfo Bello
The other difference is that it works (BTW, a huge benefit)

Adolfo

> -Original Message-
> From: Beauford.2003 [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 02, 2002 11:24 AM
> To: DL Neil; [EMAIL PROTECTED]
> Subject: Re: Table setup question
> 
> 
> DL,
> 
> OK, I get it now. I thought there would need to be 
> duplication in the AlbumSonglist DB. Just one other question 
> though. What is the difference/benefits of doing it this way, 
> than the way I have it.  Currently I use two tables - the 
> songlist table includes 2 id fields (one that corresponds 
> with the album title, and one that is used for the song 
> title). The difference between what you have said and what I 
> have is that I have duplicated the actual song titles instead 
> of a pointer to the song title This way I have eliminated one table.
> 
> Thanks again, Beauford
> 
> - Original Message -
> From: "DL Neil" <[EMAIL PROTECTED]>
> To: "Beauford.2003" <[EMAIL PROTECTED]>; 
> <[EMAIL PROTECTED]>
> Sent: Monday, December 02, 2002 10:41 AM
> Subject: Re: Table setup question
> 
> 
> > Beauford,
> > [please reply to the list - there are always others 
> 'lurking' who will
> learn
> > from the discussion (and use of the archives is a wonderful 
> dream...)]
> >
> > You are correct, there will be duplication in the AlbumSong table - 
> > but
> not
> > within one field, only within one column. Album will consist of a 
> > unique
> ID
> > (IDA) and each Title will, one assumes be unique (unless two groups 
> > use
> the
> > same name - I guess that must be possible). Similarly Songlist will 
> > also consist of a unique ID (IDS) and once again, one 
> assumes that any
> repetition
> > of title will be two different songs that share the same 
> name. These 
> > two
> ID
> > 'uniqueness' rules must apply for the next to work, ie you will most
> likely
> > define them as PRIMARY KEY columns.
> >
> > The 'translation' table, breaks the 'unique' 'rule', "So if song Q 
> > apears
> on
> > albums A, C, and E" as you ask, then we will see:
> >
> > AlbumSong
> >
> > IDAIDS
> > 11
> > 21
> > 31
> >
> > Note that while "1" repeats in AlbumSong, it does not repeat (a) in 
> > Songlist, nor in (b) one row/field of AlbumSong, eg
> >
> > IDA   IDS
> > 1,2,31
> > THE ABOVE IS TOTALLY WRONG!!!
> >
> > In the case of AlbumSong the table will not be able to have 
> a PRIMARY 
> > KEY column(s), but each of the individual columns should 
> probably be 
> > INDEXed
> for
> > read-speed.
> >
> > Be aware that AlbumSong contains no real 'data' from an end-user 
> > perspective. It is a table made up purely of 'links' or 'keys' or 
> > 'IDs' to the other two tables. The Album and Songlist tables do all 
> > the 'data'
> work,
> > AlbumSong does all the 'heavy lifting' to relate Album's data to
> Songlist's,
> > and/or vice-versa.
> >
> > Apologies if this was not clear, first time round,
> > =dn
> >
> >
> >
> > > DL,
> > >
> > > OK, that helps a lot, but I am still confused. I am still 
> struggling
> with
> > > how you can not have duplication in at least one of the tables. A
> diagram
> > > here may help.  So if song Q apears on albums A, C, and E 
> - I don't
> quite
> > > understand how AlbumSong is going to be able to know 
> which songs are 
> > > duplicated without duplication of ID's. (There are 500 songs and 
> > > only 36 albums).
> > >
> > > Thanks
> > >
> > > AlbumSonglistAlbumSong
> > >
> > > IDATITLEIDSSongIDAIDS
> > >
> > > 1A   1Q??
> > > 2B2R??
> > > 3C3S??
> > > 4D4T??
> > > 5E 5V   ??
> > >   
>  ?
> > >   
>  ?
> > >   
>  ?
> > >   
>  ?
> > >   
>  ?
> > >   
>  
> > > ?
> > >
> > >
> > >
> > > - Original Message -
> > > From: "DL Neil" <[EMAIL PROTECTED]>
> > > To: "Beauford.2003" <[EMAIL PROTECTED]>; <>
> > > Sent: Monday, December 02, 2002 4:32 AM
> > > Subject: Re: Table setup question
> > >
> > >
> > > > Hi Beauford,
> > > >
> > > > You are on the right track. Yes you should remove the songs to a
> > separate
> > > > table. If you merely duplicate the first example (below) in two 
> > > > tables
> > you
> > > > have created a "one-to-many" relationship between the 
> Album table 
> > > > and
> > the
> > > > Songs table - on

Re: C API problems with InnoDB

2002-12-02 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

H. Steuer wrote:

Hello MySQL users,

I have a weired issue using the MySQL C API and InnoDB tables.
An application polls a database every 30 seconds. When the application
starts everything seems to be fine.
During the running of the application i change some rows, but the
application itself doesnt see the changes at all.
I tracked down the problem and saw that its only happening if I set
autocommit=0.
If I run a second mysql shell I can see all changes immediately. Just the
application itself doesnt.

Here are the important parts of the code without any exception catching.
Just wanted to show the steps I did for querying the database.

[snip]

okay, when running this application does not see the changes to the
database - for what reason ever.
If I drop the SET AUTOCOMMIT=0 it works fine.
When inserting   'mysql_query(conn,"COMMIT;") ' after the mysql_store_result
everything seems to work fine, too.

But theres only a select statement - nothing that changes data at all. why
doesnt the application see the changes without the commit ?
I wrote a small test application without any other code, just this simple
query - the same result.
Can anyone explain this thing to me ?  Why is there a COMMIT needed after a
select ?
When stopping the application and restarting it immediately the changes are
visible, too.
I dont get any further - hope one of you guys can help.

Thanks in advance,
Heri


InnoDB takes a consistent 'snapshot' at the beginning of every 
transaction. This enables the 'I' in the infamous 'ACID' test...which is 
isolation...Transacations don't 'see' the effects of other transactions 
until after the others commit. InnoDB runs by default in an 'isolation 
level' of 'REPEATABLE_READ', which means that the isolation a particular 
transaction 'sees' remains in effect until that transaction itself has 
committed. InnoDB accomplishes this through the 'snapshotting' model 
mentioned above.

See

http://www.innodb.com/ibman.html#InnoDB_transaction_model

for more detailed information, or consult any handy transaction 
processing or database textbook ;)

	-Mark
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE96+iotvXNTca6JD8RAhcJAKC/u3ZjbJQYtI6ei94ddaY28jtZPwCguWJW
MDbFde/rPHEy8BGawiVm8Y4=
=1Xjv
-END PGP SIGNATURE-


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

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: C API problems with InnoDB

2002-12-02 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Heri,

> I tracked down the problem and saw that its only happening if I set
> autocommit=0.
> If I run a second mysql shell I can see all changes immediately. Just the
> application itself doesnt.

Does the second shell actually perform those changes? In this case, I assume
it's got something to do with the isolation level / consistent read in
InnoDB tables. "shell1" sees all its changes immediately, "shell2" (the
application) has just a snapshot of the data at the time it performs the
select.

This should however only be true for the select the first time the
application loops. But if it uses the same conn = mysql_init(NULL); (I am
not a C programmer), it will keep the same isolation level, and thus, the
same snapshot.

Hope it helps,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  CEO / Geschäftsleitung iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3


- Original Message -
From: "H. Steuer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 10:29 PM
Subject: C API problems with InnoDB


> Hello MySQL users,
>
> I have a weired issue using the MySQL C API and InnoDB tables.
> An application polls a database every 30 seconds. When the application
> starts everything seems to be fine.
> During the running of the application i change some rows, but the
> application itself doesnt see the changes at all.
> I tracked down the problem and saw that its only happening if I set
> autocommit=0.
> If I run a second mysql shell I can see all changes immediately. Just the
> application itself doesnt.
>
> Here are the important parts of the code without any exception catching.
> Just wanted to show the steps I did for querying the database.
>
> conn = mysql_init(NULL);
> mysql_real_connect(
> conn,
> hostname,
> username,
> password,
> dbname,
> 0,
> NULL,
> 0)
> == NULL);
> mysql_query(conn,"SET AUTOCOMMIT=0");
>
>
> ... so far for the preparing of the connection. now for the interresting
> part. the following query runs in an loop :
>
>
> mysql_query(conn,"SELECT
> a.id,k.fix_SenderCompID,k.fix_TargetCompID,k.fix_version FROM aorder AS
> a,kontrahenten AS k WHERE status='active' AND fix_status='queued_send' AND
> k.id=a.kontrahent")
>
> result = mysql_store_result(conn);
> while ( ( row = mysql_fetch_row(result) ) != NULL ) {
> // do something with the data
> }
> mysql_free_result(result);
> sleep(30);
>
>
> okay, when running this application does not see the changes to the
> database - for what reason ever.
> If I drop the SET AUTOCOMMIT=0 it works fine.
> When inserting   'mysql_query(conn,"COMMIT;") ' after the
mysql_store_result
> everything seems to work fine, too.
>
> But theres only a select statement - nothing that changes data at all. why
> doesnt the application see the changes without the commit ?
> I wrote a small test application without any other code, just this simple
> query - the same result.
> Can anyone explain this thing to me ?  Why is there a COMMIT needed after
a
> select ?
> When stopping the application and restarting it immediately the changes
are
> visible, too.
> I dont get any further - hope one of you guys can help.
>
> Thanks in advance,
> Heri
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Logical Field Type

2002-12-02 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Curtis,

> might be 0 vs 1, T vs F, or Y vs N, or any combination of these.
> Is there a MySQL logical field type that will handle any/all of these at
> one time?

AFAIK you can accomplish this only on the application side. In MySQL, you
can work with ENUM('0','1')) or even CHAR(0) NOT NULL (which will store just
1 byte, either NULL or ''), but MySQL has no conversion like 'n' -> '0'.

Another thing you can do is:

mysql> SELECT CASE 'your_value_from_the_application'
->  WHEN 'T' THEN 1
->  WHEN 'Y' THEN 1
->  WHEN '1' THEN 1
->  WHEN 'TRUE' THEN 1
->  ELSE 0
-> END;

As everything is case-insensitive, this will also catch "t", "y", "true",
"tRuE", etc. And it's fast as hell, like everything in MySQL :)

Hope it helps,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  CEO / Geschäftsleitung iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3


- Original Message -
From: "Lorenzo Curtis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 9:19 PM
Subject: Logical Field Type


> I am working with data that the field values coming into the database
> might be 0 vs 1, T vs F, or Y vs N, or any combination of these.
>
> Is there a MySQL logical field type that will handle any/all of these at
> one time?
>
>
> Example:
> I would like the following data
> +---+---+---+---+
> | Fld1  | Fld2  | Fld3  | Log   |
> +---+---+---+---+
> | rec1a | rec1b | rec1c | Y |
> | rec2a | rec2b | rec2c | N |
> | rec3a | rec3b | rec3c | T |
> | rec4a | rec4b | rec4c | F |
> | rec5a | rec5b | rec5c | 0 |
> | rec6a | rec6b | rec6c | 1 |
> | rec7a | rec7b | rec7c | False |
> | rec8a | rec8b | rec8c | True  |
> +---+---+---+---+
>
> to be stored into a database as:
> +---+---+---+-+
> | Fld1  | Fld2  | Fld3  | Log |
> +---+---+---+-+
> | rec1a | rec1b | rec1c | 1   |
> | rec2a | rec2b | rec2c | 0   |
> | rec3a | rec3b | rec3c | 1   |
> | rec4a | rec4b | rec4c | 0   |
> | rec5a | rec5b | rec5c | 0   |
> | rec6a | rec6b | rec6c | 1   |
> | rec7a | rec7b | rec7c | 0   |
> | rec8a | rec8b | rec8c | 1   |
> +---+---+---+-+
>
>
> -
> Lorenzo Curtis
> Dead River Company
>
>
>
>
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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 get mysql owner password?

2002-12-02 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Jing,

> Does any one of you know how to work around this problem and access
"mysql"
> database?

1. Kill the server (kill -9 mysqld, you will probably need to log in as OS
user 'root').

2. Start the server with the option skip-grant-tables, e. g.
mysqld --skip-grant-tables.

3. Connect to the server using MySQL Monitor, the command line tool: shell>
mysql (You can connect without username/password.)

4. On the SQL command line, do: GRANT ALL ON *.* TO 'superuser'@'localhost'
IDENTIFIED BY 'iwillremember' WITH GRANT OPTION;

5. Exit MySQL Monitor.

6. On the shell, do: mysqladmin -usuperuser -piwillremember shutdown

7. On the shell, do: mysqld (to start the server again)

Now, this new 'superuser' can create accounts for regular users.

Hope it helps,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  CEO / Geschäftsleitung iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3


- Original Message -
From: "Jannie Qu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 9:28 PM
Subject: How to get mysql owner password?


> Hi, all,
>
> sql, query.
>
> I started working on an old MySQL 3.23.47 database server on SunOS 5.7,
but
> I only have a regular user account. I cannot access "mysql" database.
>
> I tried to use OS user "root" and "mysql" to login without password, but
it
> failed. No one at my company knows other username and password except the
> regular user account.
>
> Does any one of you know how to work around this problem and access
"mysql"
> database?
>
> Thank you,
> Jing
>
>
>
>
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




setting auto-increment to start at higher number

2002-12-02 Thread rdkurth
 How can I set auto-increment in mysql to start counting at say 5 rather
 than 1






-- 
Best regards,
 rdkurthmailto:[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: NOT IN

2002-12-02 Thread DL Neil
> Select * from employees left outer join dept on employees.emp_DepId =
> dept.dep_id where dept.dep_id is null
> 
> (Subselect would be easier if MySQL supported it!)


Likely easier to write, but equally likely to be more expensive to run
(on any tbl of realistic size)
NB Comment only pertinent as size or query-run frequency grows.
Try testing it out on Oracle or an RDBMS that allows sub-selects!

=dn


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

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




Re: creating related tables

2002-12-02 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter, et al --

...and then Peter Brawley said...
% 
% >  I can't find a my.cnf file anywhere on this
% > FreeBSD 4.5 system!
% >
% > I know [also from your other reply :-] that I can set various options in
% > my personal .my.cnf file...  Does that include innodb file paths and the
% > like, or is that only in the system-level file?
% 
% IMO it's best to have just one my.cnf.ini.

I imagine so, but I can't change the system file.  Of course, I haven't
found it yet, either!


% 
% > % skip-innodb
% > % is not commented out, do so. If other innodb vars are commented out,
% > % uncomment them.
% >
% > I'll leave the rest of these checks until I find the file...  Meanwhile,
% > here are some selections from a 'show variables;' that make me wonder
% > about our innodb status...
...
% 
% See the manual about how to set up InnoDB. You will have to create the
% InnoDB directory yourself, then set
% innodb_data_file_path = :
% innodb_data_home_dir = 
% innodb_log_arch_dir = http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE969okGb7uCXufRwARAuBaAKCctm6gNxYboMPLJ/k44M3gqGyBrgCgxvKQ
N53k36P1JzNdxBIBjoSgRgo=
=DSoI
-END PGP SIGNATURE-

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

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: protecting ccard numbers

2002-12-02 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bernd, et al --

...and then Bernd Prager said...
% 
% Well, IMHO there's only one way to make it almost secure:
% Don't store the cc numbers unencrypted.

Agreed there; it seems to me that they would have to be encrypted at
least somewhat.


% The user should log-in with a password. Don't store the password, just
% a hash-value to proof the password valid.

A one-way cipher?  Yeah, OK.


% 
% Encode and store the sensitive data with that password.

So the ccard numbers would be encoded with the password, which means that
the database cannot decode them.  So it asks for the password when it's
time to display a card number, checks the password to see if it hashes
the same way, and then uses that to decrypt the number.  OK.


% 
% Use a second password (don't store it either) and a second encrypted field
% if a second group need to see that number.

Hmmm...  So if bob in accounting needs it then he has his password, and
if sue in billing needs to see them then she has her password, and ... we
soon end up with a lot of passwords.

That's not a problem, though; we have a user password table which, of
course, only stores the encrypted password (just like the system passwd
or shadow file) and then we check privs to see if someone should be in
that file and should access this card (maybe only certain types of cards)
and then get the password and compare its scrambled version against the
one stored in the password table.  Hmmm...  OK; that's a start.

We have to somehow allow root to manage passwords and yet keep a hacker
from looking like root and setting up his own.  Hmmm...  We may be back
to the problem of "if you lose root then you lose it all"; well, so be
it.


% Whatever happens to the data. A third person cannot read it.

Sounds like a start.  Thanks for the ideas!


% -- Bernd


mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE969k9Gb7uCXufRwARAq25AJ4203qwJzgj8HdV7JHxMLjvUBpMbwCgnVz2
V33pdhRiQkvZjqMqlOJJIHc=
=6HjY
-END PGP SIGNATURE-

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

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 get mysql owner password?

2002-12-02 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jing --

...and then Jannie Qu said...
% 
% Hi, all,

Hello!


% 
% sql, query.

Yeah, that :-)


% 
% I started working on an old MySQL 3.23.47 database server on SunOS 5.7, but 
% I only have a regular user account. I cannot access "mysql" database.
% 
% I tried to use OS user "root" and "mysql" to login without password, but it 
% failed. No one at my company knows other username and password except the 
% regular user account.
% 
% Does any one of you know how to work around this problem and access "mysql" 
% database?

You might try starting mysqld with --skip-grant-table to remove the
restrictions and then create a fully-capable account (or change the
database root account password) and then restart normally.


% 
% Thank you,
% Jing


HTH & HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE969e4Gb7uCXufRwARAlLKAJ9P1clSGU3p4PKKaDeIwLpI1/cHlwCg6bIm
MxuzMTo/ToaJ9bdBv4kZb5A=
=18DY
-END PGP SIGNATURE-

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

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




mysqladmin shutdown leaves stray processes (repost)

2002-12-02 Thread Daniel Kasak
Hi all.
Hi spam filter. SQL. Query.
MySQL versions 4.0.3, 4.0.4 and 4.0.5 all have the following problem...
When I use 'mysqladmin shutdown', 2 processes are left running and can 
only be killed with a 'kill -9 '.
At midnight I run a script which backs up each database and then 
restarts mysql (to get the '--log-updates' log to move to a new version) 
and each morning I type:

root@vortex:/usr/local/mysql/var# ps ax | grep mysql
 7859 ?S< 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe 
--enable-loc
 7895 ?S< 0:01 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19304 ?S< 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe 
--enable-loc
19340 ?S< 0:01 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19342 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19343 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19344 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19345 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19346 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19347 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19348 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19349 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
19350 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20262 ?S< 0:06 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20264 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20297 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20315 ?S< 0:01 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20325 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20327 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20376 ?S< 0:00 /usr/local/mysql-4.0.5/libexec/mysqld 
--basedir=/usr/
20417 pts/1S  0:00 grep mysql
root@vortex:/usr/local/mysql/var# kill -9 7859 7895

root@vortex:/usr/local/mysql/var#

MySQL was compiled with the recommended flags (from the INSTALL-SOURCE 
file). It's running on a stock Slackware 8.0 install with a 2.4.19 kernel.

Any clues? Anyone else having this problem?


--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.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: LEGAL information about MySQL.

2002-12-02 Thread Mark
- Original Message -
From: "Michael T. Babcock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 6:54 PM
Subject: Re: LEGAL information about MySQL.


> 2) Connecting to MySQL is _not_ the same as linking against it or
>modifying it in some way. Storing data and fetching data using
>MySQL connections is completely unrestricted by the GPL
>(IANAL, but this is obvious).


Is this true? If so, that is a relief. But does the licence also not talk
about "using" MySQL? Is connecting to MySQL not the same as "using" it?

I know this thread became a bit trollish along the line, but I am genuinely
interested in knowing where I stand when a program of mine uses MySQL
connections.

- 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




C API problems with InnoDB

2002-12-02 Thread H. Steuer
Hello MySQL users,

I have a weired issue using the MySQL C API and InnoDB tables.
An application polls a database every 30 seconds. When the application
starts everything seems to be fine.
During the running of the application i change some rows, but the
application itself doesnt see the changes at all.
I tracked down the problem and saw that its only happening if I set
autocommit=0.
If I run a second mysql shell I can see all changes immediately. Just the
application itself doesnt.

Here are the important parts of the code without any exception catching.
Just wanted to show the steps I did for querying the database.

conn = mysql_init(NULL);
mysql_real_connect(
conn,
hostname,
username,
password,
dbname,
0,
NULL,
0)
== NULL);
mysql_query(conn,"SET AUTOCOMMIT=0");


... so far for the preparing of the connection. now for the interresting
part. the following query runs in an loop :


mysql_query(conn,"SELECT
a.id,k.fix_SenderCompID,k.fix_TargetCompID,k.fix_version FROM aorder AS
a,kontrahenten AS k WHERE status='active' AND fix_status='queued_send' AND
k.id=a.kontrahent")

result = mysql_store_result(conn);
while ( ( row = mysql_fetch_row(result) ) != NULL ) {
// do something with the data
}
mysql_free_result(result);
sleep(30);


okay, when running this application does not see the changes to the
database - for what reason ever.
If I drop the SET AUTOCOMMIT=0 it works fine.
When inserting   'mysql_query(conn,"COMMIT;") ' after the mysql_store_result
everything seems to work fine, too.

But theres only a select statement - nothing that changes data at all. why
doesnt the application see the changes without the commit ?
I wrote a small test application without any other code, just this simple
query - the same result.
Can anyone explain this thing to me ?  Why is there a COMMIT needed after a
select ?
When stopping the application and restarting it immediately the changes are
visible, too.
I dont get any further - hope one of you guys can help.

Thanks in advance,
Heri



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

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: protecting ccard numbers

2002-12-02 Thread Bernd Prager
Well, IMHO there's only one way to make it almost secure:
Don't store the cc numbers unencrypted.
The user should log-in with a password. Don't store the password, just
a hash-value to proof the password valid.

Encode and store the sensitive data with that password.

Use a second password (don't store it either) and a second encrypted field
if a second group need to see that number.
Whatever happens to the data. A third person cannot read it.
-- Bernd

- Original Message -
From: "David T-G" <[EMAIL PROTECTED]>
To: "mysql users" <[EMAIL PROTECTED]>
Sent: Sunday, December 01, 2002 6:42 PM
Subject: protecting ccard numbers


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi, all --
>
> I'm exploring some software for a client and I expect to need to store
> credit card numbers in the system.*  How to do it safely, though?
>
> It seems to me that we have four levels of security at hand: the local
> employee who should be working with the data at all, the local employee
> who shouldn't see these numbers, the remote hacker who wants to break in
> and get all of the data, and the backups.
>
> The first should be simple; with careful grant privs, those who shouldn't
> be able to access the card numbers can't, and those who should can.
> We'll come back to this in a minute.
>
> The second should be even simpler; if you're not supposed to see any of
> the data, then you don't get an account.
>
> The third won't be a problem immediately, since they're starting out with
> just an internal server for their system.  Maybe we'll never expand to a
> public interface; who knows.  But it would be good to plan for it.
>
> The fourth is something of a problem, since if you can get the backups
> you can recreate the database and you have it all.  My current thought is
> a mysqldump through pgp with the private key somewhere else.  More input
> it welcome.
>
> So we're back to the first case: there are those who should be able to
> see this data and those who can't.  Would it be better (and less prone to
> error or elevation hacking) to put the card numbers in a separate table
> and reference it?  Maybe with another table that maps customer IDs to
> card IDs so that there isn't even a pointer reference in the customer
> table?
>
> And what about the hacker problem?  Should I encrypt the card numbers in
> the system?  If so, how can they be decrypted for those who *should* see
> them without also storing the key somewhere that a hacker could get?
>
> This whole thing is just a concept at the moment; they're interested in
> the idea of moving away from paper (yes, *paper* -- for everything!)
> but neither have wads of cash to throw away nor embrace change.  Here's
> hoping, though ;-)  Not only does the project in general have me quite
> interested, though, but this aspect of it is *very* interesting.  Any
> pointers, tips, "we-did-it-this-way"s, or other advice (and discussion)
> is very much appreciated.
>
> * Background: This is a spa-like studio and they take private session
>   reservations with a ccard and then bill the card if you fail to show,
>   not unlike hotels do.  AFAIK they retain card numbers long-term for
>   customer convenience (heh -- and their own, as we all truly know) and
>   so I can't store them in a non-backed-up, one-time-pad table or some
>   such.
>
>
> TIA & HAND
>
> mysql query,
> :-D
> - --
> David T-G  * There is too much animal courage in
> (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
> (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and
Health"
> http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl
Npg!
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (FreeBSD)
>
> iD8DBQE96p5LGb7uCXufRwARAqn8AKCK/0eaW101RoeoBPvEh98A3Pt2vQCg3OR1
> JmBcK1On5vqTGrBreIcRV+k=
> =Qv39
> -END PGP SIGNATURE-
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: protecting ccard numbers

2002-12-02 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

William --

...and then William R. Mussatto said...
% 
% On Sun, 1 Dec 2002, David T-G wrote:
% 
% > Date: Sun, 1 Dec 2002 18:42:03 -0500
% > From: David T-G <[EMAIL PROTECTED]>
% > To: mysql users <[EMAIL PROTECTED]>
% > Subject: protecting ccard numbers
% > 
% One way would be to encode the credit card number field using data from 
% an external file for the key and then backup that file separately from 

I thought of that as well.  Putting the key on a CD and having that in
only when it's needed would be good, too, but pretty inconvenient in a
remote server environment.


% the general backups.  Then having the backups w/o the key would be 
% relatively safte from the fourth problem.  You could also programatically 
% protect the credit cards since even if they could see the field, the 
% information would be protected.

Right.

My next approach is a get a [pgp?] passphrase from the user and cache
that in memory but not save it in the backups; then the hacker would
have to get at the running system to see where in memory to dump.  On
the other hand, it's only as safe as the employees using the passphrase;
an improved approach is to tie it to the account used for access -- but
now we're getting more into the system side than the database side, which
may not be interesting to the list ;-)


% 
% Protetion against hacker is another problem since with root access they 
% could see the program, the database and the key, although they shouldn't 
% be together.

Of course not :-)  They have to come together somehow, though, and that's
the trick.


Thanks! & HAND

mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE968+QGb7uCXufRwARAofpAJ9SXdmDhR9plTUj+0tvPhYc8xqfMwCeIy1Z
XKJJGInZpD51Udt1XA6ODaA=
=SUZ0
-END PGP SIGNATURE-

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

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




How to get mysql owner password?

2002-12-02 Thread Jannie Qu
Hi, all,

sql, query.

I started working on an old MySQL 3.23.47 database server on SunOS 5.7, but 
I only have a regular user account. I cannot access "mysql" database.

I tried to use OS user "root" and "mysql" to login without password, but it 
failed. No one at my company knows other username and password except the 
regular user account.

Does any one of you know how to work around this problem and access "mysql" 
database?

Thank you,
Jing





_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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

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 not working behind linksys router

2002-12-02 Thread John Bateman
Hi

Verify that connections from other hosts are allowed in your GRANTS 
Table(s). You need info in the Host, DB and User table the corresponding 
to the person connecting from the outside.

As for it crashing. I can't tell you what's causing that.



Bruce Lewis wrote:
You may want to check the advanced features of your Linksys router.  There
may be an IP imposed limit for the MYSQL server to the outside world.

It is part of a configuration that you can alter.  Check the IP filtering
area.

Bruce Lewis



- Original Message -
From: "Egor Egorov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 11:04 AM
Subject: re: mysql not working behind linksys router




Mir,
Sunday, December 01, 2002, 5:24:41 AM, you wrote:

MSI> Hi, apologies upfront since this is not directly a mysql question. I
MSI> have a mysql host sitting behind a linksys router/wireless ap. The


mysql


MSI> host is configured as a DMZ host in the router. All web/ftp other
MSI> connections are working fine, however mysql connection from outside


the


MSI> network is not working. Not only that if there is any inbound


connection


MSI> mysql crashes hard and does not accept any connection or process


anymore


MSI> queries.

MSI> Any idea what could be the possible cause?

What OS? What is the MySQL version? Have you  installed MySQL from binary
or source distribution?

MSI> Does mysql need other ports ope besides 3306 ?

Nope, if MySQL server is running on 3306.

MSI> Other DB (postgres) and services work fine. Although
MSI> I had to do some tricky stuff for the same host before I could get
MSI> proFTPD working for passive ftp.




--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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







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

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





--
John Bateman <[EMAIL PROTECTED]>
Senior Technical Architect
(450) 979-5766
Station InfiniWeb inc.
http://www.infiniweb.ca
/* Hébergement Web - Programmation Web - Sites Web - Nom de domaine  */
/* Web Hosting - Web Programming - Instant Websites - Domain name*/


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

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




Logical Field Type

2002-12-02 Thread Lorenzo Curtis
I am working with data that the field values coming into the database
might be 0 vs 1, T vs F, or Y vs N, or any combination of these.

Is there a MySQL logical field type that will handle any/all of these at
one time?


Example:
I would like the following data
+---+---+---+---+
| Fld1  | Fld2  | Fld3  | Log   |
+---+---+---+---+
| rec1a | rec1b | rec1c | Y |
| rec2a | rec2b | rec2c | N |
| rec3a | rec3b | rec3c | T |
| rec4a | rec4b | rec4c | F |
| rec5a | rec5b | rec5c | 0 |
| rec6a | rec6b | rec6c | 1 |
| rec7a | rec7b | rec7c | False |
| rec8a | rec8b | rec8c | True  |
+---+---+---+---+

to be stored into a database as:
+---+---+---+-+
| Fld1  | Fld2  | Fld3  | Log |
+---+---+---+-+
| rec1a | rec1b | rec1c | 1   |
| rec2a | rec2b | rec2c | 0   |
| rec3a | rec3b | rec3c | 1   |
| rec4a | rec4b | rec4c | 0   |
| rec5a | rec5b | rec5c | 0   |
| rec6a | rec6b | rec6c | 1   |
| rec7a | rec7b | rec7c | 0   |
| rec8a | rec8b | rec8c | 1   |
+---+---+---+-+


-
Lorenzo Curtis
Dead River Company








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

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: NOT IN

2002-12-02 Thread Cal Evans
Select * from employees left outer join dept on employees.emp_DepId =
dept.dep_id where dept.dep_id is null

(Subselect would be easier if MySQL supported it!)

HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: Silmara [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 12:34 PM
To: [EMAIL PROTECTED]
Subject: NOT IN


How can I query all records that not matching in another table?

Ex.

Select * from employees
where emp_DepId not in (select dep_id from dept)

Silmara

MySQL


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

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




Question about myisam_block_size

2002-12-02 Thread Mariella Di Giacomo
Hello,

I am running MySQL 4.0.5 64 bit on a Sun Solaris and I am using MyISAM Indices.
I have noticed that the
myisam_block_size is set to 1K.

What does it happen if I am going to change to 8K ?
The reason for that is because the Solaris pagesize is set to 8K, so I was 
thinking that
maybe I could get improvements in performance.


Is that correct ?

Thanks a lot in advance for your help,

Mariella


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

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: protecting ccard numbers

2002-12-02 Thread William R. Mussatto
On Sun, 1 Dec 2002, David T-G wrote:

> Date: Sun, 1 Dec 2002 18:42:03 -0500
> From: David T-G <[EMAIL PROTECTED]>
> To: mysql users <[EMAIL PROTECTED]>
> Subject: protecting ccard numbers
> 
One way would be to encode the credit card number field using data from 
an external file for the key and then backup that file separately from 
the general backups.  Then having the backups w/o the key would be 
relatively safte from the fourth problem.  You could also programatically 
protect the credit cards since even if they could see the field, the 
information would be protected.

Protetion against hacker is another problem since with root access they 
could see the program, the database and the key, although they shouldn't 
be together.

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi, all --
> 
> I'm exploring some software for a client and I expect to need to store
> credit card numbers in the system.*  How to do it safely, though?
> 
> It seems to me that we have four levels of security at hand: the local
> employee who should be working with the data at all, the local employee
> who shouldn't see these numbers, the remote hacker who wants to break in
> and get all of the data, and the backups.
> 
> The first should be simple; with careful grant privs, those who shouldn't
> be able to access the card numbers can't, and those who should can.
> We'll come back to this in a minute.
> 
> The second should be even simpler; if you're not supposed to see any of
> the data, then you don't get an account.
> 
> The third won't be a problem immediately, since they're starting out with
> just an internal server for their system.  Maybe we'll never expand to a
> public interface; who knows.  But it would be good to plan for it.
> 
> The fourth is something of a problem, since if you can get the backups
> you can recreate the database and you have it all.  My current thought is
> a mysqldump through pgp with the private key somewhere else.  More input
> it welcome.
> 
> So we're back to the first case: there are those who should be able to
> see this data and those who can't.  Would it be better (and less prone to
> error or elevation hacking) to put the card numbers in a separate table
> and reference it?  Maybe with another table that maps customer IDs to
> card IDs so that there isn't even a pointer reference in the customer
> table?
> 
> And what about the hacker problem?  Should I encrypt the card numbers in
> the system?  If so, how can they be decrypted for those who *should* see
> them without also storing the key somewhere that a hacker could get?
> 
> This whole thing is just a concept at the moment; they're interested in
> the idea of moving away from paper (yes, *paper* -- for everything!)
> but neither have wads of cash to throw away nor embrace change.  Here's
> hoping, though ;-)  Not only does the project in general have me quite
> interested, though, but this aspect of it is *very* interesting.  Any
> pointers, tips, "we-did-it-this-way"s, or other advice (and discussion)
> is very much appreciated.
> 
> * Background: This is a spa-like studio and they take private session
>   reservations with a ccard and then bill the card if you fail to show,
>   not unlike hotels do.  AFAIK they retain card numbers long-term for
>   customer convenience (heh -- and their own, as we all truly know) and
>   so I can't store them in a non-backed-up, one-time-pad table or some
>   such.
> 
> 
> TIA & HAND
> 
> mysql query,
> :-D
> - -- 
> David T-G  * There is too much animal courage in 
> (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
> (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
> http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (FreeBSD)
> 
> iD8DBQE96p5LGb7uCXufRwARAqn8AKCK/0eaW101RoeoBPvEh98A3Pt2vQCg3OR1
> JmBcK1On5vqTGrBreIcRV+k=
> =Qv39
> -END PGP SIGNATURE-
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


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

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

2002-12-02 Thread Peter Abilla
Question about SQL "WHERE IN" syntax:

I know that something like this is fine to do:

(1)
SELECT foo 
FROM   bar
WHERE  fooID in ('1','2')

In the example above, the parenthesis includes the itemized fooID's.  But, I
want to do a similar thing where instead of the actual fooID's in the WHERE
IN clause, I reference a column that contains the fooID's, like:

(2)
SELECT foo 
FROM   bar
WHERE  fooID in (bar.fooID)

In this example, I have the table 'bar' and the column 'fooID'.

Is (2) possible?  If not, what other strategies are there?  Please help.

PSA




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

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: unicode encoding

2002-12-02 Thread Steve Vernon
Hiya,
Have you got a rough timescale as to when 4.1 will come out?

If not then is there a way to simulate Unicode in MySQL?

THanks,

Steve
XX

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

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 not working behind linksys router

2002-12-02 Thread Bruce Lewis
You may want to check the advanced features of your Linksys router.  There
may be an IP imposed limit for the MYSQL server to the outside world.

It is part of a configuration that you can alter.  Check the IP filtering
area.

Bruce Lewis



- Original Message -
From: "Egor Egorov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 11:04 AM
Subject: re: mysql not working behind linksys router


> Mir,
> Sunday, December 01, 2002, 5:24:41 AM, you wrote:
>
> MSI> Hi, apologies upfront since this is not directly a mysql question. I
> MSI> have a mysql host sitting behind a linksys router/wireless ap. The
mysql
> MSI> host is configured as a DMZ host in the router. All web/ftp other
> MSI> connections are working fine, however mysql connection from outside
the
> MSI> network is not working. Not only that if there is any inbound
connection
> MSI> mysql crashes hard and does not accept any connection or process
anymore
> MSI> queries.
>
> MSI> Any idea what could be the possible cause?
>
> What OS? What is the MySQL version? Have you  installed MySQL from binary
> or source distribution?
>
> MSI> Does mysql need other ports ope besides 3306 ?
>
> Nope, if MySQL server is running on 3306.
>
> MSI> Other DB (postgres) and services work fine. Although
> MSI> I had to do some tricky stuff for the same host before I could get
> MSI> proFTPD working for passive ftp.
>
>
>
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> 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
>
>



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

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




NOT IN

2002-12-02 Thread Silmara
How can I query all records that not matching in another table?

Ex.

Select * from employees
where emp_DepId not in (select dep_id from dept)

Silmara 

MySQL


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

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




Re: Table setup question

2002-12-02 Thread Beauford.2003
DL,

OK, I get it now. I thought there would need to be duplication in the
AlbumSonglist DB. Just one other question though. What is the
difference/benefits of doing it this way, than the way I have it.  Currently
I use two tables - the songlist table includes 2 id fields (one that
corresponds with the album title, and one that is used for the song title).
The difference between what you have said and what I have is that I have
duplicated the actual song titles instead of a pointer to the song title
This way I have eliminated one table.

Thanks again, Beauford

- Original Message -
From: "DL Neil" <[EMAIL PROTECTED]>
To: "Beauford.2003" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 10:41 AM
Subject: Re: Table setup question


> Beauford,
> [please reply to the list - there are always others 'lurking' who will
learn
> from the discussion (and use of the archives is a wonderful dream...)]
>
> You are correct, there will be duplication in the AlbumSong table - but
not
> within one field, only within one column. Album will consist of a unique
ID
> (IDA) and each Title will, one assumes be unique (unless two groups use
the
> same name - I guess that must be possible). Similarly Songlist will also
> consist of a unique ID (IDS) and once again, one assumes that any
repetition
> of title will be two different songs that share the same name. These two
ID
> 'uniqueness' rules must apply for the next to work, ie you will most
likely
> define them as PRIMARY KEY columns.
>
> The 'translation' table, breaks the 'unique' 'rule', "So if song Q apears
on
> albums A, C, and E" as you ask, then we will see:
>
> AlbumSong
>
> IDAIDS
> 11
> 21
> 31
>
> Note that while "1" repeats in AlbumSong, it does not repeat (a) in
> Songlist, nor in (b) one row/field of AlbumSong, eg
>
> IDA   IDS
> 1,2,31
> THE ABOVE IS TOTALLY WRONG!!!
>
> In the case of AlbumSong the table will not be able to have a PRIMARY KEY
> column(s), but each of the individual columns should probably be INDEXed
for
> read-speed.
>
> Be aware that AlbumSong contains no real 'data' from an end-user
> perspective. It is a table made up purely of 'links' or 'keys' or 'IDs' to
> the other two tables. The Album and Songlist tables do all the 'data'
work,
> AlbumSong does all the 'heavy lifting' to relate Album's data to
Songlist's,
> and/or vice-versa.
>
> Apologies if this was not clear, first time round,
> =dn
>
>
>
> > DL,
> >
> > OK, that helps a lot, but I am still confused. I am still struggling
with
> > how you can not have duplication in at least one of the tables. A
diagram
> > here may help.  So if song Q apears on albums A, C, and E - I don't
quite
> > understand how AlbumSong is going to be able to know which songs are
> > duplicated without duplication of ID's. (There are 500 songs and only 36
> > albums).
> >
> > Thanks
> >
> > AlbumSonglistAlbumSong
> >
> > IDATITLEIDSSongIDAIDS
> >
> > 1A   1Q??
> > 2B2R??
> > 3C3S??
> > 4D4T??
> > 5E 5V   ??
> >?
> >?
> >?
> >?
> >?
> >?
> >
> >
> >
> > - Original Message -
> > From: "DL Neil" <[EMAIL PROTECTED]>
> > To: "Beauford.2003" <[EMAIL PROTECTED]>; <>
> > Sent: Monday, December 02, 2002 4:32 AM
> > Subject: Re: Table setup question
> >
> >
> > > Hi Beauford,
> > >
> > > You are on the right track. Yes you should remove the songs to a
> separate
> > > table. If you merely duplicate the first example (below) in two tables
> you
> > > have created a "one-to-many" relationship between the Album table and
> the
> > > Songs table - one album has many songs on it. Your query code applies.
> > >
> > > However the Songs table still has duplication in it, eg 3.song appears
> > > thrice, and we can't have that! The problem is, if you cut down the
> Songs
> > > table entries so that 3.song appears only once, how do you link to
> > multiple
> > > Albums?
> > >
> > > So now you are into a "many-to-many" relationship between the Album
> table
> > > and the Songs table - one album has many songs on it AND one song may
> > appear
> > > on several albums. Problem!
> > >
> > > You should not have a field with 'repetition' within it, eg for each
> album
> > > hold two fields: I

upgrading mysql on RedHat

2002-12-02 Thread João Borsoi
I'm trying to update mysql 3.23.49 up to 4.0.5 on a RedHat 7.3 system,
and I'm having some problems. I may be able to solve those problems by
my own, but I'm running out of time and any tip or advice would be
appreciated. I have to solve this today or I will forget updating mysql
at this time.

First, I tried to upgrade the RPMs and got some dependence errors.
Specially with libmysqlclient.so.10. I guess RedHat RPMs may be compiled
not the same way. Is that correct? So, will I have to update all
packages with dependence problems also, like php? Or it's a better idea
compiling mysql? Any advices for my task?

Thanks a lot again,
Joao.




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

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: LEGAL information about MySQL.

2002-12-02 Thread Michael T. Babcock
On Fri, Nov 29, 2002 at 10:30:58PM -0600, Mark Matthews wrote:
> If you are not sure exactly how the GPL works, and you have read the 
> license terms that I've referenced above, and still want to distribute 
> your software that uses and/or links to software licensed under the GPL, 
> I suggest you first seek a lawyer's opinion, and have it explained to 
> you in non-legalese.
 
I also highly recommend you actually ask a lawyer.  However, a few
points need to be made:

1) Install the MySQL software on the user's machine as part of a distro
   they pay for (like RedHat) instead of distributing it yourself.

2) Connecting to MySQL is _not_ the same as linking against it or modifying
   it in some way.  Storing data and fetching data using MySQL connections
   is completely unrestricted by the GPL (IANAL, but this is obvious).

3) Tell your users to pay the distro and MySQL AB for support of those
   subsystems if they have the money and run critical / semi-critical
   operations.  You'll be putting their best interests forward and you
   don't have to worry (IMHO) about MySQL AB trying to compete with you or
   replace you (like IBM, or Oracle, or ...).

4) Be a good Free Software citizen; buy your distro CDs, buy MySQL AB
   support, etc.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd. (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

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

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




RE: Missing quotation mark

2002-12-02 Thread George Pitcher
Not sure if this is the problem, but in your INSERT statement, right at the
end you have this:

'" & "sStatus" & "')"

So you aren't treating this as a variable but as a string. Could this be the
bug?

Cheers

George in Oxford



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 02 December 2002 4:48 pm
> To: ; [EMAIL PROTECTED]
> Subject: Missing quotation mark
>
>
> Hi all,
>
> Sorry about the rain of emails I am having at this list today :-)
>
> I have a missing quotation marks in the following which I can't see.
>
>  sCheckSQL = "SELECT * From LearnerDetails WHERE Title='" &
> sTitle & "' AND FName='" & sFName & "' AND LName='" & sLName & "'
> AND Add1='" & sAdd1 & "' AND Town='" & sTown & "' AND County='" &
> sCounty & "' AND PostCode='" & sPostCode & "' AND
> CurrentlyEmployed='" & sCurrentlyEmployed & "' AND TelPref='" &
> sTelPref & "' AND TelMobile='" & sTelMobile & "' AND Email='" &
> sEmail & "' AND SourceOfEnquiry=" & sSourceofEnquiry & " AND
> EnqTakenBy=" & sEnqTakenBy & " AND Status='" & sStatus & "' AND
> Notes='" & sNotes & "'"
>
>
> * Statement 2
> strSQLDB1 = "INSERT INTO LearnerDetails
> (Title,FName,LName,Add1,Add2,Town,County,PostCode,CurrentlyEmploye
> d,TelPref,TelOth,TelMobile,Email,SourceOfEnquiry,EnqTakenBy,DOB,St
> atus) VALUES ('" & sTitle & "','" & escape(sFName) & "','" &
> sLName & "','" & sAdd1 & "','" & escape(sAdd2) & "','" & sTown &
> "','" & sCounty & "','" & sPostCode & "','" & sCurrentlyEmployed
> & "','" & sTelPref & "','" & escape(sTelOther) & "','" &
> sTelMobile & "','" & sEmail & "'," & sSourceOfEnquiry & "," &
> sEnqTakenBy & "," & sDOB & ",'" & "sStatus" & "')"
>
> ***Statetment 3
>
> sLearnerSQL = "SELECT * From LearnerDetails WHERE Title='" &
> sTitle & "' AND FName='" & sFName & "' AND LName='" & sLName & "'
> AND Add1='" & sAdd1 & "' AND Add2='" & sAdd2 & "' AND Town='" &
> sTown & "' AND County='" & sCounty &"' AND PostCode='" &
> sPostCode & "' AND CurrentlyEmployed='" & sCurrentlyEmployed & "'
> AND TelPref='" & sTelPref & "' AND TelOth='" & sTelOther & "' AND
> TelMobile='" & sTelMobile & "' AND Email='" & sEmail & "' AND
> SourceOfEnquiry=" & sSourceofEnquiry & " AND EnqTakenBy=" &
> sEnqTakenBy & " AND DOB=" & sDOB & " AND Status='" & sStatus & "'
> AND Notes='" & sNotes & "'"
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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




Efficiency of SET column type queries

2002-12-02 Thread speters
I've bene trying to find info on how efficient queries are for the SET
datatype, specifically, how does
MySQL use indexes for SET column types.
I have looked in the O'Reilly MySQL Reference Manual, and at mysql.com and
have found effectively nothing on this subject.
For example, if i have a table :

CREATE TABLE some_table (
...
Set_columnSET("A","B","C","D","E"),
...
KEYset_key(Set_Column)
);


i'm wondering how this column is indexed. I understand that the values
stored are bit representations, i.e.
if i store "A,D", the value stored is 01001 = 9
so i'd assume that the index is on the numeric values like above. So, If I
want to find all rows where
Set_column contains a "C" = 00100 = 4

SELECT * FROM some_table WHERE FIND_IN_SET("C", Set_column) > 0;

for instance, the MySQL engine couldn't just look in the index for all
columns with the (effective) value 4,
because "C,D" = 01100 = 12 would also contain a "C".
In fact, exactly half of the possible numeric values would represent sets
with a "C" in them.
It doesnt seem reasonable that the query engine would look at half of the
index values, so i dont really see how an index on a SET column would ever
be particularly useful.

I havent used sets much, in faact i've intentionally stayed away from them,
but i have an application where SET column types seem to make a lot of
sense, but i want to figure out the indexing issue before implementing it.

The specific application has to do with parsing lines of text and
identifying certain parts of the text based on keywords. So, I'd have a
table that has a "keyword" column (CHAR) , and a "type_of_keyword" column
(SET).
This is because some keywords could indicate multiple things, for instance,
if parsing names, "Thomas" could be a first name or a last name,
which one would need to be determined by context on a case-by-case basis,
but I need to be able to quickly decide what types of keyword
"Thomas" could be. Thats easy, but if i want to get all keywords that
represent last names, it seems that a table scan would need to be performed,
and
trying to use an index would be pointless.

Note that this example is contrived, as there would be 100,000+ last names,
etc.
But the example indicates the (perceived) problem.

Any insight into how indexes work in relation to SET columns would be
appreciated.

thanks
sean peters
[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: unicode encoding

2002-12-02 Thread Egor Egorov
ali,
Monday, December 02, 2002, 2:09:19 PM, you wrote:

af> i want to know does mysql support unicode encoding ?
af> if yes ( i wish ) how can i set this ? are this support automatic or i must
af> do something ?

Unicode support will come in 4.1




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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: GROUP BY .. HAVING . bug or feature?

2002-12-02 Thread Victoria Reznichenko
Heo,
Monday, September 30, 2002, 6:20:53 AM, you wrote:

HJ> I have a following table.

HJ> mysql> SELECT * FROM group_test ;
HJ> +--+--+--+
HJ> | a| b| c|
HJ> +--+--+--+
HJ> |1 |1 |1 |
HJ> |1 |1 |1 |
HJ> |1 |1 |1 |
HJ> |2 |2 |2 |
HJ> |2 |2 |2 |
HJ> |3 |3 |3 |
HJ> +--+--+--+
HJ> 6 rows in set (0.00 sec)

HJ> mysql> SELECt a, COUNT(*) FROM group_test
HJ> -> GROUP BY a, b  ;
HJ> +--+--+
HJ> | a| COUNT(*) |
HJ> +--+--+
HJ> |1 |3 |
HJ> |2 |2 |
HJ> |3 |1 |
HJ> +--+--+
HJ> 3 rows in set (0.00 sec)

HJ> But, when I use HAVING and IN() togather, MySQL returns no rows.

HJ> mysql> SELECt a, COUNT(*) FROM group_test
HJ> -> GROUP BY a, b
HJ> -> HAVING COUNT(*) IN ( 1, 2, 3 ) ;
HJ> Empty set (0.00 sec)

HJ> Other relational operators works well.

HJ> I'm using MySQL 4.0.3

Thank you for bug report, it was fixed.

Currently you can avoid this problem using alias, like

mysql> SELECt a, COUNT(*) as cnt FROM group_test GROUP BY a, b HAVING cnt IN ( 1, 2, 3 
) ;
+--+-+
| a| cnt |
+--+-+
|1 |   3 |
|2 |   2 |
|3 |   1 |
+--+-+
3 rows in set (0.01 sec)



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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




re: The 4.0.6 version

2002-12-02 Thread Egor Egorov
Dyego,
Monday, December 02, 2002, 2:54:16 PM, you wrote:

DSdC> Starting from 4.0.6 mysql is declared as gamma ?

Yes.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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: mysql not working behind linksys router

2002-12-02 Thread Egor Egorov
Mir,
Sunday, December 01, 2002, 5:24:41 AM, you wrote:

MSI> Hi, apologies upfront since this is not directly a mysql question. I
MSI> have a mysql host sitting behind a linksys router/wireless ap. The mysql 
MSI> host is configured as a DMZ host in the router. All web/ftp other 
MSI> connections are working fine, however mysql connection from outside the 
MSI> network is not working. Not only that if there is any inbound connection 
MSI> mysql crashes hard and does not accept any connection or process anymore 
MSI> queries.

MSI> Any idea what could be the possible cause?

What OS? What is the MySQL version? Have you  installed MySQL from binary
or source distribution?

MSI> Does mysql need other ports ope besides 3306 ?

Nope, if MySQL server is running on 3306.

MSI> Other DB (postgres) and services work fine. Although
MSI> I had to do some tricky stuff for the same host before I could get 
MSI> proFTPD working for passive ftp.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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: Bug using batch mode with mysql?

2002-12-02 Thread Joacim Larsson
Has anyone else experienced this problem? To me, it looks like a bug since
according to the MySQL manual, the batch mode should work just as if the
statements where entered directly from the mysql prompt, but it appears not
to be true.

-Joacim

-Original Message-
From: Joacim Larsson [mailto:[EMAIL PROTECTED]]
Sent: den 2 december 2002 00:37
To: [EMAIL PROTECTED]
Subject: Bug using batch mode with mysql?


I am using MySQL 3.23.53 with InnoDB tables on Win2K platform.
My charset is set to latin1 and it works fine when I use Swedish characters
through JDBC. It also works fine if I use them from the mysql command line,
but when I try to use mysql < file.sql to load a set of INSERTs into my
tables
I get weird characters (using SELECT) instead of the exptected Swedish ones.

If I run the same INSERT statement from the mysql prompt it works fine and
I have no problems doing for instance INSERT INTO table VALUES (1, 'åäö');
and getting the åäö back correctly doing a SELECT on that table.

I haven't found out any way to get around this problem.

Is this a bug or am I missing something?

-Joacim


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

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



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

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




RE: Query

2002-12-02 Thread David Lubowa

aah i think i got it ...thanx..



cheers
David Ziggy Lubowa
-Original Message-
From: Danny Haworth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 6:50 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Query


David Lubowa wrote:

>hey guys ..i got a question here i need to do a query which will let me
pull
>3 fields from a table; below is the table
>
>now what i need from this table in one query that will give me all these: "
>Realm, AcctStartTime, AcctStopTime"
>
SELECT Realm, AccStarTime, AcctStopTime FROM radacct;

danny



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

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




Missing quotation mark

2002-12-02 Thread Sam4Software
Hi all,

Sorry about the rain of emails I am having at this list today :-)

I have a missing quotation marks in the following which I can't see.

 sCheckSQL = "SELECT * From LearnerDetails WHERE Title='" & sTitle & "' AND FName='" & 
sFName & "' AND LName='" & sLName & "' AND Add1='" & sAdd1 & "' AND Town='" & sTown & 
"' AND County='" & sCounty & "' AND PostCode='" & sPostCode & "' AND 
CurrentlyEmployed='" & sCurrentlyEmployed & "' AND TelPref='" & sTelPref & "' AND 
TelMobile='" & sTelMobile & "' AND Email='" & sEmail & "' AND SourceOfEnquiry=" & 
sSourceofEnquiry & " AND EnqTakenBy=" & sEnqTakenBy & " AND Status='" & sStatus & "' 
AND Notes='" & sNotes & "'" 


* Statement 2
strSQLDB1 = "INSERT INTO LearnerDetails 
(Title,FName,LName,Add1,Add2,Town,County,PostCode,CurrentlyEmployed,TelPref,TelOth,TelMobile,Email,SourceOfEnquiry,EnqTakenBy,DOB,Status)
 VALUES ('" & sTitle & "','" & escape(sFName) & "','" & sLName & "','" & sAdd1 & "','" 
& escape(sAdd2) & "','" & sTown & "','" & sCounty & "','" & sPostCode & "','" & 
sCurrentlyEmployed & "','" & sTelPref & "','" & escape(sTelOther) & "','" & sTelMobile 
& "','" & sEmail & "'," & sSourceOfEnquiry & "," & sEnqTakenBy & "," & sDOB & ",'" & 
"sStatus" & "')"

***Statetment 3

sLearnerSQL = "SELECT * From LearnerDetails WHERE Title='" & sTitle & "' AND FName='" 
& sFName & "' AND LName='" & sLName & "' AND Add1='" & sAdd1 & "' AND Add2='" & sAdd2 
& "' AND Town='" & sTown & "' AND County='" & sCounty &"' AND PostCode='" & sPostCode 
& "' AND CurrentlyEmployed='" & sCurrentlyEmployed & "' AND TelPref='" & sTelPref & "' 
AND TelOth='" & sTelOther & "' AND TelMobile='" & sTelMobile & "' AND Email='" & 
sEmail & "' AND SourceOfEnquiry=" & sSourceofEnquiry & " AND EnqTakenBy=" & 
sEnqTakenBy & " AND DOB=" & sDOB & " AND Status='" & sStatus & "' AND Notes='" & 
sNotes & "'"




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

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




RE: Query

2002-12-02 Thread David Lubowa

if i have to choose a specific realm within the query , the rest of the
results depend on the realm . how can i do that!!

cheers
David Ziggy Lubowa

-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 6:40 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Query


select Realm, AcctStartTime, AcctStopTime from radacct;

??? Did I miss something here?

=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: David Lubowa [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 9:29 AM
To: [EMAIL PROTECTED]
Subject: Query



hey guys ..i got a question here i need to do a query which will let me pull
3 fields from a table; below is the table

[snip]

mysql> desc radacct;
++-+--+-+-+-
---+
| Field  | Type| Null | Key | Default |
Extra  |
++-+--+-+-+-
---+
| RadAcctId  | bigint(21)  |  | PRI | NULL|
auto_increment |
| AcctSessionId  | varchar(32) |  | MUL | |
|
| UserName   | varchar(32) |  | MUL | |
|
| Realm  | varchar(30) | YES  | | |
|
| NASIPAddress   | varchar(15) |  | MUL | |
|
| NASPortId  | int(12) | YES  | | NULL|
|
| NASPortType| varchar(32) | YES  | | NULL|
|
| AcctStartTime  | datetime|  | MUL | -00-00 00:00:00 |
|
| AcctStopTime   | datetime|  | MUL | -00-00 00:00:00 |
|
| AcctSessionTime| int(12) | YES  | | NULL|
|
| AcctAuthentic  | varchar(32) | YES  | | NULL|
|
| ConnectInfo| varchar(32) | YES  | | NULL|
|
| AcctInputOctets| int(12) | YES  | | NULL|
|
| AcctOutputOctets   | int(12) | YES  | | NULL|
|
| CalledStationId| varchar(10) |  | | |
|
| CallingStationId   | varchar(10) |  | | |
|
| AcctTerminateCause | varchar(32) |  | | |
|
| ServiceType| varchar(32) | YES  | | NULL|
|
| FramedProtocol | varchar(32) | YES  | | NULL|
|
| FramedIPAddress| varchar(15) |  | MUL | |
|
| AcctStartDelay | int(12) | YES  | | NULL|
|
| AcctStopDelay  | int(12) | YES  | | NULL|
|
++-+--+-+-+-
---+
22 rows in set (0.00 sec)
[/snip]

now what i need from this table in one query that will give me all these: "
Realm, AcctStartTime, AcctStopTime"

how can i do this in one query!! and is it possible to set up a script that
can do this for me auto anyone with any ideas

all help is highly appreciated


cheers
David Ziggy Lubowa


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

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 parameters

2002-12-02 Thread Gerald Norman
I sent a previous question about having problems with SQL statements 
using parameters not working in MySQL when they worked in Access.  I am 
using the ODBC driver and ADO and have had no problems at all to date. 
Upon some further research the problem seems limited to SELECT 
statements.  Updates, Inserts and Deletes all work fine, but the SELECT 
statement returns an 'unspecified error'

I can execute the following DELETE statement fine:
DELETE FROM Bio WHERE BioID = ?

However, the SELECT statement:
SELECT * FROM Bio WHERE BioID = ?
returns with an 'unspecified error'

Can anyone provide some insight into this?  Thanks in advance for your 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



Re: Query

2002-12-02 Thread Danny Haworth
David Lubowa wrote:


hey guys ..i got a question here i need to do a query which will let me pull
3 fields from a table; below is the table

now what i need from this table in one query that will give me all these: "
Realm, AcctStartTime, AcctStopTime"


SELECT Realm, AccStarTime, AcctStopTime FROM radacct;

danny


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

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




Error in SQLStatement

2002-12-02 Thread Sam4Software
Hi all,,

I have the following SQL statements...one of them has an error saying :Microsoft OLE 
DB Provider for SQL Server error '80040e14' 

Line 1: Incorrect syntax near ' AND Town='. 


Statement 1**

 sCheckSQL = "SELECT * From LearnerDetails WHERE Title='" & sTitle & "' AND FName='" & 
sFName & "' AND LName='" & sLName & "' AND Add1='" & sAdd1 & "' AND Town='" & sTown & 
"' AND County='" & sCounty & "' AND PostCode='" & sPostCode & "' AND 
CurrentlyEmployed='" & sCurrentlyEmployed & "' AND TelPref='" & sTelPref & "' AND 
TelMobile='" & sTelMobile & "' AND Email='" & sEmail & "' AND SourceOfEnquiry=" & 
sSourceofEnquiry & " AND EnqTakenBy=" & sEnqTakenBy & " AND Status='" & sStatus & "' 
AND Notes='" & sNotes & "'" 

***Statement 2***8
strSQLDB1 = "INSERT INTO LearnerDetails 
(Title,FName,LName,Add1,Add2,Town,County,PostCode,CurrentlyEmployed,TelPref,TelOth,TelMobile,Email,SourceOfEnquiry,EnqTakenBy,DOB,Status)
 VALUES ('" & sTitle & "','" & escape(sFName) & "','" & sLName & "','" & sAdd1 & "','" 
& escape(sAdd2) & "','" & sTown & "','" & sCounty & "','" & sPostCode & "','" & 
sCurrentlyEmployed & "','" & sTelPref & "','" & escape(sTelOther) & "','" & sTelMobile 
& "','" & sEmail & "'," & sSourceOfEnquiry & "," & sEnqTakenBy & "," & sDOB & ",'" & 
"sStatus" & "')"

***Statement 3
sLearnerSQL = "SELECT * From LearnerDetails WHERE Title='" & sTitle & "' AND FName='" 
& sFName & "' AND LName='" & sLName & "' AND Add1='" & sAdd1 & "' " & sAdd2 & "' AND 
Town='" & sTown & "' AND County='" & sCounty &"' AND PostCode='" & sPostCode & "' AND 
CurrentlyEmployed='" & sCurrentlyEmployed & "' AND TelPref='" & sTelPref & "' AND 
TelOther='" & sTelOther & "' AND TelMobile='" & sTelMobile & "' AND Email='" & sEmail 
& "' AND SourceOfEnquiry=" & sSourceofEnquiry & " AND EnqTakenBy=" & sEnqTakenBy & " 
AND DOB=" & sDOB & " AND Status='" & sStatus & "' AND Notes='" & sNotes


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

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




Re: Table setup question

2002-12-02 Thread DL Neil
Beauford,
[please reply to the list - there are always others 'lurking' who will learn
from the discussion (and use of the archives is a wonderful dream...)]

You are correct, there will be duplication in the AlbumSong table - but not
within one field, only within one column. Album will consist of a unique ID
(IDA) and each Title will, one assumes be unique (unless two groups use the
same name - I guess that must be possible). Similarly Songlist will also
consist of a unique ID (IDS) and once again, one assumes that any repetition
of title will be two different songs that share the same name. These two ID
'uniqueness' rules must apply for the next to work, ie you will most likely
define them as PRIMARY KEY columns.

The 'translation' table, breaks the 'unique' 'rule', "So if song Q apears on
albums A, C, and E" as you ask, then we will see:

AlbumSong

IDAIDS
11
21
31

Note that while "1" repeats in AlbumSong, it does not repeat (a) in
Songlist, nor in (b) one row/field of AlbumSong, eg

IDA   IDS
1,2,31
THE ABOVE IS TOTALLY WRONG!!!

In the case of AlbumSong the table will not be able to have a PRIMARY KEY
column(s), but each of the individual columns should probably be INDEXed for
read-speed.

Be aware that AlbumSong contains no real 'data' from an end-user
perspective. It is a table made up purely of 'links' or 'keys' or 'IDs' to
the other two tables. The Album and Songlist tables do all the 'data' work,
AlbumSong does all the 'heavy lifting' to relate Album's data to Songlist's,
and/or vice-versa.

Apologies if this was not clear, first time round,
=dn



> DL,
>
> OK, that helps a lot, but I am still confused. I am still struggling with
> how you can not have duplication in at least one of the tables. A diagram
> here may help.  So if song Q apears on albums A, C, and E - I don't quite
> understand how AlbumSong is going to be able to know which songs are
> duplicated without duplication of ID's. (There are 500 songs and only 36
> albums).
>
> Thanks
>
> AlbumSonglistAlbumSong
>
> IDATITLEIDSSongIDAIDS
>
> 1A   1Q??
> 2B2R??
> 3C3S??
> 4D4T??
> 5E 5V   ??
>?
>?
>?
>?
>?
>?
>
>
>
> - Original Message -
> From: "DL Neil" <[EMAIL PROTECTED]>
> To: "Beauford.2003" <[EMAIL PROTECTED]>; <>
> Sent: Monday, December 02, 2002 4:32 AM
> Subject: Re: Table setup question
>
>
> > Hi Beauford,
> >
> > You are on the right track. Yes you should remove the songs to a
separate
> > table. If you merely duplicate the first example (below) in two tables
you
> > have created a "one-to-many" relationship between the Album table and
the
> > Songs table - one album has many songs on it. Your query code applies.
> >
> > However the Songs table still has duplication in it, eg 3.song appears
> > thrice, and we can't have that! The problem is, if you cut down the
Songs
> > table entries so that 3.song appears only once, how do you link to
> multiple
> > Albums?
> >
> > So now you are into a "many-to-many" relationship between the Album
table
> > and the Songs table - one album has many songs on it AND one song may
> appear
> > on several albums. Problem!
> >
> > You should not have a field with 'repetition' within it, eg for each
album
> > hold two fields: ID, and Songs - where songs is a list of IDs/titles.
This
> > is not 'relational'. You can read up about a process known as
> > "normalisation" which teaches a basic three step process (some go to
more
> > than three steps, but let's learn to walk first...) This normalisation
> > process helps to organise data into 'sets', and as RDBMS/SQL work on
sets
> of
> > data/use set theory to drive events, this is the way to go...
> >
> > So that said, let's proceed. Yes you should set up the song table to
have
> > columns such as ID and Title. The ID should be unique and each Title
> should
> > appear at most once within the table.
> > (It may help to draw a diagram here, with boxes representing tables,
split
> > into columns and rows, and with arrows depicting relationships between
> > tables and the individual data items sitting in col-row combinations)
> >
> > To handle the m-m relationship, create another table and place it 'in
the
> > middle' - to act as a 'trans

Re: LEGAL information about MySQL.

2002-12-02 Thread Benjamin Pflugmann
Hello.

On Mon 2002-12-02 at 11:45:00 -0200, [EMAIL PROTECTED] wrote:
[...]
> In this case, does my client, the web-server or I need to pay a license to
> MySQL AB?
> 
> Please, just wellfounded answers, not personal opinions.

For the authorative answer, just contact [EMAIL PROTECTED]

Regards,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




RE: Query

2002-12-02 Thread Cal Evans
select Realm, AcctStartTime, AcctStopTime from radacct;

??? Did I miss something here?

=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: David Lubowa [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 9:29 AM
To: [EMAIL PROTECTED]
Subject: Query



hey guys ..i got a question here i need to do a query which will let me pull
3 fields from a table; below is the table

[snip]

mysql> desc radacct;
++-+--+-+-+-
---+
| Field  | Type| Null | Key | Default |
Extra  |
++-+--+-+-+-
---+
| RadAcctId  | bigint(21)  |  | PRI | NULL|
auto_increment |
| AcctSessionId  | varchar(32) |  | MUL | |
|
| UserName   | varchar(32) |  | MUL | |
|
| Realm  | varchar(30) | YES  | | |
|
| NASIPAddress   | varchar(15) |  | MUL | |
|
| NASPortId  | int(12) | YES  | | NULL|
|
| NASPortType| varchar(32) | YES  | | NULL|
|
| AcctStartTime  | datetime|  | MUL | -00-00 00:00:00 |
|
| AcctStopTime   | datetime|  | MUL | -00-00 00:00:00 |
|
| AcctSessionTime| int(12) | YES  | | NULL|
|
| AcctAuthentic  | varchar(32) | YES  | | NULL|
|
| ConnectInfo| varchar(32) | YES  | | NULL|
|
| AcctInputOctets| int(12) | YES  | | NULL|
|
| AcctOutputOctets   | int(12) | YES  | | NULL|
|
| CalledStationId| varchar(10) |  | | |
|
| CallingStationId   | varchar(10) |  | | |
|
| AcctTerminateCause | varchar(32) |  | | |
|
| ServiceType| varchar(32) | YES  | | NULL|
|
| FramedProtocol | varchar(32) | YES  | | NULL|
|
| FramedIPAddress| varchar(15) |  | MUL | |
|
| AcctStartDelay | int(12) | YES  | | NULL|
|
| AcctStopDelay  | int(12) | YES  | | NULL|
|
++-+--+-+-+-
---+
22 rows in set (0.00 sec)
[/snip]

now what i need from this table in one query that will give me all these: "
Realm, AcctStartTime, AcctStopTime"

how can i do this in one query!! and is it possible to set up a script that
can do this for me auto anyone with any ideas

all help is highly appreciated


cheers
David Ziggy Lubowa


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

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 replication and network traffic

2002-12-02 Thread Michael T. Babcock
Paolo Pasetti wrote:


Do you usually use a cron job to start and stop slave or just leave it always on?
 


Always leave it on.

Basically, check how big your binary logs are for a day by rotating them 
at midnight two days in a row and that's approximately the network 
traffic for the day.

SQL, QUERY.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



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

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



Query

2002-12-02 Thread David Lubowa

hey guys ..i got a question here i need to do a query which will let me pull
3 fields from a table; below is the table

[snip]

mysql> desc radacct;
++-+--+-+-+-
---+
| Field  | Type| Null | Key | Default |
Extra  |
++-+--+-+-+-
---+
| RadAcctId  | bigint(21)  |  | PRI | NULL|
auto_increment |
| AcctSessionId  | varchar(32) |  | MUL | |
|
| UserName   | varchar(32) |  | MUL | |
|
| Realm  | varchar(30) | YES  | | |
|
| NASIPAddress   | varchar(15) |  | MUL | |
|
| NASPortId  | int(12) | YES  | | NULL|
|
| NASPortType| varchar(32) | YES  | | NULL|
|
| AcctStartTime  | datetime|  | MUL | -00-00 00:00:00 |
|
| AcctStopTime   | datetime|  | MUL | -00-00 00:00:00 |
|
| AcctSessionTime| int(12) | YES  | | NULL|
|
| AcctAuthentic  | varchar(32) | YES  | | NULL|
|
| ConnectInfo| varchar(32) | YES  | | NULL|
|
| AcctInputOctets| int(12) | YES  | | NULL|
|
| AcctOutputOctets   | int(12) | YES  | | NULL|
|
| CalledStationId| varchar(10) |  | | |
|
| CallingStationId   | varchar(10) |  | | |
|
| AcctTerminateCause | varchar(32) |  | | |
|
| ServiceType| varchar(32) | YES  | | NULL|
|
| FramedProtocol | varchar(32) | YES  | | NULL|
|
| FramedIPAddress| varchar(15) |  | MUL | |
|
| AcctStartDelay | int(12) | YES  | | NULL|
|
| AcctStopDelay  | int(12) | YES  | | NULL|
|
++-+--+-+-+-
---+
22 rows in set (0.00 sec)
[/snip]

now what i need from this table in one query that will give me all these: "
Realm, AcctStartTime, AcctStopTime"

how can i do this in one query!! and is it possible to set up a script that
can do this for me auto anyone with any ideas

all help is highly appreciated


cheers
David Ziggy Lubowa


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

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




RE: Error in SELECT

2002-12-02 Thread Salada, Duncan
I see two problems.

1. You seem to be missing a left parentheses (, or you could just get rid of
the right paren.  
2. You need to change "CurrentlyEmployed= AND".  The lack of a value will
cause problems.

Duncan

---
Duncan Salada
Titan Systems Corporation
301-925-3222 x375


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 9:42 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Error in SELECT


Please note...the values that don't have ' ' are int type.

Here is the error bellow:

SELECT * From LearnerDetails WHERE Title='Mr' AND FName='Natasha' AND
LName='Burkenshaw' AND Add1='17 Cromer Road' AND Town='Hornchurch' AND
County='Essex' AND PostCode='RM11 1EY' AND CurrentlyEmployed= AND
TelPref='020 8595 3986' AND TelMobile='07733382300' AND
Email='[EMAIL PROTECTED]' AND SourceOfEnquiry=3 AND
EnqTakenBy=5 AND Status='Call Back' AND Notes='')

Microsoft OLE DB Provider for SQL Server error '80040e14' 

Incorrect syntax near the keyword 'AND'. 

/Learners/SamAddLearner.asp, line 165 


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

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




Error in SELECT

2002-12-02 Thread Sam4Software
Please note...the values that don't have ' ' are int type.

Here is the error bellow:

SELECT * From LearnerDetails WHERE Title='Mr' AND FName='Natasha' AND 
LName='Burkenshaw' AND Add1='17 Cromer Road' AND Town='Hornchurch' AND County='Essex' 
AND PostCode='RM11 1EY' AND CurrentlyEmployed= AND TelPref='020 8595 3986' AND 
TelMobile='07733382300' AND Email='[EMAIL PROTECTED]' AND 
SourceOfEnquiry=3 AND EnqTakenBy=5 AND Status='Call Back' AND Notes='')

Microsoft OLE DB Provider for SQL Server error '80040e14' 

Incorrect syntax near the keyword 'AND'. 

/Learners/SamAddLearner.asp, line 165 


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

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




RE: Error in SELECT

2002-12-02 Thread Simon Green
See Notes

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 02 December 2002 14:01
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Error in SELECT


Hi,

I have the following statement that is causing a syntax error:

sLearnerSQL = "
SELECT * 
>From LearnerDetails 
WHERE Title='" & sTitle & "' 
AND FName='" & sFName & "' 
AND LName='" & sLName & "' 
AND Add1='" & sAdd1 & "' 
AND Add2='" & sAdd2 & "' 
AND Town='" & sTown & "' 
AND County='" & sCounty &"' 
AND PostCode='" & sPostCode & "' 
AND CurrentlyEmployed='" & sCurrentlyEmplyed & "' 
AND TelPref='" & sTelPref & "' 
AND TelOther='" & sTelOther & "' 
AND TelMobile='" & sTelMobile & "' 
AND Email='" & sEmail & "' 

Next three lines have no ''

AND SourceOfEnquiry=" & sSourceofEnquiry & " 
AND EnqTakenBy=" & sEnqTakenBy & " 
AND DOB=" & sDOB & " 
AND Status='" & sStatus & "' 
AND Notes='" & sNotes
No "'; at end
Simon


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

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: [OT] LEGAL information about MySQL.

2002-12-02 Thread David Brodbeck


> -Original Message-
> From: Pae Choi [mailto:[EMAIL PROTECTED]]

> Seems like all against I see are coming from MySQL team.
> I know MySQL is stealing a lot of code from the public
> domain, inclduing the SSL part. How funny!

By definition you can't "steal" anything from the public domain.  It's free
for the taking!

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

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: backing up mySQL database ?

2002-12-02 Thread David Brodbeck


> -Original Message-
> From: Neil Tompkins [mailto:[EMAIL PROTECTED]]

> Can anyone recommend a software app. I could buy to be able 
> to dump data and 
> table structures to a text file.  Ideally as mentioned before 
> I need to run 
> this on a hourly basis.

Backing up the entire database on an hourly basis could be time- and
processor-intensive, if the database gets large.  I'd recommend backing up
the full database at longer intervals (say, nightly) with mysqldump and then
using the update log to fill in any gaps.  If getting the backups onto a
different machine is important you can always just copy the log.  A backup
plus all the update log entries since the backup was taken is sufficient to
recover the database.

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

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




Error in SELECT

2002-12-02 Thread Sam4Software
Hi,

I have the following statement that is causing a syntax error:

sLearnerSQL = "SELECT * From LearnerDetails WHERE Title='" & sTitle & "' AND FName='" 
& sFName & "' AND LName='" & sLName & "' AND Add1='" & sAdd1 & "' AND Add2='" & sAdd2 
& "' AND Town='" & sTown & "' AND County='" & sCounty &"' AND PostCode='" & sPostCode 
& "' AND CurrentlyEmployed='" & sCurrentlyEmplyed & "' AND TelPref='" & sTelPref & "' 
AND TelOther='" & sTelOther & "' AND TelMobile='" & sTelMobile & "' AND Email='" & 
sEmail & "' AND SourceOfEnquiry=" & sSourceofEnquiry & " AND EnqTakenBy=" & 
sEnqTakenBy & " AND DOB=" & sDOB & " AND Status='" & sStatus & "' AND Notes='" & sNotes


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

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: [OT] LEGAL information about MySQL.

2002-12-02 Thread Darney Lampert

Sorry continue this subject ... I´m the author original question, "LEGAL 
information about MySQL".
But I Think that my question is simple and the other answers do not make 
sense to me.
I never said that I change original MySQL source code, and I just want know 
if I can use MySQL database on
my comercial application without pay for it. My application ONLY access MySQL.

I develop a program with Delphi with access MySQL database. I'll sell my
program, and ONLY give a copy of MySQL to the users, or indicate the place
to download to them.

Does my client need to pay a license to MySQL AB?

Other case:
I develop a web-site with PHP wich access MySQL database to a client who
paid for it. The users do not need to install MySQL. Does anybody need to
pay something? Who? (Remember that my Web Server just run PHP and MySQL,
wich are free. My site (wich is paid) uses the services provided by the
web-server)

In this case, does my client, the web-server or I need to pay a license to
MySQL AB?

Please, just wellfounded answers, not personal opinions.

Thanks


At 15:51 30/11/2002 +0100, you wrote:
Hello.

I do not intent to follow-up on the issue, as you are either trolling
or clueless (and not willing to inform yourself) or both.

On Sat 2002-11-30 at 08:30:52 -0500, [EMAIL PROTECTED] wrote:
> Seems like all against I see are coming from MySQL team.

But I want to prevent a misconception: I am in no way affiliated to
MySQL AB than being an user of their software.

Bye,

Benjamin.



Darney Lampert
Sky Informática Ltda 


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

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: The 4.0.6 version

2002-12-02 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dyego --

...and then Dyego Souza do Carmo said...
% 
% Starting from 4.0.6 mysql is declared as gamma ?

That's what the manual and the release announcement say.


[15 lines of obnoxious signature and 8 lines of ridiculous mail list
footer deleted.]

HTH & HAND

mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE962B6Gb7uCXufRwARAlfBAKCj6ATEOgIK+JD0hfRaaGBZmCM3IQCg2mdv
4YMiaQGwXj5U/bqWArGVhg8=
=bHEM
-END PGP SIGNATURE-

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

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

2002-12-02 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joao --

...and then João Borsoi said...
% 
% I working in a project to be released 6 months from now. We are
% currently using mysql 3.23.49 with Innodb. I'm thinking about upgrading
% it to mysql 4.0.5a because of some deadlock bugs. What is the risk of
% going to a development version? Is it stable? 

A development version is never "stable", but the mysql folks tend to be
pretty good about their releases.  To quote the manual from 4.0.6-gamma:

2.2.3 Which MySQL Version to Use
  
 The MySQL naming scheme uses release numbers that consist of three
 numbers and a suffix. For example, a release name like
 mysql-3.21.17-beta is interpreted like this:
  ...
   * The suffix (beta) indicates the stability level of the release.
 The possible suffixes are:
+ alpha indicates that the release contains some large section
  of new code that hasn't been 100% tested. Known bugs (usually
  ...
  release. There should be no known bugs in any MySQL release.
+ beta means that all new code has been tested. No major new
  ...
+ gamma is a beta that has been around a while and seems to
  work fine. Only minor fixes are added. This is what many
  other companies call a release.
+ If there is no suffix, it means that the version has been run
  for a while at many different sites with no reports of bugs
  other than platform-specific bugs. Only critical bug fixes
  are applied to the release. This is what we call a stable
  release.

Since the development branch is at 4.0.6-gamma, it's pretty stable.  You
might also check out section 1.2.3 "How Stable is MySQL?".


% 
% Thanks,
% Joao.


HTH & HAND

mysql query,
:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE961yIGb7uCXufRwARAggsAKCHfwucTYh/I/fhaa6oQUdK5B1bsACdG06d
Vy9OJxoCf2RlnUR/xvXWckE=
=Jgfg
-END PGP SIGNATURE-

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

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: Null data after table rebuild

2002-12-02 Thread Scott Balmos
The original version that the data would've been built on was MySQL
3.23.52 under Linux x86 (Debian Sarge to be more specific).

I'm currently rebuilding the database under MySQL 3.23.53 under WinXP.

--
Scott Balmos

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 7:18 AM
To: [EMAIL PROTECTED]
Subject: re: Null data after table rebuild

Scott,
Monday, December 02, 2002, 5:46:18 AM, you wrote:

SB> I'm in the process of rebuilding a table in MyISAM format. I can see
the
SB> plaintext data in the .MYD file just fine. But after running
myisamchk
SB> -i table, which reports fine and repairs the index to the correct
388
SB> rows... I go under the command line client and run a standard select
*
SB> query on the repaired table. The correct number of rows is returned
SB> (388). However, all the data is null.

What is the version of MySQL server? What OS?



-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
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




ATAF 6.0 is released and is ready to be downloaded

2002-12-02 Thread sales
Dear mySQL list members

I'm writing to inform you that ATAF version 6.0 is released today, and is ready to be 
downloaded under Http://www.ataf.dk

ATAF's amazingly easy way to convert your MS-Access or ODBC database to an Internet 
web application is now drastically improved compared to the old 5.1.1 version. 

Some of the many new ATAF features are:

* Upload and showing of pictures without any server component
* Dropdown boxes with key and values
* Much better control over the output design
* You can now select what pages you want to create
* A debug pages to test you IIS server if it is setup correctly 

 --and much more

To see the whole list of improvements go to Http://www.ataf.dk or you can try the 
online demo http://www.ataf.dk/design/database/ where a normal MS-database is 
converted to a full web database application in 3 easy steps with the ATAF Software.

Also the ATAF-CON tool to convert you MS-Access design and data to mySQL is ready in 
an updated version. 

I hope the new version 6.0 version can help you develop database applications faster, 
and thank you for supporting ATAF

Best regards

Christian
---
This is not a Spam Email !!!  You got this Email because you before have contacted me 
in relation with the domains www.ccr.dk / www.ataf.dk/ www.bookplacard.com
If you got this Email by mistake please send me an Email to [EMAIL PROTECTED] and I will 
remove from this list.

Also visit www.bookPLACARD.com your place to exchange books and other media for free

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

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




The 4.0.6 version

2002-12-02 Thread Dyego Souza do Carmo

Starting from 4.0.6 mysql is declared as gamma ?


sql,query
-
  ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento   
-
 E S C R I B A   I N F O R M A T I C A
-
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
-- 
$ look into "my eyes" Phone : +55 041 296-2311  r.112
look: cannot open my eyes Fax   : +55 041 296-6640
-
   Reply: [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




unicode encoding

2002-12-02 Thread ali farhad
hi all
i want to know does mysql support unicode encoding ?
if yes ( i wish ) how can i set this ? are this support automatic or i must
do something ?

thax  in advance
ali
http://www.freewebz.com/alphautils


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

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




RE: Table setup question

2002-12-02 Thread Adolfo Bello
Try something like
CREATE TABLE album( ida int primary key , title varchar(n) not null ) ;
CREATE TABLE songs( ids intprimary key, song varchar(m) not null ) ;
CREATE TABLE albumsongs(
ida int not null,
ids int not null,
primary key(ida,ids),
foreign key(ida) references album(ida),
foreign key(ids) references songs(ids));

Querying for albums which have a songs is something like:
SELECT title,song FROM album INNER JOIN albumsongs ON ...
INNER JOIN songs ON ... WHERE song='your song name';


> -Original Message-
> From: Beauford.2003 [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, December 01, 2002 9:59 PM
> To: [EMAIL PROTECTED]
> Subject: Table setup question
> 
> 
> Hi,
> 
> I have a database of albums by a group and I want to be able 
> to search on this table to find out what songs are duplicated 
> on what albums (there are
> 36+ albums). The problem is how do I set up the database.
> 
> Example:
> 
> Album1 has 3 songs.  1.song, 2.song, 3.song, 4.song
> Album2 has 4 songs.  4.song, 5.song, 6.song, 3.song
> Album3 has 4 songs.  7.song, 8.song, 1.song, 3.song
> 
> So 3.song appears on all 3 albums.
> 
> Currently I have it set up with two tables as shown below, 
> but I am thinking there has to be a better way to do this 
> than to duplicate the name of the song three, four, or five 
> times in the table.
> 
> Table AlbumName
> 
> AlbumID
> ==
> Album1   1
> Album2   2
> Album3   3
> 
> Table SongTitle
> 
> SongID
> === ==
> 3.song  1
> 3.song  2
> 3.song  3
> 7.song  3
> etc.
> etc.
> 
> So basically my search is  - SELECT Album, Song FROM 
> AlbumName, SongTitle WHERE AlbumName.ID=SongTitle.ID;
> 
> Given the setup above, is there a way that I can put in the 
> SongTitle.ID field that song appears on more than one album. 
> Maybe something like:
> 
> SongID
> === ==
> 3.song  1, 2, 3
> 
> But then what would my search be.
> 
> Sorry for the length of this, but I am learning MySQL and 
> trying to get a handle on all of it. My way works, but I'm 
> sure there has to be a better way.
> 
> Any thoughts are appreciated.
> 
> TIA, Beauford
> 
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> 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: advice

2002-12-02 Thread Danny Haworth
João Borsoi wrote:


I working in a project to be released 6 months from now. We are
currently using mysql 3.23.49 with Innodb. I'm thinking about upgrading
it to mysql 4.0.5a because of some deadlock bugs. What is the risk of
going to a development version? Is it stable? 
 

I've been living on the "edge of a knife", running a production system 
on 4.0.1/2/4/5 for the last few months, had some minor problems with 
4.0.3 but every other release has been quite solid. So, no, I dont think 
you'll run into any problems ;-)

regards,

danny


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

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



backup using .bat in Delphi

2002-12-02 Thread Silmara
I'm working with Delphi and MySQL, and I would like to do  a backup through
my application executing a .bat like
c:\mysql\bin\mysqldump -h%1 -u%2 -p%3 DATABASE>%4, but when I run bat
through of the following statement
" if ExecuteFile('bkdata.bat ',192.128.0.6+ ' USER' + ' PASSWORD'+'
C:\'+FormataData(DATE(),'DDMM')+'.SQL','c:\',SW_HIDE)=42
  then StatusBar1.Panels[0].Text:='sucessfull!'
 else StatusBar1.Panels[0].Text:=('Error');"

The .bat is run and the execution of the my application continue and show
"sucessfull" before the finalization of the backup, after that I try to
compact the .SQL but it's impossible, because the backup yet not finished,
remaining the .SQL in use.

How do I do so that my application waits until the end of the backup for
later to continue?


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

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: Converting Access to MySQL

2002-12-02 Thread Adolfo Bello
SELECT @myvar := 1 ;


> -Original Message-
> From: Gerald Norman [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, December 01, 2002 10:37 PM
> To: [EMAIL PROTECTED]
> Subject: Converting Access to MySQL
> 
> 
> I have an application that currently is using an Access 
> database and am 
> in the process of converting over to MySQL.  I downloaded the ODBC 
> driver and have been using ADO and have had no problems at all up to 
> this point.  I have a number of  parameterized SQL statements that 
> worked fine in Access, but aren't working at all with MySQL.  I know 
> that MySQL supports variables in SQL statements using the @ prefix. 
>  I've tried setting that as the prefix for the parameters but 
> it doesn't 
> work.  I keep getting a 'unspecified error' when the SQL statement 
> executes.  Am I missing something or does MySQL not support 
> parameters 
> that can be set at runtime?  Thanks in advance for any assistance.
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> 
> 


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

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




re: re: re: re: Multi-Table Updates

2002-12-02 Thread Egor Egorov
ajitdixit,
Wednesday, November 27, 2002, 7:44:55 PM, you wrote:

aasdcdi> I had earlier downloaded mysql-4.1.1 development branch source code and had
aasdcdi> noticed that This bug is also present in 4.1.1 development tree source code

Merge of 4.0.6 changes into 4.1 was made several days ago.

aasdcdi> I had downloaded mysql-4.0 development source code as mentioned in mysql
aasdcdi> documentation but could not compile it as innodb related libraries were not
aasdcdi> present in this code




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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: Null data after table rebuild

2002-12-02 Thread Victoria Reznichenko
Scott,
Monday, December 02, 2002, 5:46:18 AM, you wrote:

SB> I'm in the process of rebuilding a table in MyISAM format. I can see the
SB> plaintext data in the .MYD file just fine. But after running myisamchk
SB> -i table, which reports fine and repairs the index to the correct 388
SB> rows... I go under the command line client and run a standard select *
SB> query on the repaired table. The correct number of rows is returned
SB> (388). However, all the data is null.

What is the version of MySQL server? What OS?



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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




re: MySQL 3.23.49 Merger table

2002-12-02 Thread Victoria Reznichenko
Kittiphum,
Saturday, November 30, 2002, 2:09:00 AM, you wrote:

KW> Why merge table have been done with table that have column char type
KW> not varchar type.

KW> Have anyone succesfully with varchar type merge table and how to do
KW> that. 

KW> And how to use union query if merge table not work with varchar or 
KW> what SQL to use for convert varchar back to char 

It works perfectly well for me:

mysql> create table t1(name varchar(10));
Query OK, 0 rows affected (0.01 sec)

mysql> create table t2(name varchar(10));
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t1 values('aa'),('bb');
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> insert into t2 values('cc'),('dd');
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> create table total(name varchar(10)) TYPE=MERGE UNION=(t1, t2);
Query OK, 0 rows affected (0.01 sec)



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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




re: No port listed

2002-12-02 Thread Egor Egorov
David,
Saturday, November 30, 2002, 4:57:58 AM, you wrote:

DHM> I'm running mysql 3.23.53 on Red hat linux 7.1.
DHM> When i do mysqladmin version, it does not list a port and

Because you connect to a Unix socket, not to a TCP/IP port. 

DHM> when I do mysqladmin -h 'hostname' version, it says that 
DHM> Host 'hostname' is not allowed to connect to this MySQL server.

It's a pemission problem:
http://www.mysql.com/doc/en/Access_denied.html




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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




advice

2002-12-02 Thread João Borsoi
I working in a project to be released 6 months from now. We are
currently using mysql 3.23.49 with Innodb. I'm thinking about upgrading
it to mysql 4.0.5a because of some deadlock bugs. What is the risk of
going to a development version? Is it stable? 

Thanks,
Joao.




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

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




普光网络

2002-12-02 Thread 普光网络
MySQL Reference Manual for version 3.23.7-alpha. -  ...:ÄúºÃ!
ÆÕ¹âÍøÂç  ÐֵܽãÃÃÃÇÈ¥Õâ¸öÍøÕ¾ÇÆһϣ¬Èç¹û¾õµÄ¿ÉÒԵĻ°¾Í×¢²á°É¡£Ç®ÊÇÉÙÒ»µã²»¹ý¶¼ 
ÊÇʵÔڵģ¬ÎÒÒѵõ½ÁË30¶àÔªÁË¡£ 
http://www.nu18.com/hz/?mid=extraterres´ó¼ÒֻҪͨ¹ýÏÂÏß¾ãÀÖÁªÃË×¢²á³ÉΪÆÕͨ»áÔ±(ÊÇÃâ·ÑµÄѽ)£¬Íê³ÉÿÌìµÄ10¸öµã»÷Á´½Ó£¬ºÃºÃµØ×ö£¬Ã»ÓÐϼ¶´úÀíÿ¸öÔÂÒ²ÄÜÊÕÇ®
 £¡£²£µ£¥Ëļ¶Ï¼¶´úÀíÌá³É£¡£¡£¡ÔÚÿÈË·¢Õ¹5¸öϼ¶´úÀíµÄÇé¿öÏ£¬ÄãµÄËļ¶Ï¼¶´úÀí×ܹ²Îª£º 
5+25+125+625=780ÈË £¬Ã¿ÌìÿÈËÒÔ10µã»÷¼ÆË㣬£²£µ£¥Ëļ¶Ï¼¶´úÀíÌá³É£º 
780*0.0075*10=58.5Ôª/Ìì¡£ ·¢Õ¹Îå¸öϼ¶´úÀí²»ÄÑ°É,¸ß¼¶»áÔ±µÄÊÕÈëÔÚ2±¶ÒÔÉÏ¡£ 
¸¶¿î·½Ê½¶àÑù£¬¼´¿ÉÒÔÊǹúÄÚÒøÐÐÕÊ»§£¬ÒÔ¿ÉÒÔÓÃÍøÉÏEgold¸¶¿î¡£ 
×îµÍÖ§¸¶¶î:¹úÄÚÒøÐÐÕÊ»§£ºÆÕͨ»áÔ±:$5|¸ß¼¶»áÔ±:$2;  
¡¡Egold:¡¡ÆÕͨ»áÔ±$3|¸ß¼¶»áÔ±£º$0.01£®±¾Õ¾Ö§³ÖËļ¶Ï¼¶´úÀí,ÿ¼¶Ï¼¶´úÀí¶¼ÊÇ25%£¡ 
»¹µÈʲô¿ìÀ´°É£¡£¡£¡http://www.nu18.com/hz/?mid=extraterres




ÖÂ
Àñ!
   ÆÕ¹âÍøÂç
   [EMAIL PROTECTED]
   2002-12-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




Fw: Sorting by abbr weekdays

2002-12-02 Thread DL Neil
maps filter fodder: MySQL


> Hi Terence,
>
> > Is there a way to sort records based on a particular column, varchar(3),
> > which contains days of the week, mon, tue, wed, thu, fri, sat, sun
> >
> > I need the order to be mon, tue, wed, thu etc.
> >
> > Select day_of_week from my_timetable
> > order by day_of_week
> >
> > Gives
> >
> > >fri
> > >mon
> > >sat
> > >sun
> > >thu
> > >tue
> > >wed
> >
> > Is is possible?
>
>
> You could consider encoding day data within the tables as numerics 0~6 or
> 1~7, and then use SET operations within SELECT to convert to
text/abbrevns.
> Alternatively put both alpha and num info in the table, quoting from one
and
> ordering on the other...
>
> Take a look at the manual's Date-time Functions page for ideas.
>
> Regards,
> =dn
>


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

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




Re: ENUM and select performance

2002-12-02 Thread DL Neil
Alex,

This is a specialised question! Unfortunately, in my experience, it comes
down to the phrase YMMV (your mileage might vary) and thus requires you to
experiment with your data/machine combinations/etc - good job MySQL makes
this quite easy!

Can I assume that you have done your (manual) homework reading up about
MySQL quirks and efficiencies? In which case it boils down to ENUM offering
a storage efficiency over (say) tinytext fields (when multiplied by tens of
thousands of rows). I think that you will find that any processing
efficiencies are so minor that they disappear into the server's disk
retrieval time variations (but every little helps...).

The contrary thought is that tinytext makes for a more readable (raw data)
table, and is likely to be more scaleable if more choices are added to a
data item over time - remember ENUM hits the wall at 8 or 16
bits/enumeration values (and SETs also have 'knees' and 'shoulders' in their
expansion possibilities) whereas many more choices would be available in
two, three, or four character text strings - sensible abbreviation allowing.

When I was young (and innocent) and storage was a premium commodity, we
would try to structure the life out of systems, and thus ENUM what we could.
These days the parameters have changed, and I think it is cheaper on dev and
maint time to go for something (both code and data) that is more readable -
and therefore 'faster'/cheaper/better...

You mention having an eye-color table and then inserting IDs into the
primary table. Yes you could do this. However every data-fetch will require
a join, and the structure not save much storage (even multiplied up...).
Consider having tables of eye-colors, etc, for data-validation purposes, but
putting the full abbreviation, eg "BLU" into the primary table's field
rather than a join-necessitating ID (multiplied by multiple criteria/each
identification point being used).

Does that cover your main points? Will be happy to toss around more of these
ideas/thoughts...

Regards,
=dn



> I'm working on a project that involves storing a lot of attributes for
> individuals (think height, weight, eye color, hair color, skin tone,
> etc.) and will later require searching on those attributes (i.e. return
> all blue-eyed people with red hair).
>
> I'm trying to figure out how to store all of these attributes in my
> MySQL database.  I can think of two potential ways to do it:
>
> 1. Use the ENUM datatype for fields like eye color.
>
> 2. Create small tables for each attribute - i.e
>
> create table eyecolor (
> id int not null primary key auto_increment,
> color varchar(10)
> )
>
> and insert the appropriate ID in an eyecolor field in the person table.
>
> Can someone tell me what the performance implications are for each
> approach?  Is the ENUM datatype effectively doing the same thing behind
> the scenes (that is, creating some hidden table somewhere and storing an
> integer in the actual table)?  Will select performance be equivalent
> with both approaches - that is, would
>
> SELECT name FROM person WHERE eyecolor = 'blue' AND haircolor = 'red'
>
> where eyecolor and haircolor are both ENUM fields be equivalent in
> performance to a non-normalized table using the varchar datatype, or
> would it be equivalent to my second approach -
>
> SELECT name FROM person WHERE eyecolor = 1 AND haircolor = 3
>
> We'll be doing a lot of these queries with much larger WHERE clauses, so
> I want to be careful not to make a mistake here.
>
> Thanks,
>
> -Alex
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Table setup question

2002-12-02 Thread DL Neil
Hi Beauford,

You are on the right track. Yes you should remove the songs to a separate
table. If you merely duplicate the first example (below) in two tables you
have created a "one-to-many" relationship between the Album table and the
Songs table - one album has many songs on it. Your query code applies.

However the Songs table still has duplication in it, eg 3.song appears
thrice, and we can't have that! The problem is, if you cut down the Songs
table entries so that 3.song appears only once, how do you link to multiple
Albums?

So now you are into a "many-to-many" relationship between the Album table
and the Songs table - one album has many songs on it AND one song may appear
on several albums. Problem!

You should not have a field with 'repetition' within it, eg for each album
hold two fields: ID, and Songs - where songs is a list of IDs/titles. This
is not 'relational'. You can read up about a process known as
"normalisation" which teaches a basic three step process (some go to more
than three steps, but let's learn to walk first...) This normalisation
process helps to organise data into 'sets', and as RDBMS/SQL work on sets of
data/use set theory to drive events, this is the way to go...

So that said, let's proceed. Yes you should set up the song table to have
columns such as ID and Title. The ID should be unique and each Title should
appear at most once within the table.
(It may help to draw a diagram here, with boxes representing tables, split
into columns and rows, and with arrows depicting relationships between
tables and the individual data items sitting in col-row combinations)

To handle the m-m relationship, create another table and place it 'in the
middle' - to act as a 'translator' of the m-m relationship. This table will
contain AlbumID and SongID columns, and the data fields contained will NOT
(necessarily) be unique.
(draw another diagram to compare with the above/initial format)

Now you can start from Album and code a join to the 'translator' table to
find the IDs of every song appearing on the album, and then join any 'hits'
from that 'relationship' to the Songs table to realise the titles, etc,
detail.

Conversely, you can start at the Songs table and by joining to the
'translator' table work out which Album(s) a song appears on by AlbumID, and
then join to the Album table to find out titles and other album details.

Some people start from card-box/shoe-box databases (which are really ordered
files), and others from 'DBMS' that only 'relate' two tables at a time. If
having multiple joins looks a bit 'hairy' to you, do not fear, this is what
relational databases are all about, and joins featuring five to ten tables
are quite 'routine'. MySQL will have no trouble performing (the logic, and
at speed)!

Regards,
=dn


> I have a database of albums by a group and I want to be able to search on
> this table to find out what songs are duplicated on what albums (there are
> 36+ albums). The problem is how do I set up the database.
>
> Example:
>
> Album1 has 3 songs.  1.song, 2.song, 3.song, 4.song
> Album2 has 4 songs.  4.song, 5.song, 6.song, 3.song
> Album3 has 4 songs.  7.song, 8.song, 1.song, 3.song
>
> So 3.song appears on all 3 albums.
>
> Currently I have it set up with two tables as shown below, but I am
thinking
> there has to be a better way to do this than to duplicate the name of the
> song three, four, or five times in the table.
>
> Table AlbumName
>
> AlbumID
> ==
> Album1   1
> Album2   2
> Album3   3
>
> Table SongTitle
>
> SongID
> === ==
> 3.song  1
> 3.song  2
> 3.song  3
> 7.song  3
> etc.
> etc.
>
> So basically my search is  - SELECT Album, Song FROM AlbumName, SongTitle
> WHERE AlbumName.ID=SongTitle.ID;
>
> Given the setup above, is there a way that I can put in the SongTitle.ID
> field that song appears on more than one album. Maybe something like:
>
> SongID
> === ==
> 3.song  1, 2, 3
>
> But then what would my search be.
>
> Sorry for the length of this, but I am learning MySQL and trying to get a
> handle on all of it. My way works, but I'm sure there has to be a better
> way.
>
> Any thoughts are appreciated.
>
> TIA, Beauford
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: system date / curdate()

2002-12-02 Thread DL Neil
Hi Kath,
Are the MySQL machine, the Linux machine, and the client you are using all
the same machine?
Which timezone is Linux set to?
Which timezone is your local/client machine in, and/or set to?
Please advise,
=dn


> hi, which date does mysql use to calculate CURDATE()? I have a master
> database telling me via the select CURDATE(); command that today is :
>
> mysql> select CURDATE();
> ++
> | CURDATE()  |
> ++
> | 2002-12-01 |
> ++
> 1 row in set (0.00 sec)
>
> even though the linux date is set correctly to the 2nd dec
>
> [root@db01 ntp-4.1.1]# date
> Mon Dec  2 13:20:15 EST 2002
> [root@db01 ntp-4.1.1]#
>
> cheers
> Kath
>
>
>
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


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

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




Re: mysql join problem (bug?)

2002-12-02 Thread DL Neil
Haksun,
Confirming that my system-combination (below) works as expected and does NOT
exhibit the XP 'bug' you are experiencing.
My system's output is 1 2 1 2 + 1 4 1 2 + 1 2 1 4 + 1 4 1 4.
Regards,
=dn


> DL,
>
> Thanks for the reply.
> Can you give more details please?
>
> If I understand you correctly, you did not reproduce the errors I get.
> In other words, your output was exactly the same as
>
> > > f1  f2  f1  f2
> > >
> > > 1 2 1 2
> > >
> > > 1 4 1 2
> > >
> > > 1 2 1 4
> > >
> > > 1 4 1 4
> > >
>
>
> If that is the case, is this a Win-XP specific bug?
> Can someone running versions other than MySQL 4.0.5-beta on XP verify if
> it is a bug please?
>
> Thanks!
>
>
> Haksun
>
> > -Original Message-
> > From: DL Neil [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, December 01, 2002 3:39 PM
> > To: Haksun Li; [EMAIL PROTECTED]
> > Subject: Re: mysql join problem (bug?)
> >
> > Hi Haksun,
> > Cross-join works perfectly on 3.23.53-max-nt under Win2000 SP2, both
> from
> > command line and MySQL Control Center 0.8.6-alpha.
> > Regards,
> > =dn
> >
> >
> > > Hi all,
> > >
> > >
> > >
> > > I found this join problem using mysql 3.23.53-max-nt (on WinXP).
> > >
> > > It works fine on MySQL 3.23.52-log (on Linux).
> > >
> > >
> > >
> > > Could someone please confirm that it is a bug? Or enlighten me on
> > > writing the correct sql?
> > >
> > >
> > >
> > > I have a table and data as shown in the script below.
> > >
> > >
> > >
> > >
> > >
> > > CREATE TABLE test (
> > >
> > >   f1 int(11) NOT NULL default '0',
> > >
> > >   f2 int(11) NOT NULL default '0'
> > >
> > > ) TYPE=MyISAM;
> > >
> > >
> > >
> > > #
> > >
> > > # Dumping data for table `test`
> > >
> > > #
> > >
> > >
> > >
> > > INSERT INTO test VALUES (1, 2);
> > >
> > > INSERT INTO test VALUES (1, 4);
> > >
> > >
> > >
> > >
> > >
> > > Then I do a join with this query:
> > >
> > >
> > >
> > > SELECT t1.*, t2.* from test as t1, test as t2 where t1.f1 = t2.f1
> > >
> > >
> > >
> > > Unfortuantley, I got this output.
> > >
> > >
> > >
> > >
> > >
> > > f1  f2  f1  f2
> > >
> > > 1 2 1 2
> > >
> > > 1 2 1 2
> > >
> > > 1 4 1 4
> > >
> > > 1 4 1 4
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > I would expect the output like this (which I get on Linux using
> MySQL
> > > 3.23.52-log). I also get this using other DB (e.g. Access).
> > >
> > >
> > >
> > > f1  f2  f1  f2
> > >
> > > 1 2 1 2
> > >
> > > 1 4 1 2
> > >
> > > 1 2 1 4
> > >
> > > 1 4 1 4
> > >
> > >
> > >
> > >
> > >
> > > Does anyone else experience the same problem?
> > >
> > >
> > >
> > > Thanks.
> > >
> > >
> > >
> > > Haksun
> > >
> > >
> > >
> > >
>
>


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

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




Sorting by abbr weekdays

2002-12-02 Thread Terence
Hi all,

Is there a way to sort records based on a particular column, varchar(3),
which contains days of the week, mon, tue, wed, thu, fri, sat, sun

I need the order to be mon, tue, wed, thu etc.

Select day_of_week from my_timetable
order by day_of_week

Gives

>fri
>mon
>sat
>sun
>thu
>tue
>wed

Is is possible?

Thanks

sq, mysql

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

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 replication and network traffic

2002-12-02 Thread Paolo Pasetti
Hello,

I'd like to know how much traffic the slave generates to retrieve sql data on master 
server in a database replication configuration.

I'm interested in knowing this: does the slave generate traffic even if no updates are 
done on the master (traffic for waiting data?) ?

Do you usually use a cron job to start and stop slave or just leave it always on?

Thanks
Paul


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

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   >