Re: why would LOWER

2001-10-01 Thread Carl Troein


Joe Kaiping writes:

 Is it expected that using the LOWER function should greatly increase query
 time?

The way you do it, yes.
Is that email column a BLOB or a BINARY VARCHAR? If not,
why on earth do you do LOWER() on it? And do you have an
index on the column?

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


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

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: unixODBC..

2001-10-01 Thread Srinivasa T.N.

Well, if I use the SQL statements specific to MySQL in my application, 
then won't I loose portability??

Seenu.

Venu wrote:

You can execute any valid SQL statements through SQLExecDirect API. Please
check the MySQL document, http://www.mysql.com/documentation/index.html,
which can guide you what and all SQL statements you can execute it.

Regards, venu




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

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




Re: last_insert_id() bug ?? using INSERT IGNORE

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 12:30:10AM -0400, [EMAIL PROTECTED] wrote:
 Paul DuBois INSERT IGNORE can't fully assess whether the record is to be
 ignored
 Paul DuBois until the record's contents have been generated.
 
 And why can't it wait until after the ignore/don't ignore assessment before
 assigning a new id?

Because it's written in modules. First, the record is created
(including incrementing the id), then the table handler is called and
the record gets written. If it would be a duplicate, an error is
created.  If IGNORE is specified, the error is ignored silently.

To solve the IGNORE beforehand, you would have to do most of the work
(accessing the disk) twice. Of course, one could code around that, but
that would get a huge special case.

The best idea I come up with is to return a special error that tells
the upper layer what happened and that this saves and afterswards
restores this value. Not pretty either.

 Call it a bug... call it a design feature... call it
 what ever... it doesn't change the fact that the behavior is
 counter-intuitive and could cause problems with some designs

Well, the row wasn't inserted, so don't expect LAST_INSERT_ID() to
have a reasonable value. There are other means to detect whether a row
was inserted.

You are right, in that the documentation might considered wrong. It
says that LAST_INSERT_ID() has the value to the last automatic id
created, which isn't wholely true, because it just got overwritten.

On the other hand, the behaviour is the same, if you get an error
during writing for another reason. One can argue over that all over
(should it behave like an error although IGNORE is specified...).

 (at the very least, having gaps in the sequence could result in
 minor performance degradation due to uneven key distribution).

There will be no gaps?! When the next row is inserted, it gets the
same value assigned again, until a record is successfully inserted.

The only problem I can see is with mass inserts where the last record
violates a unique key and therefore has to be ignored, and if one
wants to use that last value - although that a rather special case.

Bye,

Benjamin.

 
 Will French
 
  -Original Message-
  From: Paul DuBois [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, September 30, 2001 10:45 PM
  To: marcus davy; [EMAIL PROTECTED]
  Subject: Re: last_insert_id() bug ?? using INSERT IGNORE
 
 
  At 11:44 AM +1200 10/1/01, marcus davy wrote:
  If you specify the keyword IGNORE in an INSERT, any rows that duplicate
  an existing PRIMARY or UNIQUE key in the table are ignored and are not
  inserted.
  But the last_insert_id() function still appears to increment by one
  in situations when the query is not adding any new information to
  the table.
  
  This looks like a bug to me can anyone enlighten me to this anomaly?
 
  Why is it a bug?
 
  INSERT IGNORE can't fully assess whether the record is to be ignored
  until the record's contents have been generated.
[...]

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




How to link three tables with joins on one table?

2001-10-01 Thread lorenz

Hallo,

how can i link three tables with joins on one table?

Select
b.IdentNrA,b.Menge,b.Preis,b.ArtPosition,c.Artikel_Status,d.beschTitel,e.Str
asse,e.PLZ,e.Stadt,e.Land
From
Bestellungen_Status_Text f right join (BestellungenAdr e inner join
Bestellungen a using(IdentNrS)) using (BestellStatus) inner join
BestellungenP b using (IdentNrS) inner join artikel c using (IdentNrA) inner
join ArtikelText d using (IdentNrA)
Where
b.IdentNrS = 22 and
d.Sprache = 'DE'
Order By b.ArtPosition

does not work.

Thank you very much

Armin


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

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: unixODBC..

2001-10-01 Thread Venu

Hi Srinivas !!!

 -Original Message-
 From: Srinivasa T.N. [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 12:56 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: unixODBC..


 Well, if I use the SQL statements specific to MySQL in my application,
 then won't I loose portability??

You should be familiar with SQL standards, in order to distinguish between
the standard syntax and vendor specific syntax. When you want to write an
ODBC application for portability, you should make sure you are not using
any of the vendor specific syntax.

By the way, MySQL follows strict ANSI SQL standards 89, 92 and 99. So,
I guess you should be able to do with the same syntax without any problems.

MySQL helps you in order to make the portability applications, by
differentiating between the standard and its own syntax. You can find
more about this, in the following link:

http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#Comp
atibility

Hope this helps you
Regards, venu

 Venu wrote:

 You can execute any valid SQL statements through SQLExecDirect API. Please
 check the MySQL document, http://www.mysql.com/documentation/index.html,
 which can guide you what and all SQL statements you can execute it.
 
 Regards, venu
 
--
For technical support contracts, go to https://order.mysql.com
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Venu mailto:[EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/ California, USA
   ___/ 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




mysql_insert_id

2001-10-01 Thread Matthew Fincham

Hello

Firstly, this is my first query, so I can only hope I have sent it to the
correct list!

I am using the C API for MySQL, and using the mysql_insert_id() function to
get the last id assigned in an AUTO INCREMENT column. Orignially I was using
3.22.32 and everything worked fine. Upon upgrading to 3.23.35 the call to
mysql_insert_id(MYSQL*) returned the same value for every call. Each time a
new connection is made, this value seems to increase (e.g it will be 14,
then make a new connection, then it is 15 for that session...)

I am sure I am reading the documenation correctly, but can't seem to find
what is wrong. Any help with this problem (or my reading ability!) would be
greatly appreciated.

Thank you
Matthew Fincham


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

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




Support

2001-10-01 Thread Manish Mehta

Hello,
 
Does MySQL Support Distributed Database .If not, then what's the way out ? 

Manish Mehta




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

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




ANNOUNCE: moodss-14.6

2001-10-01 Thread Jean-Luc Fontaine

Hi everybody: here is a new version of moodss.


Check it out! (or at least the screenshots at
http://jfontain.free.fr/moodss3.gif or
http://jfontain.free.fr/moodss4.gif :).


### CHANGES ###

--- version 14.6 ---

in threshold alert email message, it is now possible to attach the
   screenshot of the moodss window at the time threshold event
   occured
MySQL modules myvars, myquery, mystatus and myprocs no longer initiate
   connection to test database
myquery modules wrongly tried to get MySQL processes list
in preferences, a bug in the thresholds email page prevented properly
   closing the dialog box
fixed bug in thresholds dialog box that prevented dynamic creation of
   new threshold
moodss application now uses wish instead of wish8.3 as associated
   application so that for example simply typing moodss works on
   Redhat 7.1
in memstats module, added support for Linux kernel 2.4.10
successfully tested with ghostscript 6.51 (for print preview)

### README ###

This is moodss (Modular Object Oriented Dynamic SpreadSheet) version
14.6.

Moodss won in the Best System Admin Technology category (Tcl Tips and
Tricks, Valuable Real World Programming Examples) at the O'Reilly
Tcl/Tk 1999 Conference.
Linux Magazine calls it a lifesaver.
Tucows gives it 5 stars (cows or penguins :-).

Moodss is a modular application. It displays data described and
updated in one or more modules, which can be specified in the command
line or dynamically loaded or unloaded while the application is
running. Data is originally displayed in tables. Graphical views
(graph, bar, 3D pie charts, ...), summary tables (with current,
average, minimum and maximum values) and free text viewers can be
created from any number of table cells, originating from any of the
displayed viewers. Thresholds can be set on any number of cells.

Specific modules can easily be developed in the Tcl, Perl and Python
scripting languages or in C.

A thorough and intuitive drag'n'drop scheme is used for most viewer
editing tasks: creation, modification, type mutation, destruction,
... and thresholds creation. Table rows can be sorted in increasing or
decreasing order by clicking on column titles. The current
configuration (modules, tables and viewers geometry, ...) can be saved
in a file at any time, and later reused through a command line switch,
thus achieving a dashboard functionality.

The module code is the link between the moodss core and the data to be
displayed. All the specific code is kept in the module package. Since
module data access is entirely customizable (through C code, Tcl,
Perl, Python, HTTP, ...) and since several modules can be loaded at
once, applications for moodss become limitless.
For example, thoroughly monitor a dynamic web server on a single
dashboard with graphs, using the Apache, MySQL, cpustats, memstats,
...  modules. If you have replicated servers, dynamically add them to
your view, even load the snmp module on the fly and let your
imagination take over...

Along with a core trace module, random, ps, cpustats, memstats,
diskstats, mounts, route, arp, kernmods, netdev, pci, system, MySQL
(myquery, mystatus, myprocs, myvars) modules for Linux, ping, snmp and
snmptrap for UNIX, apache and apachex modules are included (running
wish moodss ps cpustats memstats mimics the top application with a
graphic edge and remote monitoring capability).

Thorough help is provided through menus, widget tips, a message area,
a module help window and a global help window with a complete HTML
documentation.

Moodss is multi-langual thanks to Tcl internationalization
capabilities. So far only English and partially French are
supported. Help with other languages will be very warmly welcomed.

Development of moodss is continuing and as more features are added in
future versions, backward module code compatibility will be maintained.

I cannot thank the authors of the tkTable, BLT, MIME/SMTP and the HTML
libraries enough for their great work.

In order to run moodss, you need to install the following packages
(unless you can use the rpm utility, see below):
Tcl/Tk 8.3.1 or above, at (or at a mirror near you)
   http://dev.scriptics.com/ or ftp://ftp.scriptics.com/
the latest tkTable widget library at:
   http://www.hobbs.wservice.com/tcl/main.html
the latest BLT library at:
   ftp://tcltk.sourceforge.net/pub/tcltk/blt/
eventually the latest tclperl library for writing modules in Perl, or
the latest tclpython library for writing modules in Python at:
   http://jfontain.free.fr/
(see the INSTALL file for complete instructions, for UNIX and also
Windows platforms).

You also have the option of using the moodss rpm file (also in my
homepage), if you are using a Redhat Linux system (6.0 or above).
You can find the required tcl, tk, tktable, blt, tcpperl and other
rpms at: http://jfontain.free.fr/

Whether you like it (or hate it), please let me know. I would like to
hear about bugs and improvements you would like to see. I will correct
the bugs quickly, 

Heap tables replication

2001-10-01 Thread Peter Zaitsev

Hello mysql,

  Could anyone tell me if heap tables are cyrrently working with
  replication.

  As I remember some time ago you might get problems then server
  restarts (so empty it's heap tables) there fore slave does not and
  so it gets dublicate key errors on inserts to this tables, which is
  right as they allready have such values.
  

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


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

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




data-mining packages for MySQL, or other freeware?

2001-10-01 Thread Lukasz Huminiecki


Hello!

I am looking for a free-ware data-mining package, preferably one that
would be somehow geared-up for use with MySQL. 

I must say, I am more interested in scientific data-mining rather than
business applications, so perhaps something too focused on sales
etc. won't do. 

If there is no freeware, what is the best commercial package? Again
it's more about scientific (biology) rather than business data.

Could anybody help?


Lukasz




Lukasz Huminiecki, D.Phil.Tel: 01223 494451
EnsEMBL programmerFax: 01223 494468
European Bioinformatics Institute [EMAIL PROTECTED]
EMBL Outstation - Hinxton Home: 01799 528196
Wellcome Trust Genome Campus
Hinxton, Cambridge
CB10 1SD, UK

www.ensembl.org

   


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

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




MS-Access

2001-10-01 Thread Andreas Schmidt

Hi List

I want to migrate from a NT-Server to a Linux Server. Therefore I'm
looking
for a solution to run my existing MS-Access-Databases under MySQL. Is
there a chance to point from a MySQL-DB to a MS-Access-DB in order that
my data can stay within the MS-Access-DB?

Andi


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

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: MS-Access

2001-10-01 Thread webadmin

On Mon, 1 Oct 2001, Andreas Schmidt wrote:

 Hi List

 I want to migrate from a NT-Server to a Linux Server. Therefore I'm
 looking
 for a solution to run my existing MS-Access-Databases under MySQL. Is
 there a chance to point from a MySQL-DB to a MS-Access-DB in order that
 my data can stay within the MS-Access-DB?


Hi.
I find this:

Exportsql/Importsql. Convert Mircrosoft Access databases to MySQL and
vice versa. These tools are Access functions that can be used to export
Access tables in a format readable by MySql. They can also convert SQL
output from MySQL and mSql into a form readable by access.

I am also interesting in the same question/topic as you. That's why I post
this... Perhaps somebody known this tool or have somethings like a perl
module for this situation??

Karl :-)




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

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: unixODBC..

2001-10-01 Thread Trond Eivind Glomsrød

Srinivasa T.N. [EMAIL PROTECTED] writes:

 Well, if I use the SQL statements specific to MySQL in my application,
 then won't I loose portability??

For the most part - there are certain tricks you can try, which takes
advantage of text which looks like comments to other databases.

If you want to write standards compliant SQL for MySQL, you should
really take a look at http://www.mysql.com/doc/C/o/Compatibility.html
, to see what MySQL does and doesn't support.

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

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

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




Permission problem

2001-10-01 Thread Harpreet

Hello list members,

I am running mysql on a linux server.  I can connect to it using telnet and
also using mysql client. I am given all the permissions. I am trying to
create a few php pages and want to ftp them to the linux server . I am using
WS_FTP. i can view the folder where i need to put the files but i cant move
the files to it. It can be done from the linux server but i cant do them
myself from my computer. What am i missing?? like i can got from /var/www/
and then when i click on html folder it gives me error message permisiion
denied.
Help will be apppreciated,

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: Andreas Schmidt [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 10:53 AM
To: [EMAIL PROTECTED]
Subject: MS-Access


Hi List

I want to migrate from a NT-Server to a Linux Server. Therefore I'm
looking
for a solution to run my existing MS-Access-Databases under MySQL. Is
there a chance to point from a MySQL-DB to a MS-Access-DB in order that
my data can stay within the MS-Access-DB?

Andi


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

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: PHP/MySQL question - need help with fputs, mysql statements

2001-10-01 Thread Tony Wells

Dave Lake wrote:
 
 Hi Folks
 
 I have used MySQL for some time and am just getting my head around PHP. I
 looked across a number of PHP sites for some input on this but failing to
 find an answer thought I would ask some MySQL users (surely many of you are
 using PHP right? ;-) ) for help.
 
 I recently read a tutorial on mysql/php on webmonkey
 (http://hotwired.lycos.com/webmonkey/99/21/index3a.html for the specific
 page if what I've written below isn't clear)
 
 After doing the mysql query the results are printed out to the screen/web
 page similar to:
 
 while ($myrow = mysql_fetch_array($result)) {
  printf(br%s: %s %s - %s\n, $myrow[pos], $myrow[first],
 $myrow[last], $myrow[age]);
 }
 
 Where I ran into a problem was when I attempted instead to write to a
 file.
 
 After opening the file I wanted to print out to I tried several different
 attempts to no avail.
 
 I tried fputs($theFile, br%s: %s %s - %s\n, $myrow[pos],
 $myrow[first], $myrow[last], $myrow[age])
 

Your PHP looks suspiciously like C... :)  fputs in PHP doesn't do the %
substitutions like printf.

Try modifying the line to look like this and see if this works:  (I'm
assuming you're actually opening the file for a write...)

fputs($theFile, br$myrow[pos]: $myrow[first] $myrow[last] -
$myrow[age]\n); 

 and other similar but kept getting string error messages.
 
 I eventually came up with the following solution:
 
 while ($myrow = mysql_fetch_array($result)) {
 
   $mypos = $myrow[pos]; $myfirst = $myrow[first];  $mylast =
 $myrow[last];  $myage =  $myrow[age];
 
   fputs($theFile,
 trtd$mypos/tdtd$myfirst/tdtd$mylast/tdtd$myage/td/tr\n);
 
 }
 
 This is okay if I am only grabbing four items but from some of my tables
 the query might return 20 columns.
 
 Wonder if you can explain two things for me?
 
 The %s in the printf statements above seem to be a placeholder associated
 with the $myrow[pos] for example. Can you use this in an fputs statement?
 
 How would I go about printing my mysql query out to a file rather than the
 screen?
 
 My solution above works but would be rather cumbersome, and I believe there
 should be a more straightforward way but I can't figure it out.
 
 Thanks in advance.
 
 Dave Lake
 [EMAIL PROTECTED]
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Privileges

2001-10-01 Thread Ing. Gustavo Edelstein

Hi list members,
I've just downloaded and installed MySQL 3.23.XX for an HPUX 11.00. Every
time I try connect to it I must insert a record in the table user for the PC
(host) in which I'm trying the connection.
Is there any way to avoid this and allow any user on any host to connect ?
Thanks

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [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




FW: Permission problem

2001-10-01 Thread Harpreet


Can the administrator grant me rights to transfer files to a specific folder
and if yes how do i do it?

Also earlier i could view the default index.html page through the web now i
get the error messgae Forbidden
You don't have permission to access / on this server.

What am i missing. I am very new to mysql and linux and am still testing
different things.

And thanks for ur help.
regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: Dan Liu [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 11:33 AM
To: [EMAIL PROTECTED]
Subject: Re: Permission problem


I got similiar problem before.The reason that I got permission denied is I
did not have the right to transfer file to a specific folder.

 Harpreet [EMAIL PROTECTED] 10/01/01 10:29AM 
Hello list members,

I am running mysql on a linux server.  I can connect to it using telnet and
also using mysql client. I am given all the permissions. I am trying to
create a few php pages and want to ftp them to the linux server . I am using
WS_FTP. i can view the folder where i need to put the files but i cant move
the files to it. It can be done from the linux server but i cant do them
myself from my computer. What am i missing?? like i can got from /var/www/
and then when i click on html folder it gives me error message permisiion
denied.
Help will be apppreciated,

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



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

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




RE: MS-Access

2001-10-01 Thread Haapanen, Tom

This helps you convert the data to a MySQL database (a much faster and more
robust datastore than JET).

If you need to access the data from both platforms, including existing
Access applications, install  MyODBC on NT, create a suitable ODBC DSN and,
then, in Access, use File  Get External Data  Link Tables to get access to
the data residing on the MySQL server.

Tom Haapanen
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, 01 October, 2001 10:17
To: Andreas Schmidt
Cc: [EMAIL PROTECTED]
Subject: Re: MS-Access


On Mon, 1 Oct 2001, Andreas Schmidt wrote:

 Hi List

 I want to migrate from a NT-Server to a Linux Server. Therefore I'm
 looking
 for a solution to run my existing MS-Access-Databases under MySQL. Is
 there a chance to point from a MySQL-DB to a MS-Access-DB in order that
 my data can stay within the MS-Access-DB?


Hi.
I find this:

Exportsql/Importsql. Convert Mircrosoft Access databases to MySQL and
vice versa. These tools are Access functions that can be used to export
Access tables in a format readable by MySql. They can also convert SQL
output from MySQL and mSql into a form readable by access.

I am also interesting in the same question/topic as you. That's why I post
this... Perhaps somebody known this tool or have somethings like a perl
module for this situation??

Karl :-)




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

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




msql client , C++ , compiler ,mysql header files , and mysql client library

2001-10-01 Thread Lou DAmbrosio

Hi list members:

What is required to be installed on webserver (redhat linux i686) as far as
msql client , C++ , compiler ,mysql header files , and mysql client library
.
Any help would be greatly appreciated.


THANKS
LOUIE

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

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




No combination of basedir and datadir seems to work

2001-10-01 Thread Todd Merriman

Description:

Setting basedir=/var/lib/mysql produces the error message:
/usr/libexec/mysqld: Can't change dir to '/var/lib/mysql/var/' (Errcode: 2)
with datadir not set to anything

Setting datadir=/var/lib/mysql produces the error message:
011001 13:32:27  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' 
(errno: 13)
with basedir not set to anything

Setting both datadir and basedir=/var/lib/mysql produces the error message:
011001 13:33:57  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

How-To-Repeat:
Problem can easily be repeated using above steps.

Fix:
Have found no work arounds.  Tried linking /var/lib/mysql/var to 
/var/lib/mysql, but that did not work.

Submitter-Id:  submitter ID
Originator:Todd Merriman
Organization:
Software Toolz, Inc.
MySQL support: none
Synopsis:  Startup cannot find database
Severity:  serious
Priority:  low
Category:  mysql
Class: sw-bug
Release:   mysql-3.23.42-max (Official MySQL-max binary)

Environment:
System: Linux thor.imgphoto.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-81)
Compilation info: CC='gcc'  CFLAGS='-O3 -mpentium '  CXX='gcc'  CXXFLAGS='-O3 
-mpentium  -felide-constructors'  LDFLAGS='-static'
LIBC: 
lrwxrwxrwx1 root root   13 Jul 30 13:14 /lib/libc.so.6 - libc-2.2.2.so
-rwxr-xr-x1 root root  1236396 Apr  6 17:58 /lib/libc-2.2.2.so
-rw-r--r--1 root root 26350254 Apr  6 15:27 /usr/lib/libc.a
-rw-r--r--1 root root  178 Apr  6 15:27 /usr/lib/libc.so
Configure command: ./configure  --prefix=/usr/local/mysql '--with-comment=Official 
MySQL-max binary' --with-extra-charsets=complex --with-server-suffix=-max 
--enable-assembler --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static 
--disable-shared --with-berkeley-db --with-innodb


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

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




2 Byte Characters

2001-10-01 Thread Mike Eggleston

I need some help,

I need to know how MySQL would handle different language character stes.  In
particular, I need to know how MySQL would handle 2 Byte Characters.  Does
this mean my VarChar (30) would only be able to hold 15 characters, or does
it understand that, and automatically adjust for it??  Thanks all!!
--
---

Mike Eggleston
[EMAIL PROTECTED]
(480) 443-4058 x113



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

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:Permission problem

2001-10-01 Thread Harpreet

Awesome!!! Thanks u so much Deepanshu.
Yes we changed it to 755 and we can see all the pages in the browser and
also in the ftp software.

But i still cannot transfer files from my computer to the web directory. I
can overwrite the existing pages like index.html and can see the changes in
the web browser but cannot transfer any new files.

I am sure i am missing somewhere here also. Help is greatly appreciated.


Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: Deepanshu Shukla [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 1:26 PM
To: [EMAIL PROTECTED]
Subject: Re: FW: Permission problem



--- Harpreet [EMAIL PROTECTED] wrote:
 Also earlier i could view the default index.html
 page through the web now i
 get the error messgae Forbidden
 You don't have permission to access / on this
 server.

try changing executable permission to ur web directory
to 755 and same to all the files insideincluding
ur home directory(!this part is imp).




=
Deepanshu
[ KReSIT ]
  IIT-B
[EMAIL PROTECTED]

__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.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




How to delete diferent lines in 2 tables ?

2001-10-01 Thread fi-claudemir

Hi

I'working with two tables (table1 and table2).

I 'm trying to use a sub-select to delete the lines that are in the 
table2 but are not in the table1
but I didn't get it.

Below the way I've tried:

DELETE FROM Table1 SELECT Table1.* FROM Table1 LEFT JOIN Table2 ON 
Table1.ID=Table2.ID WHERE Table2.ID IS NULL;

DELETE FROM Table1 WHERE IN (SELECT Table1.* FROM Table1 LEFT JOIN 
Table2 ON Table1.ID=Table2.ID WHERE Table2.ID IS NULL);

The two ways do not work nd I  got a Syntax error near  'SELECT 
Table1.'
The NOT IN Function also did not work .


Can Somebody help me ?
Regards
Claudemir F. Martins



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

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




confirmation of transferred records from myodbc

2001-10-01 Thread melissa allman

Hi,

I am working on a project that involves using a form to populate a MYSQL 
table.
I then need to transfer these records to an Access database. I want to have a
flag on the MYSQL table to indicate that the record was successfully sent to 
Access.
It could be an on/off or Y/N value. I am trying to avoid duplication of
tranfereed records. Has anyone done this?

Thanks,
Melissa

---
The Fastest Browser on Earth.
Get your FREE download of Opera at http://www.opera.com/download/
---


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

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




Lots of restarts?

2001-10-01 Thread Jonathan Hilgeman

Hi People,
I'm new to this list, so forgive me if I sound like a newbie. Anyhow, here's
my issue...

I have a script that notifies me when there are mySQL errors in one of my
PHP scripts. Today I just got an error saying that MySQL server was gone.
I checked it out and noticed that it was still up, but apparently it had
restarted itself - the uptime was only 4 minutes. Then I noticed all the log
files. MySQL is set to store all the queries in the binary log files. I
figured I would get 1 big log, but I have about 70 in the past month, and
some are blank except for an indication that the server is up at a certain
time:

# at 4
#010917  0:46:33 server id  1   Start: binlog v 1, server v 3.23.36-log
created 010917  0:46:33

Now, what is the issue here? Are these log files getting created each time
the server restarts? And if so, why would my server restart so much on its
own? I have only restarted it once...

- Jonathan

---
What goes up, must come down. Ask any system administrator.



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

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: Post Installation Question

2001-10-01 Thread Intekhab Choudhury

Hi,
   I have done the following
$./bin/mysql -uroot mysql 

Reading table information for completion of table and
column names 
You can turn off this feature to get a quicker startup
with -A
Welcome to the MySQL monitor.  Commands end with ; or
\g.
Your MySQL connection id is 12 to server version:
3.23.42-log

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

mysql UPDATE user SET password=password('test123')
where user='root';
Query OK, 2 rows affected (0.24 sec)
Rows matched: 2  Changed: 2  Warnings: 0

mysql commit
- ;
Query OK, 0 rows affected (0.00 sec)

mysql exit

Restarted safe_mysqld

but when I attempt to connect using mysql client (from
windows 2000), I get 
Host 'my_hostname' is not allowed to connect to this
MySQL server

p.s. I am only starting and stopping mysql from Host
as mysql user.

Regards
--- Intekhab Choudhury [EMAIL PROTECTED]
wrote:
 Hi,
I think I have one of the most basic question.  I
 just installed mysql 3.23.4x version for HPUX 10.20
 (binaries). Installation went fine, but now can't
 access mysql  (created the database  following mysql
 direction, but can't go forwardfollowing error
 is
 what I get... (Try to access using gui from a
 windows
 box, but no access
 
 $/usr/local/mysql
 [136] ./bin/mysqlshow mysql
 ./bin/mysqlshow: Access denied for user:
 '@localhost'
 to database 'mysql'
 
 $./bin/mysql -e select host,db,user from db mysql 
  
 
 ERROR 1044: Access denied for user: '@localhost' to
 database 'mysql'
 
 Obviously authentication mess up, but I didn't do
 anything (just followed the direction from mysql
 documents)
 
 Anyway, how can I access my installation version? 
 Thanks for help 
 
 Regards
 
 IHC
 
 __
 Do You Yahoo!?
 Listen to your Yahoo! Mail messages from any phone.
 http://phone.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
 


__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.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




ISAPI MySQL

2001-10-01 Thread Roger

Hi,
Anyone know how to use MySQL in
an ISAPI (Borland Delphi 5 Web Broker technology, or genl ISAPI)
application?
Thanks,
Roger


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

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




Re: How to delete diferent lines in 2 tables ?

2001-10-01 Thread Carl Troein


fi-claudemir writes:

 I 'm trying to use a sub-select to delete the lines that are in the 
 table2 but are not in the table1
 but I didn't get it.

If you had bothered to read the manual you would've known
that subselects aren't implemented yet, and there's no way
to specify more than one table when doing DELETE or SET.

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


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

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: ISAPI MySQL

2001-10-01 Thread massey

You can use the same basic way as if you where using M$ or IB using the
MyODBC or ?

I use ASTA and connect through that way. If you need more let me know I'll
try and help you out.

M;)

 Hi,
 Anyone know how to use MySQL in
 an ISAPI (Borland Delphi 5 Web Broker technology, or genl ISAPI)
 application?
 Thanks,
 Roger


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

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




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

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: ISAPI MySQL

2001-10-01 Thread Carl Troein


Roger writes:

 Hi,
 Anyone know how to use MySQL in
 an ISAPI (Borland Delphi 5 Web Broker technology, or genl ISAPI)
 application?

I don't have any experience with ISAPI, but as far as I know
the major point is that your programs have to be thread safe
and use a thread safe version of the mysql client library.
A good place to start would probably be
http://www.mysql.com/doc/T/h/Threaded_clients.html

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


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

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




User Permissions Issue (Easy questions?)

2001-10-01 Thread Erica Douglass

Hi,

I am working with an internal database. We add a user using the
following statements:

create database name_of_database;

GRANT alter, create, delete, drop, insert, select, update, index ON
name_of_database TO username@localhost identified by password with
grant option;

GRANT alter, create, delete, drop, insert, select, update, index ON
name_of_database TO username@%.ourdomain.com identified by password
with grant
option;

flush privileges;

First of all, the second statement gives an error message. What is the
correct syntax for adding user@%.ourdomain.com?

Also, when logging in as the newly created user, I can't create any
tables under the newly created database. If I go into phpMyAdmin and
give a create permission to the new user, that user gets it on all
databases, which I don't want. 

I am very, very frustrated. I just want each user to have their own
database that they can do whatever they want with, without letting them
see all the other databases. I know this is possible.

Please help.

Thanks,
Erica


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

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

2001-10-01 Thread Robert Martin


Hi,

I’m still learning sql so I hope this doesn’t sound to basic.

I would like to find out if there is a way to insert a record only when (X and Y) do 
not exist.
I have the value to check against stored in a variable.

My table looks like the following:

ID |  X  |  Y
-
1  | 10 | 20
2  | 11 | 21

ID is an auto-increment field, X and Y are INT(4).

The syntax I’m looking for is sort of like this:

Success:
INSERT INTO table_name (X, Y)
VALUES (10,23) WHERE (X  myX) AND (Y  myY)

Fail:
INSERT INTO table_name (X, Y)
VALUES (10,20) WHERE (X  myX) AND (Y  myY)

I know this won’t work, but I’m trying to avoid the overhead of running a query and 
checking the result before each INSERT.
Would a  “compound primary key” help? (To be honest I only have a slight idea of what 
one is.)
Can one be created in MySQL?

Thanks in advance,
Robert Martin


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

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

2001-10-01 Thread Robert Martin


Hi,

I’m still learning sql so I hope this doesn’t sound to basic.

I would like to find out if there is a way to insert a record only when (X and Y) do 
not exist.
I have the value to check against stored in a variable.

My table looks like the following:

ID |  X  |  Y
-
1  | 10 | 20
2  | 11 | 21

ID is an auto-increment field, X and Y are INT(4).

The syntax I’m looking for is sort of like this:

Success:
INSERT INTO table_name (X, Y)
VALUES (10,23) WHERE (X  myX) AND (Y  myY)

Fail:
INSERT INTO table_name (X, Y)
VALUES (10,20) WHERE (X  myX) AND (Y  myY)

I know this won’t work, but I’m trying to avoid the overhead of running a query and 
checking the result before each INSERT.
Would a  “compound primary key” help? (To be honest I only have a slight idea of what 
one is.)
Can one be created in MySQL?

Thanks in advance,
Robert Martin


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

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

2001-10-01 Thread Adams, Bill TQO

Robert Martin wrote:

 Hi,

 I?m still learning sql so I hope this doesn?t sound to basic.

 I would like to find out if there is a way to insert a record only when (X and Y) do 
not exist.
 I have the value to check against stored in a variable.

ALTER TABLE table ADD UNIQUE u_xy_idx ( x, y );

Then when you go to insert a duplicate x,y you will get an error from MySQL.

--Bill



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

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: User Permissions Issue (Easy questions?)

2001-10-01 Thread Curtis Maurand



grant alter, create, delete, drop, insert, select, update, index ON
name_of_database.* to name_of_database TO username@localhost identified by
password with grant option;

then

grant alter, create, delete, drop, insert, select, update, index ON
name_of_database.* to name_of_database TO username@%.ourdomain.com
identified by password with grant option;

should do the trick for you.

Curtis Maurand
President
Maine Line Systems



On Mon, 1 Oct 2001, Erica Douglass wrote:

 Hi,

 I am working with an internal database. We add a user using the
 following statements:

 create database name_of_database;

 GRANT alter, create, delete, drop, insert, select, update, index ON
 name_of_database TO username@localhost identified by password with
 grant option;

 GRANT alter, create, delete, drop, insert, select, update, index ON
 name_of_database TO username@%.ourdomain.com identified by password
 with grant
 option;

 flush privileges;

 First of all, the second statement gives an error message. What is the
 correct syntax for adding user@%.ourdomain.com?

 Also, when logging in as the newly created user, I can't create any
 tables under the newly created database. If I go into phpMyAdmin and
 give a create permission to the new user, that user gets it on all
 databases, which I don't want.

 I am very, very frustrated. I just want each user to have their own
 database that they can do whatever they want with, without letting them
 see all the other databases. I know this is possible.

 Please help.

 Thanks,
 Erica


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

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



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

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




RE: sql syntax INSERT

2001-10-01 Thread Joe Kaiping

You probably want a unique index for those cols.  Check out:

http://www.mysql.com/doc/C/R/CREATE_TABLE.html (search for unique in page)

and

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

-Joe

 -Original Message-
 From: Robert Martin [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 12:50 PM
 To: [EMAIL PROTECTED]
 Subject: sql syntax INSERT



 Hi,

 I’m still learning sql so I hope this doesn’t sound to basic.

 I would like to find out if there is a way to insert a record
 only when (X and Y) do not exist.
 I have the value to check against stored in a variable.

 My table looks like the following:

 ID |  X  |  Y
 -
 1  | 10 | 20
 2  | 11 | 21

 ID is an auto-increment field, X and Y are INT(4).

 The syntax I’m looking for is sort of like this:

 Success:
 INSERT INTO table_name (X, Y)
 VALUES (10,23) WHERE (X  myX) AND (Y  myY)

 Fail:
 INSERT INTO table_name (X, Y)
 VALUES (10,20) WHERE (X  myX) AND (Y  myY)

 I know this won’t work, but I’m trying to avoid the overhead
 of running a query and checking the result before each INSERT.
 Would a  “compound primary key” help? (To be honest I only
 have a slight idea of what one is.)
 Can one be created in MySQL?

 Thanks in advance,
 Robert Martin


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

 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: MS-Access

2001-10-01 Thread Curtis Maurand



Look in the contrib section of the website.  There are scripts for
exporting Access databases to mysql.

Curtis

On Mon, 1 Oct 2001 [EMAIL PROTECTED] wrote:

 On Mon, 1 Oct 2001, Andreas Schmidt wrote:

  Hi List
 
  I want to migrate from a NT-Server to a Linux Server. Therefore I'm
  looking
  for a solution to run my existing MS-Access-Databases under MySQL. Is
  there a chance to point from a MySQL-DB to a MS-Access-DB in order that
  my data can stay within the MS-Access-DB?
 

 Hi.
 I find this:

 Exportsql/Importsql. Convert Mircrosoft Access databases to MySQL and
 vice versa. These tools are Access functions that can be used to export
 Access tables in a format readable by MySql. They can also convert SQL
 output from MySQL and mSql into a form readable by access.

 I am also interesting in the same question/topic as you. That's why I post
 this... Perhaps somebody known this tool or have somethings like a perl
 module for this situation??

 Karl :-)




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

 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: User Permissions Issue (Easy questions?)

2001-10-01 Thread Erica Douglass

Thank you so much! That worked. 

*big sigh of relief*

Erica

 -Original Message-
 From: Carsten H. Pedersen [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, October 01, 2001 12:48 PM
 To: Erica Douglass
 Subject: RE: User Permissions Issue (Easy questions?)
 
 
  Hi,
  
  I am working with an internal database. We add a user using the 
  following statements:
  
  create database name_of_database;
  
  GRANT alter, create, delete, drop, insert, select, update, index ON 
  name_of_database TO username@localhost identified by 
 password with 
  grant option;
  
  GRANT alter, create, delete, drop, insert, select, update, index ON 
  name_of_database TO username@%.ourdomain.com identified by 
 password 
  with grant option;
  
  flush privileges;
  
  First of all, the second statement gives an error message. 
 What is the 
  correct syntax for adding user@%.ourdomain.com?
  
  Also, when logging in as the newly created user, I can't create any 
  tables under the newly created database. If I go into 
 phpMyAdmin and 
  give a create permission to the new user, that user gets 
 it on all 
  databases, which I don't want.
 
 I didn't take the time to check this thoroughly, but try these:
 
 1) Make sure you put quotation marks around both the username 
 and the host, e.g.
 
   username@%.ourdomain.com
 
 2) The mistake might be in the fact that you specify 
 name_of_database rather than name_of_database.*, i.e. 
 using the dot-star combination.
 
 Although you have clearly read the manual, the following
 might give you some pointers as well: 
 http://www.bitbybit.dk/mysqlfaq/faq.html#ch6_0 _0
 
 Finally, 
 the flush privileges that you do is 
 unnecessary. This is only necessary when you fiddle with the 
 grant tables directly; GRANT and REVOKE automatically flush 
 the privileges.
 
 / Carsten
 --
 Carsten H. Pedersen
 keeper and maintainer of the bitbybit.dk MySQL FAQ 
http://www.bitbybit.dk/mysqlfaq



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

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




Cannot get server to honor configuration settings

2001-10-01 Thread Mailing List Receiver

With basedir and datadir=/var/lib/mysql the error is:
011001 16:16:42  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

With basedir=/var/lib/mysql and datadir not set:
/usr/libexec/mysqld: Can't change dir to '/var/lib/mysql/var/' (Errcode: 2)
011001 16:18:23  Aborting
011001 16:18:23  /usr/libexec/mysqld: Shutdown Complete

With datadir=/var/lib/mysql and basedir not set:
More information on setting the parameters you find in the
manual.
011001 16:19:19  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

The server version: /usr/libexec/mysqld  Ver 3.23.42-max for pc-linux-gnu on i686
This is the latest version available from www.mysql.com.
I also tried the latest version available from Red Hat (a little older
version) with the same results.

What gives?

Todd Merriman
[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




MySQL on NT

2001-10-01 Thread Dave Carter

I've been scouting around for hosts that offer both W2k/NT support as well
as mySQL, but I haven't been able round up one! is there a good reason for
this? It seems to me that the hosting public is just not educated that mySQL
even can run on NT.

Thoughts?

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


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

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




Re: msql client , C++ , compiler ,mysql header files , and mysql client library

2001-10-01 Thread Kirk Strauser


At 2001-10-01T17:31:46Z, Lou DAmbrosio [EMAIL PROTECTED] writes:

 What is required to be installed on webserver (redhat linux i686) as far
 as msql client , C++ , compiler ,mysql header files , and mysql client
 library

To do what?
-- 
Kirk Strauser
Internet Software Engineer
NMotion, Inc.

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

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




Temporary Files?

2001-10-01 Thread Isaac Wagner


Could someone explain to me how/when mysql uses temp files.. running a
new dedicated db server with twice as much ram as the old one, and the
new one keeps dumping 400+mb data into a temp file when the database is
searched, both with LIKE and MATCH/AGAINST statements... i have never
looked to see how big the tmp files actually get because it crashes our
coldfusion servers in the process. I am confused as to why this would
happen on the new server when it doesnt on the old one

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

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




Deleting from a table but specifying another..

2001-10-01 Thread Chad Day

I'm trying to remove rows from one table where a column matches another
column in a seperate table..

I have mysql 3.22.32:

DELETE TemporaryUsers_ToMessWith.* FROM TemporaryUsers_ToMessWith,
Advantage_Backup WHERE Advantage_Backup.TempAccountNumber =
TemporaryUsers_ToMessWith.TempAccountNumber AND
TemporaryUsers_ToMessWith.TempAccountNumber  0;

I tried that and then realized I need mysql 4.0.0 or higher to do that kind
of query.

I don't want to delete from multiple tables, just one, but I need to match
it with the 2nd table there.. so how would I go about writing that query?
If I try this:

mysql DELETE FROM TemporaryUsers_ToMessWith WHERE
Advantage_Backup.TempAccountNumber =
TemporaryUsers_ToMessWith.TempAccountNumber AND
TemporaryUsers_ToMessWith.TempAccountNumber  0;
ERROR 1109: Unknown table 'Advantage_Backup' in where clause

It doesn't know about the 2nd table..

Can anyone help?

Thanks,
Chad


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

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




Restarting mySQL as a daemon

2001-10-01 Thread Jonathan Hilgeman

I want to start logging all queries on a mySQL server, but it is already
running. I would prefer not to shut it down, but if I have to, then I am not
sure how to start it up again without binding it to my logged-in self, so
that when I log out of the system, the program doesn't stop. Is there anyway
to begin logging without stopping the server?

- Jonathan

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

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




Win2K/MS Access 2K/My SQL

2001-10-01 Thread Paul @ KB Technology

Hi,

I have an application written in MS Access 2000 which has linked tables from
a MYSQL database.

I'm having a problem running queries which update the linked tables. I can
update individual records ok from Access, but as soon as i tried to run a
query, the query failes saying X number of records failed due to lock
violations.

I have tried the same in Access 97 and i still get the same problem.

Any Idea's

All help greatly appreciated.

Configuration Details.

Mysql server3.23.39-nt
MyODBC  2.50
MS Access   2000
MDAC2.6

Thanks, Paul

Paul Kemp
KB Technology

Tel.01892 544107
Mob.07949 151061
Email.  [EMAIL PROTECTED]
Web.www.kbtech.co.uk



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

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, mySQL keeps crashing.

2001-10-01 Thread Brian Reichert

On Thu, Sep 27, 2001 at 07:19:02PM -0600, Spinlock wrote:
 Hello. I am running mySQL 3.23.42 on FreeBSD 4.2.
 
 I have compiled it with InnoDB and full debug to help figure out why it
 keeps crashing. I've done a few core dumps and I'll paste 3 of them, it
 keeps on crashing in the same function all the time.
 
 The configure flags I used are:
 
 env CFLAGS=-O3 -mpentiumpro CXX=gcc CXXFLAGS=-O3 -mpentiumpro
 -felide-constructors -fno-exceptions -fno-rtti ./configure
 --prefix=/usr/local/mysql --with-debug --with-innodb
 
 Please advise what to do.

Using '-O3' is not advisable with the g++ compiler family.  Try
reconfiguring with just '-O'.

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA Intel architecture: the left-hand path

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

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, mySQL keeps crashing.

2001-10-01 Thread Spinlock

I was using gcc not g++

---
Spinlock

Creator of EmpireQuest
http://www.empirequest.com

On Mon, 1 Oct 2001, Brian Reichert wrote:

 On Thu, Sep 27, 2001 at 07:19:02PM -0600, Spinlock wrote:
  Hello. I am running mySQL 3.23.42 on FreeBSD 4.2.
 
  I have compiled it with InnoDB and full debug to help figure out why it
  keeps crashing. I've done a few core dumps and I'll paste 3 of them, it
  keeps on crashing in the same function all the time.
 
  The configure flags I used are:
 
  env CFLAGS=-O3 -mpentiumpro CXX=gcc CXXFLAGS=-O3 -mpentiumpro
  -felide-constructors -fno-exceptions -fno-rtti ./configure
  --prefix=/usr/local/mysql --with-debug --with-innodb
 
  Please advise what to do.

 Using '-O3' is not advisable with the g++ compiler family.  Try
 reconfiguring with just '-O'.

 --
 Brian 'you Bastard' Reichert  [EMAIL PROTECTED]
 37 Crystal Ave. #303  Daytime number: (603) 434-6842
 Derry NH 03038-1713 USA   Intel architecture: the left-hand path

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

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




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

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




Re: last_insert_id() bug ?? using INSERT IGNORE

2001-10-01 Thread marcus davy

On Mon, 01 Oct 2001 14:44, Paul DuBois wrote:
 At 11:44 AM +1200 10/1/01, marcus davy wrote:
 If you specify the keyword IGNORE in an INSERT, any rows that duplicate
 an existing PRIMARY or UNIQUE key in the table are ignored and are not
 inserted.
 But the last_insert_id() function still appears to increment by one
 in situations when the query is not adding any new information to
 the table.
 
 This looks like a bug to me can anyone enlighten me to this anomaly?

 Why is it a bug?

 INSERT IGNORE can't fully assess whether the record is to be ignored
 until the record's contents have been generated.

 I am using 3.23.42-log on red hat 7.1 (also same results on 3.23.40-log).
 I have searched the list archive for this topic but havent found anything
  yet.
 

I think it a potential bug corrupting primary keys on records where some 
duplicate information is ignored if you were using last_insert_id() in
table generation. 

If I had a large relational database, and somewhere in the middle of that I 
had a unique table I was writing information to. If I was relying on the 
last_insert_id() value of this table as a primary key to other tables 
downstream, then every record where the INSERT IGNORE didnt add new 
information will corrupt that primary key of every furthur linked table (by 1 
more than it should be). If the very last record also was IGNORED on the 
INSERT IGNORE, statement then you would get an empty set on a query of that 
last record, because its primary key is (n+1) which doesnt exist in the 
unique table.

I also noticed that last_insert_id() increments for failed INSERT records...

SELECT * from organism;
#+---+---+
#| OM| OM_ID |
#+---+---+
#| foo   | 1 |
#| fodda | 2 |
#+---+---+
#2 rows in set (0.00 sec)

INSERT INTO organism VALUES('fred',NULL);
#Query OK, 1 row affected (0.00 sec) 

INSERT INTO organism VALUES('fred',NULL);
#ERROR 1062: Duplicate entry 'fred' for key 2  

SELECT * from organism;
+---+---+
| OM| OM_ID |
+---+---+
| foo   | 1 |
| fodda | 2 |
| fred  | 3 |
+---+---+
3 rows in set (0.00 sec)

SELECT last_insert_id();
#+--+
#| last_insert_id() |
#+--+
#|4 |
#+--+
#1 row in set (0.00 sec)
# last_insert_id() STILL INCREMENTED 1 TOO MANY


cheers,

marcus



__
The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
__

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

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: ISAPI MySQL

2001-10-01 Thread MH

I have written some ISAPI filters and extensions that use the MySQL C 
API.  By using the MySQL C API, you don't need to install MyODBC, and your 
data access will be a little faster, compared to MyODBC.  The C API also is 
extremely easy to use.

I have, however, found an apparent problem with the MySQL client library 
(libmysql.dll).  Just initializing the library through mysql_init() creates 
some havoc that causes Internet Information Server to crash on 
reboot.  Everything else seems to be working fine, but this certainly could 
point to a more serious problem.  I have tried to contact whoever handles 
the Windows port at MySQL, but haven't been able to find a contact person 
so far. If anybody has a name or email address, please forward it to me.

Regards,

MH


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

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 your SQL syntax near 'order by 'Variable_name' ????

2001-10-01 Thread Emailit2

Hi,

MySQL said: You have an error in your SQL syntax near 'order by 
'Variable_name' ASC' at line 1 

Any ideas as to what this means, and how to fix it?

Thanks, Dave

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

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 your SQL syntax near 'order by 'Variable_name' ????

2001-10-01 Thread Rodney Broom

From: [EMAIL PROTECTED]

 MySQL said: You have an error in your SQL syntax near 'order by 
 'Variable_name' ASC' at line 1 
 
 Any ideas as to what this means, and how to fix it?

Hi Dave,

How 'bout sending us the entire SQL statement, please.

---
Rodney Broom
Programmer: Desert.Net





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

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




Re: error in your SQL syntax near 'order by 'Variable_name' ????

2001-10-01 Thread Emailit2

I don't know anything about MySQL, Ive just been trying(with no luck)to 
install a forum(Snitz forum from www.snitz.com) on my website. My website is 
Linux/MySQL/Chilisoft! Im running out of support my host hasn't gotten back 
with me, and Snitz support  doesn't know. So I got to messing around with the 
 control panel on my website and went to MySQL database. I clicked on: Show 
MySQL system variables. Then I could click on: Variable_name, or  Value both 
give me this:

MySQL said: You have an error in your SQL syntax near 'order by 'Value' ASC' 
at line 1

So I thought this might be what is keeping me from getting my forum started

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

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




Cannot get mysql to core dump

2001-10-01 Thread Spinlock

Sometimes mysqld gets signal 11 (segmentation fault), it crashes, and
safe_mysqld restarts it, anyways I cannot get it to generate a core dump
file. I am using FreeBSD 4.2. Any ideas?

---
Spinlock

Creator of EmpireQuest
http://www.empirequest.com


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

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




select data from more db

2001-10-01 Thread Sommai Fongnamthip

Hi,
I have data on more than 1 database with same schema.  How could I use SQL 
statement to retrieve it for display in 1 time?  Pls describe with PHP code.

thanks
SF


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

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: msql client , C++ , compiler ,mysql header files , and mysql client library

2001-10-01 Thread Luke Chiam

 What is required to be installed on webserver (redhat linux i686) as far
as
 msql client , C++ , compiler ,mysql header files , and mysql client
library

If you are talking about development in C with MySQL, you will need
MySQL-client, MySQL-devel, MySQL-shared. As for C++ I think there is a
MySQL++ class that you can use, but you will still require these packages.

I left out the full packages' name as I cannot recall them. Hope it helps.

Luke


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

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




Counting Sequences

2001-10-01 Thread Bruce Collins

Hello,
I have a mySQL database with a large table of
athletic performances where every athlete has
a row for every performance. My problem is to
make a column which is a sequential count of
each athlete's performances. The table is in
chronological order. Have been trying with PHP
but I am very much a beginner.
Thanks,
Bruce.



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

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




Re: last_insert_id() bug ?? using INSERT IGNORE

2001-10-01 Thread Paul DuBois

At 10:45 AM +1200 10/2/01, marcus davy wrote:
On Mon, 01 Oct 2001 14:44, Paul DuBois wrote:
  At 11:44 AM +1200 10/1/01, marcus davy wrote:
  If you specify the keyword IGNORE in an INSERT, any rows that duplicate
  an existing PRIMARY or UNIQUE key in the table are ignored and are not
  inserted.
  But the last_insert_id() function still appears to increment by one
  in situations when the query is not adding any new information to
  the table.
  
  This looks like a bug to me can anyone enlighten me to this anomaly?

  Why is it a bug?

  INSERT IGNORE can't fully assess whether the record is to be ignored
  until the record's contents have been generated.

  I am using 3.23.42-log on red hat 7.1 (also same results on 3.23.40-log).
  I have searched the list archive for this topic but havent found anything
   yet.
  

I think it a potential bug corrupting primary keys on records where some
duplicate information is ignored if you were using last_insert_id() in
table generation.

If I had a large relational database, and somewhere in the middle of that I
had a unique table I was writing information to. If I was relying on the
last_insert_id() value of this table as a primary key to other tables
downstream, then every record where the INSERT IGNORE didnt add new
information will corrupt that primary key of every furthur linked table (by 1
more than it should be). If the very last record also was IGNORED on the
INSERT IGNORE, statement then you would get an empty set on a query of that
last record, because its primary key is (n+1) which doesnt exist in the
unique table.


In this particular situation, how would it help you if last_insert_id()
*didn't* increment?  If the record was ignored, that doesn't necessarily
mean that you can assume the correct primary key value is n rather than
n+1.

-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




RE: HELP PLEASE - C API code help: UPDATE query using result from SELECT

2001-10-01 Thread John Mravunac

Hi,

When I try and use the REPLACE function such as:

REPLACE INTO table1 SELECT table2.ID, table2.Modified FROM table1 INNER JOIN table2 ON 
table1.Company=table2.Company;

I get:

ERROR 1066: Not unique table/alias: 'table1'

Here is the description of both tables:

mysql describe table1;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| ID   | int(11) | YES  | | NULL|   |
| Company  | varchar(20) |  | PRI | |   |
| Modified | int(11) | YES  | | NULL|   |
+--+-+--+-+-+---+

mysql describe table2;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| ID   | int(11) | YES  | | NULL|   |
| Company  | varchar(20) |  | PRI | |   |
| Modified | int(11) | YES  | | NULL|   |
+--+-+--+-+-+---+

Do you know what this error may mean?


Thanks,
John :^)



In response to: -

I am struggling with this myself right now.  I posted a similar question to
this group earlier in the day and it must be a poser because no one has
responded.

I fear that the only way to do this with a single sql statement is using the
replace command:

Let's say you have 2 tables like this:
MainTbl
id  int  not null (primary key),
fld1int,
fld2int,
fld3int
UpdTbl
id  int not null (primary key),
fld2int

And let's say that you have 20,000 recs in MainTbl and only 100 recs in
UpdTbl.
You want to join the 2 tables and flag the value from UpdTbl.fld2 into
MainTbl.
fld2, right?

The best approach I have thought of is

REPLACE INTO MainTbl
SELECT MainTbl.id, MainTbl.fld1, UpdTbl.fld2, MainTbl.fld3
FROMMainTbl INNER JOIN UpdTbl ON MainTbl.id = UpdTbl.id;

I have not tried this yet but if I read the manual correctly, it should
work.

If anyone has a better solution, please fill us in.
Additionally, I would like ideas on how to work around MySQL's inability to
handle deletes like the following:

DELETE MainTbl
FROMMainTbl INNER JOIN DelTbl ON  MainTbl.id = DelTbl.id;



 -Original Message-
 From: John Mravnuac [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 19, 2001 8:28 PM
 To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 Subject: HELP PLEASE - C API code help: UPDATE query using result from
 
SELECT


 Hi,

 I believe that the query below is correct, but I do not believe
 that it is
 possible in MySQL currently due to it not supporting sub-selects:

 UPDATE table1 SET ID=table2.ID, Company=table2.Company,
 Modified=table2.Modified FROM table1 INNER JOIN table2 ON
 table1.Company=table2.Company WHERE table1.Modified='9';

 The error produced was:

 ERROR 1064: You have an error in your SQL syntax near 'FROM table1 INNER
 JOIN table2 ON table1.Company=table2.Company WHERE table1.Modi' at line 1

 If you can't tell from the SQL query above...what I am trying to do is
 update data in table1 with data from table2...the two tables have pretty
 much identical information, although table2 has updated data and table1
 can't just be overwritten because it may have something newer than table2
 again (this is only part of th
e entire process which involves two MySQL
 servers and a MS SQL server :)

 I've read that the only way to do it at the moment is using code
 such as C
 or C++. Does anyone have any experience with this type of procedure?

 My code so far is below...my coding knowledge is very weak and this was
 obtained from a text:

 #include stdlib.h
 #include stdio.h

 #include /usr/local/mysql/include/mysql/mysql.h

 MYSQL my_connection;
 MYSQL_RES *res_ptr;
 MYSQL_ROW sqlrow;

 void display_row();

 int main(int argc, char *argv[]) {
  int res;
  uint i = 0;

  query = 0;

  mysql_init(my_connection);
  if (mysql_real_connect(my_connection, localhost, username,
 password, database, 0, NULL, 0)) {


gt;  printf(Connection success\n);
  res = mysql_query(my_connection, SELECT ID, Modified
 FROM table1 WHERE Modified = 9);

  if (res) {

  printf(SELECT error: %s\n,
 mysql_error(my_connection));

  } else {

  res_ptr = mysql_store_result(my_connection);
  if (res_ptr) {
  while ((sqlrow =
 mysql_fetch_row(res_ptr))) {
  for (i=0; i 
 mysql_num_fields(res_ptr); i++)
  printf(%s\n,sqlrow[i]);
  printf(Fetched data...\n);

  /*mysql_query(my_connection,
 Some UPDATE code );
*/


Install Script did not create mysqladmin

2001-10-01 Thread root

Description:
Install Script did not create mysqladmin
How-To-Repeat:

Fix:


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

Environment:

System: Linux router 2.4.3-12 #1 Fri Jun 8 16:12:46 EDT 2001 i586 unknown
Architecture: i586

Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc GCC: Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96
2731 (Red Hat Linux 7.1 2.96-81) Compilation info: CC='egcs'
CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='egcs'
CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors
-fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx 1
root root 13 Jul 17 19:28 /lib/libc.so.6 - libc-2.2.2.so -rwxr-xr-x 2
root root 5578134 Apr 7 05:30 /lib/libc-2.2.2.so -rw-r--r-- 1 root
root 26350254 Apr 7 05:27 /usr/lib/libc.a -rw-r--r-- 1 root root 178
Apr 7 05:27 /usr/lib/libc.so Configure command: ./configure
--disable-shared --with-mysqld-ldflags=-all-static
--with-client-ldflags=-all-static --without-berkeley-db
--without-innodb --enable-assembler --with-mysqld-user=mysql
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
--with-extra-charsets=complex --exec-prefix=/usr
--libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--localstatedir=/var/lib/mysql --infodir=/usr/info
--includedir=/usr/include --mandir=/usr/man '--with-comment=Official
MySQL RPM'



















































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

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




Can one SELECT records depending on multiple entries in a many to many table?

2001-10-01 Thread Joe Kaiping


Hi there,

I have a many-to-many relationship:

ind table
-
id = 4, name = Joe
id = 5, name = Jane

bus_ctr table
-
id = 1, name = downtown mall
id = 2, name = sunshine mall
id = 3, name = express shop

mm_ind_bus_ctr table (many to many association table)
-
id = 6, ind_id = 4, bus_ctr_id = 1
id = 7, ind_id = 4, bus_ctr_id = 2
id = 8, ind_id = 4, bus_ctr_id = 3
id = 9, ind_id = 5, bus_ctr_id = 1

Is there a way to create a SELECT that returns only the people in the ind
table that are associated with bus_ctr.id=1, bus_ctr.id=2 and bus_ctr.id=3?
In other words a SELECT that only returns the ind.id = 4 (Joe) record?

I've only been able to create a SELECT that would return both Jane and Joe
so far.

Thanks,
Joe


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

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




Re: Counting Sequences

2001-10-01 Thread Paul DuBois

At 12:23 PM +1000 10/2/01, Bruce Collins wrote:
Hello,
I have a mySQL database with a large table of
athletic performances where every athlete has
a row for every performance. My problem is to
make a column which is a sequential count of
each athlete's performances. The table is in
chronological order. Have been trying with PHP
but I am very much a beginner.
Thanks,
Bruce.

What do you mean by sequential count?  You want
to know how many records you have for each athlete?

SELECT name, COUNT(*) FROM table GROUP BY name

will give you that.  If that's not what you mean,
please specify.

-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




Re: last_insert_id() bug ?? using INSERT IGNORE

2001-10-01 Thread marcus davy

On Tue, 02 Oct 2001 14:37, Paul DuBois wrote:
 At 10:45 AM +1200 10/2/01, marcus davy wrote:
 On Mon, 01 Oct 2001 14:44, Paul DuBois wrote:
   At 11:44 AM +1200 10/1/01, marcus davy wrote:
   If you specify the keyword IGNORE in an INSERT, any rows that
duplicate an existing PRIMARY or UNIQUE key in the table are ignored
and are not inserted.
   But the last_insert_id() function still appears to increment by one
   in situations when the query is not adding any new information to
   the table.
   
   This looks like a bug to me can anyone enlighten me to this anomaly?
 
   Why is it a bug?
 
   INSERT IGNORE can't fully assess whether the record is to be ignored
   until the record's contents have been generated.
 
   I am using 3.23.42-log on red hat 7.1 (also same results on
3.23.40-log). I have searched the list archive for this topic but
havent found anything yet.
 
 I think it a potential bug corrupting primary keys on records where some
 duplicate information is ignored if you were using last_insert_id() in
 table generation.
 
 If I had a large relational database, and somewhere in the middle of that
  I had a unique table I was writing information to. If I was relying on
  the last_insert_id() value of this table as a primary key to other tables
  downstream, then every record where the INSERT IGNORE didnt add new
  information will corrupt that primary key of every furthur linked table
  (by 1 more than it should be). If the very last record also was IGNORED
  on the INSERT IGNORE, statement then you would get an empty set on a
  query of that last record, because its primary key is (n+1) which doesnt
  exist in the unique table.

 In this particular situation, how would it help you if last_insert_id()
 *didn't* increment?  If the record was ignored, that doesn't necessarily
 mean that you can assume the correct primary key value is n rather than
 n+1.

Ok, I see what you mean, my mistake. I guess I was thinking on those lines 
because of an example in the mysql documentation 3.5.6 Using Foreign Keys.

INSERT INTO persons VALUES (NULL, 'Antonio Paz');

INSERT INTO shirts VALUES
(NULL, 'polo', 'blue', LAST_INSERT_ID()),
(NULL, 'dress', 'white', LAST_INSERT_ID()),
(NULL, 't-shirt', 'blue', LAST_INSERT_ID());

INSERT INTO persons VALUES (NULL, 'Lilliana Angelovska');

INSERT INTO shirts VALUES
(NULL, 'dress', 'orange', LAST_INSERT_ID()),
(NULL, 'polo', 'red', LAST_INSERT_ID()),
(NULL, 'dress', 'blue', LAST_INSERT_ID()),
(NULL, 't-shirt', 'white', LAST_INSERT_ID());

So last_insert_id() can only be relyed on when you can guarantee that the
information going into the persons database is unique. If it is not, then the 
information going into shirts will be corrupted anyway because the persons 
INSERT wil fail but the shirts INSERT will succeed with last_insert_id() = 
(n+1). But like you are saying a duplicate record can be anywhere, not 
necessarily the last id inserted.

Cheers,
marcus



__
The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
__

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

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




socket problem

2001-10-01 Thread Avtar Dhillon

Hi All,
I m trying to install mysql on linux machine from binary file.After performing 
all the steps given in documents for installation , when i try to change the passwd 
using mysqladmin , it gives the error..
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'

Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

the file /etc/mysql.sock exists, but of size 0 bytes.

please tell me how i can overcome this prob.

thanx in advance..

Regards..

A Dhillon
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from 
http://www.planetm.co.in


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

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




\n is SLASH, N instead of newline

2001-10-01 Thread Uriel Wittenberg

I have a batch file called mysql.txt containing the single line,

select test \n test;

My command for running this file is:

mysql -N -B stud  mysql.txt  out.txt

After running the command, out.txt contains test \n test -- with the
\n appearing literally, instead of a newline character. In other
words, it's the output I'd expect from

select test \\n test;

Originator: Uriel Wittenberg
Organization: Tsinghua U.
MySQL support:  none
Severity: non-critical
Priority: medium
Category: mysql
Class: sw-bug
Release: mysql-3.23.42

Exectutable:   mysql.exe
Environment: Pentium processor, 64 MB RAM
System:Windows Me




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

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 link three tables with joins on one table?

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 10:04:50AM +0200, [EMAIL PROTECTED] wrote:
 
 how can i link three tables with joins on one table?
 
 Select
 b.IdentNrA,b.Menge,b.Preis,b.ArtPosition,c.Artikel_Status,d.beschTitel,e.Str
 asse,e.PLZ,e.Stadt,e.Land
 From
 Bestellungen_Status_Text f right join (BestellungenAdr e inner join
 Bestellungen a using(IdentNrS)) using (BestellStatus) inner join
 BestellungenP b using (IdentNrS) inner join artikel c using (IdentNrA) inner
 join ArtikelText d using (IdentNrA)
 Where
 b.IdentNrS = 22 and
 d.Sprache = 'DE'
 Order By b.ArtPosition
 
 does not work.

doesn not work isn't very descriptive. Do you get an error message?
If so, which?

I assume the problem is that you are trying to bracket the table
references, which for I cannot see any syntax reference on
http://www.mysql.com/doc/J/O/JOIN.html.

You can easily rewrite the query to avoid the brackets by using a left
join instead of a right join:

SELECT b.IdentNrA, b.Menge, b.Preis, b.ArtPosition,
   c.Artikel_Status,
   d.beschTitel,
   e.Strasse, e.PLZ, e.Stadt, e.Land
FROM   BestellungenAdr e
   INNER JOIN Bestellungen a USING(IdentNrS)
   LEFT JOIN Bestellungen_Status_Text f USING (BestellStatus)
   INNER JOIN BestellungenP b USING (IdentNrS)
   INNER JOIN artikel c USING (IdentNrA)
   INNER JOIN ArtikelText d USING (IdentNrA)
WHERE  b.IdentNrS = 22 AND
   d.Sprache = 'DE'
ORDER BY   b.ArtPosition


Bye,

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

2001-10-01 Thread Benjamin Pflugmann

Hi.

You know, mysql_insert_id returns a 64 bit integer (see
http://www.mysql.com/doc/m/y/mysql_insert_id.html)? Though, ignoring
this, you should normally get a steady 0 returned.

Another possible cause of failure could be that you did not recompile
your application and therefore have a version mismatch between the
includes you used and the dynamic libraries you use. In this case, try
a compile from scratch and see if it helps.

Bye,

Benjamin.

On Mon, Oct 01, 2001 at 11:34:29AM +0200, [EMAIL PROTECTED] wrote:
 Hello
 
 Firstly, this is my first query, so I can only hope I have sent it to the
 correct list!
 
 I am using the C API for MySQL, and using the mysql_insert_id() function to
 get the last id assigned in an AUTO INCREMENT column. Orignially I was using
 3.22.32 and everything worked fine. Upon upgrading to 3.23.35 the call to
 mysql_insert_id(MYSQL*) returned the same value for every call. Each time a
 new connection is made, this value seems to increase (e.g it will be 14,
 then make a new connection, then it is 15 for that session...)
 
 I am sure I am reading the documenation correctly, but can't seem to find
 what is wrong. Any help with this problem (or my reading ability!) would be
 greatly appreciated.
 
 Thank you
 Matthew Fincham
 

-- 
[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: Support

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Sun, Oct 01, 2000 at 03:48:36PM +0530, [EMAIL PROTECTED] wrote:
 Hello,
  
 Does MySQL Support Distributed Database.

No. It only supports replication.

 If not, then what's the way out? 

Depends on your needs. Describe them and someone might know an answer.

Bye,

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: Heap tables replication

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 04:53:33PM +0400, [EMAIL PROTECTED] wrote:
 Hello mysql,
 
   Could anyone tell me if heap tables are cyrrently working with
   replication.
 
   As I remember some time ago you might get problems then server
   restarts (so empty it's heap tables) there fore slave does not and
   so it gets dublicate key errors on inserts to this tables, which is
   right as they allready have such values.

I think this behaviour still persists. On the other hand it should be
easy to change the code that creates the tables to do a 

DROP TABLE IF EXISTS tablename

before it creates the heap tables, which would clean up the client.

Bye,

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: Permission problem

2001-10-01 Thread Benjamin Pflugmann

Hi.

Sorry, but how does this problem relate to MySQL?

Bye,

Benjamin.

On Mon, Oct 01, 2001 at 11:29:13AM -0400, [EMAIL PROTECTED] wrote:
 Hello list members,
 
 I am running mysql on a linux server.  I can connect to it using telnet and
 also using mysql client. I am given all the permissions. I am trying to
 create a few php pages and want to ftp them to the linux server . I am using
 WS_FTP. i can view the folder where i need to put the files but i cant move
 the files to it. It can be done from the linux server but i cant do them
 myself from my computer. What am i missing?? like i can got from /var/www/
 and then when i click on html folder it gives me error message permisiion
 denied.
[...]

-- 
[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: socket problem

2001-10-01 Thread Mike

ln -s  /tmp/mysql.sock /var/lib/mysql/mysql.sock  to create a symlink.

Nite

M;)

-Original Message-
From: Avtar Dhillon [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 9:46 PM
To: sql-list
Subject: socket problem


Hi All,
I m trying to install mysql on linux machine from binary file.After
performing all the steps given in documents for installation , when i try to
change the passwd using mysqladmin , it gives the error..
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock'
(111)'

Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

the file /etc/mysql.sock exists, but of size 0 bytes.

please tell me how i can overcome this prob.

thanx in advance..

Regards..

A Dhillon
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from
http://www.planetm.co.in


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

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



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

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

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 01:51:35PM -0300, [EMAIL PROTECTED] wrote:
 Hi list members,
 I've just downloaded and installed MySQL 3.23.XX for an HPUX 11.00. Every
 time I try connect to it I must insert a record in the table user for the PC
 (host) in which I'm trying the connection.

You know, the standard method to do this would use GRANT/REVOKE commands?

 Is there any way to avoid this and allow any user on any host to connect ?

Yes, use patterns like '%.equiplus.com'. Have a look at this manual
section for more info:

http://www.mysql.com/doc/G/R/GRANT.html

or alternatively, if you really don't want to use GRANT:

http://www.mysql.com/doc/C/o/Connection_access.html
which is part of 
http://www.mysql.com/doc/P/r/Privilege_system.html

Bye,

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: 2 Byte Characters

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 10:50:51AM -0700, [EMAIL PROTECTED] wrote:
 I need some help,
 
 I need to know how MySQL would handle different language character stes.  In
 particular, I need to know how MySQL would handle 2 Byte Characters.  Does
 this mean my VarChar (30) would only be able to hold 15 characters, or does
 it understand that, and automatically adjust for it??  Thanks all!!

In VARCHAR(30) will fit 15 two-byte characters. To MySQL, it's simply
some data.

The only exception to this is that MySQL supports an order for
characters sets, some two-byte sets included. Have a look at the
following manual section for more info:

http://www.mysql.com/doc/L/o/Localization.html

Bye,

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: Lots of restarts?

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 11:20:24AM -0700, [EMAIL PROTECTED] wrote:
[...]
 # at 4
 #010917  0:46:33 server id  1   Start: binlog v 1, server v 3.23.36-log
 created 010917  0:46:33
 
 Now, what is the issue here? Are these log files getting created each time
 the server restarts? 

Yes, as you can read here:
http://www.mysql.com/doc/B/i/Binary_log.html

 And if so, why would my server restart so much on its own?
 I have only restarted it once...

Normally it shouldn't restart. If the server crashes or terminates due
to another reason, the start script might try to restart it
automatically to reduce downtime.

You may get some info from the error log file, should be in the same
directory.

Bye,

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: Temporary Files?

2001-10-01 Thread Benjamin Pflugmann

Hi.

A quick search for temporary files results in
http://www.mysql.com/doc/T/e/Temporary_files.html

The best guess is that it is the result of massive sorting.

Why this happens (or better: is noticible) only on the new server, I
have no idea of.

Bye,

Benjamin.

On Mon, Oct 01, 2001 at 01:45:09PM -0700, [EMAIL PROTECTED] wrote:
 
 Could someone explain to me how/when mysql uses temp files.. running a
 new dedicated db server with twice as much ram as the old one, and the
 new one keeps dumping 400+mb data into a temp file when the database is
 searched, both with LIKE and MATCH/AGAINST statements... i have never
 looked to see how big the tmp files actually get because it crashes our
 coldfusion servers in the process. I am confused as to why this would
 happen on the new server when it doesnt on the old one
 

-- 
[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: Deleting from a table but specifying another..

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 04:48:36PM -0400, [EMAIL PROTECTED] wrote:
 I'm trying to remove rows from one table where a column matches another
 column in a seperate table..
 
 I have mysql 3.22.32:
 
 DELETE TemporaryUsers_ToMessWith.* FROM TemporaryUsers_ToMessWith,
 Advantage_Backup WHERE Advantage_Backup.TempAccountNumber =
 TemporaryUsers_ToMessWith.TempAccountNumber AND
 TemporaryUsers_ToMessWith.TempAccountNumber  0;
 
 I tried that and then realized I need mysql 4.0.0 or higher to do that kind
 of query.
 
 I don't want to delete from multiple tables, just one, but I need to match
 it with the 2nd table there.. so how would I go about writing that query?
[...]

This would also be considered a multi-table-delete, which will work
only in the upcoming 4.0. In 3.23.x the delete statement may only
refer to one table.

Best is probably to do this with a programming language: first select
the ids of all rows in questions

SELECT  tu.Id 
FROMTemporaryUsers_ToMessWith AS tu,
Advantage_Backup AS ab 
WHERE   ab.TempAccountNumber = tu.TempAccountNumber AND
tu.TempAccountNumber  0;

then issue one large

DELETE FROM TemporaryUsers_ToMessWith WHERE id in (your id list)

Of course, that presumes that you have an reasonable id in your table,
which you have, don't you? ;-)

Bye,

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: Restarting mySQL as a daemon

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 02:05:05PM -0700, [EMAIL PROTECTED] wrote:
 I want to start logging all queries on a mySQL server, but it is already
 running. I would prefer not to shut it down, but if I have to, then I am not
 sure how to start it up again without binding it to my logged-in self, so
 that when I log out of the system, the program doesn't stop. Is there anyway
 to begin logging without stopping the server?

Sorry, but how did you start it the first time?

This depends on the distribution you are using, but usually you would
start it with something like (as root user):

/etc/rc.d/init.d/mysql start

or alternatively with the safe_mysqld program (which is called by the
above script).

In either case, the daemon should be detached automatically.

Bye,

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: error in your SQL syntax near 'order by 'Variable_name' ????

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 08:32:42PM -0400, [EMAIL PROTECTED] wrote:
 I don't know anything about MySQL, Ive just been trying(with no luck)to 
 install a forum(Snitz forum from www.snitz.com) on my website. My website is 
 Linux/MySQL/Chilisoft! Im running out of support my host hasn't gotten back 
 with me, and Snitz support  doesn't know. So I got to messing around with the 
  control panel on my website and went to MySQL database. I clicked on: Show 
 MySQL system variables. Then I could click on: Variable_name, or  Value both 
 give me this:
 
 MySQL said: You have an error in your SQL syntax near 'order by 'Value' ASC' 
 at line 1

This means that the clicking produced an invalid SQL
command. Seemingly it wanted to run

show variables order by 'Value' ASC

which is no valid command (SHOW VARIABLES doesn't allow an ORDER BY clause).

 So I thought this might be what is keeping me from getting my forum started

I assume that has nothin to do with that.

If you are interested: The above error seems to stem from the fact
that they use a general display this table page and append the
wished ordering to the last run SQL statement. This works fine for
normal SELECTS. 

But although SHOW VARIABLES returns a table, you may not append an
ORDER BY clause. Just a little oversight from their side, but it
should have nothing to do with other problems you may encounter.

Bye,

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: select data from more db

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 08:18:50AM +0700, [EMAIL PROTECTED] wrote:
 Hi,
   I have data on more than 1 database with same schema.  How could I use SQL 
 statement to retrieve it for display in 1 time?

There is no SQL command to do that (yet). In the upcoming version 4.0
there is support for UNION which may do what you want.

For now, you might want to have a look at MERGE table, but these will
only work if the tables are within one database. So this isn't an
option for you, I fear, if you really meant databases and not tables.

 Pls describe with PHP code.

Sorry, this is a MySQL list. I don't know PHP well enough to write
something up.

The idea is to write a loop which will query each database
sequentielly and compile the result to one big list.

Btw, why do you save same entities in different databases at all?


Bye,

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: HELP PLEASE - C API code help: UPDATE query using result from SELECT

2001-10-01 Thread Benjamin Pflugmann

Hi.

As is described somewhere (http://www.mysql.com/doc/R/E/REPLACE.html),
REPLACE mainly behaves like INSERT and therefore the target table may
not appear in the SELECT clause (as described here:
http://www.mysql.com/doc/I/N/INSERT_SELECT.html).

Sorry, but it seems you have to use a temporary table to store the
intermediate result.

Bye,

Benjamin.

On Tue, Oct 02, 2001 at 12:39:18PM +1000, [EMAIL PROTECTED] wrote:
 Hi,
 
 When I try and use the REPLACE function such as:
 
 REPLACE INTO table1 SELECT table2.ID, table2.Modified FROM table1 INNER JOIN table2 
ON table1.Company=table2.Company;
 
 I get:
 
 ERROR 1066: Not unique table/alias: 'table1'
[...]

-- 
[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: Install Script did not create mysqladmin

2001-10-01 Thread Benjamin Pflugmann

Hi.

mysqladmin is part of the client package. You have to install that, too. 

Bye,

Benjamin.


On Tue, Oct 02, 2001 at 02:51:36AM -, [EMAIL PROTECTED] wrote:
 Description:
   Install Script did not create mysqladmin
[...]

-- 
[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: How to link three tables with joins on one table?

2001-10-01 Thread lorenz

 Select

b.IdentNrA,b.Menge,b.Preis,b.ArtPosition,c.Artikel_Status,d.beschTitel,e.Str
 asse,e.PLZ,e.Stadt,e.Land
 From
 Bestellungen_Status_Text f right join (BestellungenAdr e inner join
 Bestellungen a using(IdentNrS)) using (BestellStatus) inner join
 BestellungenP b using (IdentNrS) inner join artikel c using (IdentNrA)
inner
 join ArtikelText d using (IdentNrA)
 Where
 b.IdentNrS = 22 and
 d.Sprache = 'DE'
 Order By b.ArtPosition

 does not work.

doesn not work isn't very descriptive. Do you get an error message?
If so, which?

I assume the problem is that you are trying to bracket the table
references, which for I cannot see any syntax reference on
http://www.mysql.com/doc/J/O/JOIN.html.

You can easily rewrite the query to avoid the brackets by using a left
join instead of a right join:

SELECT b.IdentNrA, b.Menge, b.Preis, b.ArtPosition,
   c.Artikel_Status,
   d.beschTitel,
   e.Strasse, e.PLZ, e.Stadt, e.Land
FROM   BestellungenAdr e
   INNER JOIN Bestellungen a USING(IdentNrS)
   LEFT JOIN Bestellungen_Status_Text f USING (BestellStatus)
   INNER JOIN BestellungenP b USING (IdentNrS)
   INNER JOIN artikel c USING (IdentNrA)
   INNER JOIN ArtikelText d USING (IdentNrA)
WHERE  b.IdentNrS = 22 AND
   d.Sprache = 'DE'
ORDER BY   b.ArtPosition


Bye,

Benjamin.

Hello,

first thanks for your answer.
Your example does not work because the IdentNrS field is not in the table
Bestellungen_Status.
I have to link BestellungenAdr,Bestellungen_Status_Text,BestellungenP to the
table Bestellungen.
There is no example in the MySQL docu for this. Only for two tables.
The way i tried it was from MS Access. The only other database i am using is
Oracle. And Oracle has a completely different join syntax.

Thanks

Armin


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

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 3.23.42 on NetBSD 1.5.2 (i386)

2001-10-01 Thread Massimo Sironi

Hi to All,

I've got some problem with MySQL 3.23.42 on NetBSD 1.5.2.
I compile the sorce only with 'configure --prefix=/usr/local/mysql'.
The 'make' is OK but if I try 'make test' it fail:...

# make test
cd mysql-test ; ./mysql-test-run
Installing Test Databases
Removing Stale Files
Installing Master Databases
010930 16:08:20  ../sql/mysqld: Shutdown Complete

Installing Slave Databases
010930 16:08:21  ../sql/mysqld: Shutdown Complete

Starting MySQL daemon
Loading Standard Test Databases
Starting Tests
 TEST USER   SYSTEM  ELAPSEDRESULT

alias 0.10 0.10 0.70   [ pass ]
alter_table   0.04 0.03 1.84   [ pass ]
analyse   0.02 0.03 0.37   [ pass ]
auto_increment0.03 0.03 1.26   [ pass ]
backup0.03 0.04 0.91   [ pass ]
bdb-crash 0.02 0.04 0.24   [ pass ]
bdb        [ skipped ]
bench_count_dist  0.04 0.06 0.55   [ pass ]
bigint     [ fail ]

lt-mysqltest: At line 17: Result length mismatch real 0.28
user 
0.01 sys  0.04 Below are the diffs between actual and expected
results:
---
*** r/bigint.result Sat Sep  8 22:17:43 2001
--- r/bigint.reject Sun Sep 30 16:08:31 2001
***
*** 3,15 
  9223372036854775807   -009223372036854775808
  9223372036854775807   -9223372036854775808
  +999  -999
! 1000  -1000
  a
  18446744073709551614
  18446744073709551615
  a
  18446744073709551615
  a
- 18446744073709551615
  a
  18446744073709551614
--- 3,14 
  9223372036854775807   -009223372036854775808
  9223372036854775807   -9223372036854775808
  +999  -999
! 10002083  -10002083
  a
  18446744073709551614
  18446744073709551615
  a
  18446744073709551615
  a
  a
  18446744073709551614
---
Please follow the instructions outlined at
http://www.mysql.com/doc/R/e/Reporting_mysqltest_bugs.html
to find the reason to this problem and how to report this.

Aborting. To continue, re-run with '--force'.

Ending Tests
Shutting-down MySQL daemon
Master shutdown finished
Slave shutdown finished
*** Error code 1

Stop.
#

(my system)
# uname -a
NetBSD lucy 1.5.2 NetBSD 1.5.2 (GENERIC) #3: Sat Aug 18 23:37:05 CEST
2001 
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC i386


The 'make install' is OK, the server start without problem but some
client (mysql, mysqladmin) don't run:

# mysql 
Cannot open ../libmysql/.libs/libmysqlclient.so

libmysqlclient.so in in /usr/local/mysql/lib/mysql so with a link its OK
but 
only if my 'pwd' is /usr/local/mysql/bin or ./var
If I call any client from another path it don't work...


On NetBSD site I can download a package with compiled version but I
prefere 
compile it by myself.

Where are some tips for build MySQL for this platform?
Thanks for help,

Max Sironi

STMicroelectronics - Central RD
  Agrate B.za - Milano - Italy


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

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: \n is SLASH, N instead of newline

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 11:52:21AM +0800, [EMAIL PROTECTED] wrote:
 I have a batch file called mysql.txt containing the single line,
 
 select test \n test;
 
 My command for running this file is:
 
 mysql -N -B stud  mysql.txt  out.txt
 
 After running the command, out.txt contains test \n test -- with the
 \n appearing literally, instead of a newline character. In other
 words, it's the output I'd expect from

shell mysql --help
[...]
  -B, --batch   Print results with a tab as separator, each row on
a new line. Doesn't use history file.
[...]

This means, because a newline will indicate a new record, new lines
have to be escaped. Else, you couldn't reasonably distinguish what's
content and what's record seperator.

Example:

shell mysql -B -N yasg -e select 'test\ntest'
test\ntest
shell mysql -t -N yasg -e select 'test\ntest'
+---+
| test
test |
+---+

Bye,

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: \n is SLASH, N instead of newline

2001-10-01 Thread Uriel Wittenberg

 because a newline will indicate a new record, new lines
 have to be escaped. Else, you couldn't reasonably distinguish what's
 content and what's record seperator.

Thanks for the reply. Seems to me mySQL should give me the \n I'm asking
for rather than assuming that's not what I mean and escaping it so I
don't get confused.

Is there some other way to produce this character, without the -t
option?


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

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 link three tables with joins on one table?

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 07:25:38AM +0200, [EMAIL PROTECTED] wrote:
[...]
 first thanks for your answer.
 Your example does not work because the IdentNrS field is not in the table
 Bestellungen_Status.

Sorry, but there is no such table Bestellungen_Status? You mean
Bestellungen_Status_Text?

 I have to link BestellungenAdr,Bestellungen_Status_Text,BestellungenP to the
 table Bestellungen.

Oops, sorry. Did overlook that.

FROM   BestellungenAdr e
   INNER JOIN Bestellungen a USING(IdentNrS)
   LEFT JOIN Bestellungen_Status_Text f USING (BestellStatus)
   INNER JOIN BestellungenP b ON b.IdentNrS = a.IdentNrS
   INNER JOIN artikel c USING (IdentNrA)
   INNER JOIN ArtikelText d USING (IdentNrA)

Is that correct now? If not, you surely got the idea.

Bye,

Benjamin.


 There is no example in the MySQL docu for this. Only for two tables.
 The way i tried it was from MS Access. The only other database i am using is
 Oracle. And Oracle has a completely different join syntax.
[...]

-- 
[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: Can one SELECT records depending on multiple entries in a many to many table?

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Mon, Oct 01, 2001 at 07:54:37PM -0700, [EMAIL PROTECTED] wrote:
 
 Hi there,
 
 I have a many-to-many relationship:
 
 ind table
 -
 id = 4, name = Joe
 id = 5, name = Jane
 
 bus_ctr table
 -
 id = 1, name = downtown mall
 id = 2, name = sunshine mall
 id = 3, name = express shop
 
 mm_ind_bus_ctr table (many to many association table)
 -
 id = 6, ind_id = 4, bus_ctr_id = 1
 id = 7, ind_id = 4, bus_ctr_id = 2
 id = 8, ind_id = 4, bus_ctr_id = 3
 id = 9, ind_id = 5, bus_ctr_id = 1
 
 Is there a way to create a SELECT that returns only the people in the ind
 table that are associated with bus_ctr.id=1, bus_ctr.id=2 and bus_ctr.id=3?
 In other words a SELECT that only returns the ind.id = 4 (Joe) record?

Do you want an exact match or an at least match, i.e. what if 

id = 10, ind_id = 4, bus_ctr_id = 5

would be given. Does Joe still match?

 I've only been able to create a SELECT that would return both Jane
 and Joe so far.

If you have something, please post it, even if it isn't correct. It
will give other a better idea of what's all about (if you also post
the result and what you don't like about it).

The select will get a bit large, because you need several joins. In
fact, you want to check for three relations and therefore needs as
much tables to join with:

SELECT  i.id, i.name
FROMind i, mm_ind_bus_ctr bi1, mm_ind_bus_ctr bi2, mm_ind_bus_ctr bi3
WHERE   bi1.bus_ctr_id = 1 AND
bi2.bus_ctr_id = 2 AND
bi3.bus_ctr_id = 3 AND
bi1.ind_id = i.id AND
bi2.ind_id = i.id AND
bi3.ind_id = i.id

Untested, but should work.

Bye,

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: How to link three tables with joins on one table?

2001-10-01 Thread lorenz

Hi.

On Tue, Oct 02, 2001 at 07:25:38AM +0200, [EMAIL PROTECTED] wrote:
[...]
 first thanks for your answer.
 Your example does not work because the IdentNrS field is not in the table
 Bestellungen_Status.

Sorry, but there is no such table Bestellungen_Status? You mean
Bestellungen_Status_Text?

 I have to link BestellungenAdr,Bestellungen_Status_Text,BestellungenP to
the
 table Bestellungen.

Oops, sorry. Did overlook that.

FROM   BestellungenAdr e
   INNER JOIN Bestellungen a USING(IdentNrS)
   LEFT JOIN Bestellungen_Status_Text f USING (BestellStatus)
   INNER JOIN BestellungenP b ON b.IdentNrS = a.IdentNrS
   INNER JOIN artikel c USING (IdentNrA)
   INNER JOIN ArtikelText d USING (IdentNrA)

Is that correct now? If not, you surely got the idea.

Bye,

Benjamin.


Hello,

yes it works fine. I have worked the last few years with Oracle and i am new
to the join syntax.
Thanks again.

Armin


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

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: Fwd: Re: FULLTEXT exact match queries?

2001-10-01 Thread Lyubomir Simich

Hello Nate,

Monday, 24 September, 2001, 19:56:47, you wrote:

NF I built my database and then used the command:
NF ALTER TABLE disc ADD FULLTEXT (title,recentdata,specialsound,uniqueid)
NF But if I try to search with this command:
NF SELECT title, recentdata, specialsound,uniqueid FROM disc WHERE MATCH 
NF (title) AGAINST ('Superman')
NFORDER BY ID;
NF I get the following error:
NF Error 1191: Can't find FULLTEXT index matching the column list.

NF What am I doing wrong? I think I'm missing something in my ALTER TABLE 
NF statement but I'm not sure. I haven't found any examples on the web for 
NF what I need. TIA!

You need to create fulltext index for one field 'title'
ALTER TABLE disc ADD FULLTEXT (title)

-- 
Best regards,
 Lyubomirmailto:[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: \n is SLASH, N instead of newline

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 01:43:48PM +0800, [EMAIL PROTECTED] wrote:
  because a newline will indicate a new record, new lines
  have to be escaped. Else, you couldn't reasonably distinguish what's
  content and what's record seperator.
 
 Thanks for the reply. Seems to me mySQL should give me the \n I'm asking
 for rather than assuming that's not what I mean and escaping it so I
 don't get confused.

IMHO, no. It may not intuitive at first, but it is really what one
wants for default. For example, how would you else know, whether

test
asdf

was originally one row (test\nasdf) or two rows (test+asdf)?

If you want to control the output the hard way, you may want to
consider using SELECT ... INTO OUTFILE if feasible.

Or at mysqldump --tab (I never used that, so it may not fit).

 Is there some other way to produce this character, without the -t
 option?

AFAIK, not with mysql (the command line client), but see above. Or
else, convert the result afterwards:

mysql -B -N yasg -e select 'asdf\ntest\ntest' | awk 'BEGIN {RS=n} {print $1}'

(there may be a better method with sed or something)

Bye,

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: HELP PLEASE - C API code help: UPDATE query using result from SELECT

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 03:53:12PM +1000, [EMAIL PROTECTED] wrote:
 Aha, much appreciated...your words therefore the target table may not
 appear in the SELECT clause have made it clear to me...but can I assume
 that if I was to use aliases, then I would be able to sneak past this
 problem? :)

No. :)

The reason is explained in the manual page (about INSERT) I cited.

Bye,

Benjamin.

[...]
 As is described somewhere (http://www.mysql.com/doc/R/E/REPLACE.html),
 REPLACE mainly behaves like INSERT and therefore the target table may
 not appear in the SELECT clause (as described here:
 http://www.mysql.com/doc/I/N/INSERT_SELECT.html).
[...]

-- 
[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: HELP PLEASE - C API code help: UPDATE query using result from SELECT

2001-10-01 Thread John Mravunac

Aha, much appreciated...your words therefore the target table may not 
appear in the SELECT clause have made it clear to me...but can I assume 
that if I was to use aliases, then I would be able to sneak past this 
problem? :)

John :^)
 


Benjamin Pflugmann wrote:

 Hi.

 As is described somewhere ( http://www.mysql.com/doc/R/E/REPLACE.html ),
 REPLACE mainly behaves like INSERT and therefore the target table may
 not appear in the SELECT clause (as described here:
 http://www.mysql.com/doc/I/N/INSERT_SELECT.html ).

 Sorry, but it seems you have to use a temporary table to store the
 intermediate result.

 Bye,

 Benjamin.

 On Tue, Oct 02, 2001 at 12:39:18PM +1000, [EMAIL PROTECTED] wrote:
  Hi,
 
  When I try and use the REPLACE function such as:
 
  REPLACE INTO table1 SELECT table2.ID, table2.Modified FROM table1 
 INNER JOIN table2 ON table1.Company=table2.Company;
 
  I get:
 
  ERROR 1066: Not unique table/alias: 'table1'
 [...]

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