Re: Backups mechanism

2003-01-08 Thread ed

 I use mysqldump to do a total backup of my database.  This is done once a
 day just after midnight.  The file is then taken up by our tape backup
 software.  I do hourly backups of our more important databases, also using
 mysqlbackup.  Works fine and I have used it for restorals on a number of
 occasions.  Even better, mysqlbackup generates SQL files, which, with a
 little manipulation, can be imported into other database systems.

 Doesn't mysqldump also create sql files or at least create the commands
to rebuild what it is dumping?

Ed



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

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




Re: query only returns one row

2003-01-08 Thread Sameh Attia
X wrote:


Hmmm, this genereated the error message, Parse error: parse error in
/directory/connect.php on line 12 - Line twelve is the first printf...
line.
Any suggestions?

Chris
 

Here is corrected version:
?php
  $db = mysql_connect(host, user, pwd);
  mysql_select_db(dbname,$db);
  $result = mysql_query(SELECT * FROM NAMES_TBL,$db);
  while ($row = mysql_fetch_array ($result)) {
 printf(DBID: %sbr\n, $row[DBID]);
 printf(First Name: %sbr\n,$row[FIRST_NAME]);
printf(Last Name: %sbr\n, $row[LAST_NAME]);
}
?

--
Sameh Attia
Senior System Engineer
T.E. Data
--
  __  __  _
  _ _/ /_/ /_(_)___ _
 / ___/ __ `/ __/ __/ / __ `/
(__  ) /_/ / /_/ /_/ / /_/ /
//\__,_/\__/\__/_/\__,_/

She who is in my mind and mouth, I love her with all my heart and blood
We'll restore OUR Palestine



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

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




SP 3 problem ?

2003-01-08 Thread Leonid Prokopets
Has someone experienced a problem running MySQL v 3.23 as NT service on
Windows2000 ServicePack 3 ?

==
I'm having a problem running MySQL v 3.23 as NT service on Win2000 SP3.  It
works allright in manual mode (by 'mysqld' command), but refuses to run as
service.  I installed the service by 'mysqld-nt --install' command.  The
system reported NT service successfully installed.  MySQL appeared in
service list.  But then I tried to start it it returned Error 1067.  The
MySQL service can not be started.

Leonid Prokopets



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

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




Question - Query

2003-01-08 Thread Terence Ng
How do I correct this SQL code:
 
2 tables there, 
lcopen: id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date

#this condition :lcreceive.due_date  current_date
#only affect to : SUM(lcreceive.amount_us)
#and NOT :
#SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open


SELECT
lcopen.bank, 
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open,
#
SUM(lcreceive.amount_us) where lcreceive.due_date 
current_date,
#
# the above statement is not correct 
# 
FROM lcopen, lcreceive 
AND lcopen.id=lcreceive.id 
GROUP BY lcopen.bank;



 
 
 
Terence Ng


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

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

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




When is learning chargeable to a client?

2003-01-08 Thread Jeff Snoxell
Hi,

I suppose this may be slightly off topic and not really relevant to a mysql 
mailing list, sorry... but...

I've spent the last month getting up to speed with MySQL with much help 
from you guys and Mr DuBois' book. I've done this because an existing 
client of mine has a system which works with a database engine we developed 
in house for cheap and cheerful little database applications but their 
requirements have increased to a point where our little engine is running 
at max throttle. I proposed that I convert their setup to work with MySQL 
and said that I would not charge for my time spent learning how to use MySQL.

My question is: when developing _any_ software it's almost always a bit of 
a learning process. I'm always referring to reference manuals etc. etc. 
whenever I'm developing, even in the languages I'm most familiar with. So 
where do I draw the line?

How can I identify a reasonable point at which it's fair to start logging 
some hours down to my client?

Many thanks,


Jeff Snoxell


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

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: When is learning chargeable to a client?

2003-01-08 Thread Simon Green
It is up to you, but for a guide have a look at what MySQL training cover
and if you know that then you are up to speed?
Simon

-Original Message-
From: Jeff Snoxell [mailto:[EMAIL PROTECTED]]
Sent: 08 January 2003 09:25
To: [EMAIL PROTECTED]
Subject: When is learning chargeable to a client?


Hi,

I suppose this may be slightly off topic and not really relevant to a mysql 
mailing list, sorry... but...

I've spent the last month getting up to speed with MySQL with much help 
from you guys and Mr DuBois' book. I've done this because an existing 
client of mine has a system which works with a database engine we developed 
in house for cheap and cheerful little database applications but their 
requirements have increased to a point where our little engine is running 
at max throttle. I proposed that I convert their setup to work with MySQL 
and said that I would not charge for my time spent learning how to use
MySQL.

My question is: when developing _any_ software it's almost always a bit of 
a learning process. I'm always referring to reference manuals etc. etc. 
whenever I'm developing, even in the languages I'm most familiar with. So 
where do I draw the line?

How can I identify a reasonable point at which it's fair to start logging 
some hours down to my client?

Many thanks,


Jeff Snoxell


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

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




[OT] Re: InnoDB vs. MySQL performance Issue

2003-01-08 Thread Sameh Attia
Sam Przyswa wrote:


Septenber 11 2001, more than 3000 women, men, child, killed, Tel Aviv January 5
2003, 23 death and 100 injured by islamic terrorists, that's the islamic history
(small part).

Sam Apache-PHP-MySQL user.

--
Albert Einstein, Karl Marx, Jesus Christ,
   and you Mohamed what have you done for the world ?
 

First of all do not cc me directly. I do get a copy of ur shit by the list.

If you think that Mohamed did not do something for the world which is 
not true. At least he did not leave us with some pigs and monkeys. Read 
your history if u forgot.

If u were a muslim, I thank God that u were not, u would learn how to 
respect other prophets. We as muslims do repect Jesus, Moses, Ibrahim, 
and other prohpets and we are asked to believe in them because it is a 
fundamental believe in our religion.

If u want to know more about out prophet Mohamed go and read 
http://www.islamonline.com/PAGE12.html

Also you will find below detailed information about what the modern, 
democractec, and civilized gang of Zions does to muslims.
Israeli Massacres http://www.ummah.net/unity/palestine/index.htm
Sabra  Shatila http://www.ummah.net/unity/sabra/main.html
Deir Yassin http://www.deiryassin.org  
http://www.ariga.com/peacewatch/dy  
http://www.us-israel.org/jsource/History/deir_yassin.html
Qana http://web.cyberia.net.lb/qana/
.and much more but the memory does not help.

Sam go and get a life and may God forgive u. But u should believe that 
sooner or later there will be no more pigs and monkeys in our lands.

--
Sameh Attia
Senior System Engineer
T.E. Data
--
  __  __  _
  _ _/ /_/ /_(_)___ _
 / ___/ __ `/ __/ __/ / __ `/
(__  ) /_/ / /_/ /_/ / /_/ /
//\__,_/\__/\__/_/\__,_/

She who is in my mind and mouth, I love her with all my heart and blood
We'll restore OUR Palestine



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

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



RE: [OT] Re: InnoDB vs. MySQL performance Issue

2003-01-08 Thread Simon Green
I know this is a emotive subject but PLEASE drop it from the MySQL list.

Thanks
Simon


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

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




Re: Using Perl DBI quote() method with NULL values?

2003-01-08 Thread Salam Baker Shanawa
Hi Jeff,

Try the magic undef as it is with no '' or 

$dbh-do('insert into yourtab values (' .
  join (',', map($dbh-quote($_), $your_stuff, undef, $more_stuff)) .
 ')') ;


Regards
Salam


Jeff Snoxell wrote:

Hello,

I've got a mysql table with a lot of fields and I'm using a map 
statement to pass each of my values for a new record through the quote 
system so-as to have everything nicely wrapped up. Problem is that I 
can't find any way of writing a null value to my DB when the value has 
first passed through quote().

I've tried:

my $err = $MyDatabase-do('INSERT INTO MyTable VALUES(' .
  join(,,map($MyDatabase-quote($_),
  0, # REF
  0, # PARENT REF
  $FormData{'Title'} .   . $FormData{'Name'} . ,
  $FormData{'Email'} . ,
  \N,  # -- I REALLY WANT THIS TO BE A NULL VALUE!
  etc.,
  etc.,
  etc.
   )) .
 ')');

Which works fine except the \N isn't entered into my database as a 
null value. I've also tried '\N' and '' and .

Any ideas how I can solve this easily?

Thanks,


Jeff

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

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: When is learning chargeable to a client?

2003-01-08 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff, et al --

...and then Jeff Snoxell said...
% 
% Hi,

Hi!


% 
% I suppose this may be slightly off topic and not really relevant to a mysql 
% mailing list, sorry... but...

*grin*  I agree that it is but at least it isn't a flame war.  This
probably belongs on an independent consultant list, even though you are
working within a company, because of the nature of ongoing learning
without a large infrastructure, but I don't happen to know of one of
those.  [If anyone does, I'd be happy to hear about them, since I am an
independent...  But now we're drifting even further OT :-]


% 
% I've spent the last month getting up to speed with MySQL with much help 
...
% at max throttle. I proposed that I convert their setup to work with MySQL 
% and said that I would not charge for my time spent learning how to use 
% MySQL.

How nice of you.  I don't know that I would go *that* far if the need to
learn something new is driven by a client, but I've come close...  Of
course, there's always the matter of doing whatever it takes to keep the
client happy.


% 
% My question is: when developing _any_ software it's almost always a bit of 
% a learning process. I'm always referring to reference manuals etc. etc. 
% whenever I'm developing, even in the languages I'm most familiar with. So 
% where do I draw the line?

A good question, and a good point.  I'd say to take a look at the sorts
of things you already do and try to quantify how much you do in a time
period (hour, day, month) in a given language (so many lines of php code
or so many tables in a database design or whatever; it will be tricky).
Then apply that same measure to the new language, and evaluate your level
in the same sort of context (how much work you get done in a time period
(and nobody get picky and remind me of the physics definition of work,
OK? :-) versus how much time you're thrashing or reading or thinking).


% 
% How can I identify a reasonable point at which it's fair to start logging 
% some hours down to my client?

You can take two approaches (well, a huge number of them, but I use two
for most things):

- - If it's core learning and no arrangement has been made, then it's on
  your time.  That's just for core learning, though; once you can start
  to do some things the client starts to pay (see next, though).

- - If a learning arrangement has been made, or once you are starting to
  do work for your client even if you're not yet up to expert speed, bill
  them for the proper number of hours but either at a reduced rate or
  with a credit back.  The client needs to see the time you're spending
  and understand some of what's going on, but at the same time shouldn't
  pay the full rate for less-than-full-speed work.

- - Once you're comfortable in the language, reduce the discounts.  When
  you're proficient, stop altogether (discounting/crediting, that is ;-)

Because I started with the discounted-rate model (rather than credits
back), I've evolved to a SysAdmin rate multiplier of 1.0, a php and perl
multiplier of 0.5, and a mysql multiplier of 0.25.  I was doing php (and,
since I was rusty, perl) at 0.25 until recently and have just made the
jump; yay :-)  Meanwhile, if you're tracking your pro-bono and/or learning
time, it may be better for you to credit back the hours because you can
then count up what you've given away.


% 
% Many thanks,

HTH  HAND


% 
% Jeff Snoxell

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

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

iD8DBQE+HAg8Gb7uCXufRwARAkL9AJwPedAiCJ1o482xxjed7Znf1tvk5wCghBz4
R6VUhDg7jcs4t4FFE4gLb5U=
=R/XS
-END PGP SIGNATURE-

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

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




Mysql-Max dies when remote connection opened

2003-01-08 Thread Per Steinar Iversen

Version: 4.0.8, installed from the RPMs downloaded from the mysql.com
webpages. The server runs RedHat 8.0, all updates installed. The hardware
is a Dell 2650.

Problem: Any connection, using the command line client for example, from
any other node fails even though the access should be allowed. The error
message is:

ERROR 2013: Lost connection to MySQL server during query

On the server side this is logged on the console:

# /usr/bin/mysqld_safe: line 312: 30764 Segmentation fault  
$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION 
--datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking 
$err_log 21

The error log contains:

mysqld-max process hanging, pid 30774 - killed

A simple fix is to uninstall the Max rpm:

rpm -e MySQL-Max-4.0.8-0

After restarting the problem goes away and the remote access is allowed.

Something about the Max package seems to be incompatible with RedHat 8.0 ?

-psi


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

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




question about query log

2003-01-08 Thread Natale Babbo
hi all,

anyone knows if it is possible to create the query log
in a mysql table instead of in a text file?
Otherwise ... is there a way to import it into a
table?

Thanks to all.
Natale Babbo








sql, query

__
Yahoo! Cellulari: scarica i loghi e le suonerie per le tue feste!
http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html

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

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




phpmyadmin and mysql

2003-01-08 Thread Martin Hudec
Hello MySQL,

  we have this problem:

  when using phpmyadmin if we select database to view and we put SQL
  command to ENTER SQL QUERY/QUERIES TO DATABASE field and submit it,
  it will display NO SQL QUERYwhat is wrong?

  please help me...thank you

-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri.

by Douglas Adams


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

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: question about query log

2003-01-08 Thread cristian ditoiu
A little complicated solution is to create the log in a file then setup a
php/perl program that reads that file continously and insert/process that
data .

- Original Message -
From: Natale Babbo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 12:25 PM
Subject: question about query log


 hi all,

 anyone knows if it is possible to create the query log
 in a mysql table instead of in a text file?
 Otherwise ... is there a way to import it into a
 table?

 Thanks to all.
 Natale Babbo








 sql, query

 __
 Yahoo! Cellulari: scarica i loghi e le suonerie per le tue feste!

http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html

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

 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: Still Cannot Get MySQL To Run

2003-01-08 Thread Diana Soares
On Wed, 2003-01-08 at 04:55, CM Miller wrote:
 Have a new years resolution, to get MySQL to run
 Here are the errors that I keep getting...
 
 I don't understand what this is telling me?
 
 from /var/log
 
 021214 19:13:21 mysqld started
 021214 19:13:21 /usr/local/libexec/mysqld: Can't find
 file: './mysql/host.frm' (er
 rno: 13)
 021214 19:13:21 mysqld ended

[root@cartman mysql]# perror 13
Error code  13:  Permission denied

 I haven't messed around with this since late Nov., but
 I really don't want to give up on this.
 
 Any ideas?

I wasn't subscribed in Nov so i don't know what topics people gave you..
Check permissions and ownership of the file './mysql/host.frm' and
directory './mysql'
Here's how i have:

[root@cartman mysql]# pwd
/var/lib/mysql
[root@cartman mysql]# 
[root@cartman mysql]# ll -d mysql
drwx--2 mysqlmysql4096 Nov 21 12:24 mysql
[root@cartman mysql]# 
[root@cartman mysql]# ll -d mysql/host.*
-rw---1 mysqlmysql8958 Oct 31 18:25 mysql/host.frm
-rw---1 mysqlmysql   0 Nov 21 12:24 mysql/host.MYD
-rw---1 mysqlmysql1024 Nov 21 12:26 mysql/host.MYI


 So, it was recommended to try this-run 'install_db'
 from the scripts directory
 
 So I tried that and here is my output: 
 
 Installing all prepared tables
 030107 22:35:39  /usr/local/libexec/mysqld: Shutdown
 Complete
 
 
 To start mysqld at boot time you have to copy
 support-files/mysql.server
 to the right place for your system
 
 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root
 USER !
 This is done with:
 /usr/local/bin/mysqladmin -u root  password
 'new-password'
 /usr/local/bin/mysqladmin -u root -h
 phoenix.miller.org  password 'new-password'
 See the manual for more instructions.
 
 NOTE:  If you are upgrading from a MySQL = 3.22.10
 you should run
 the /usr/local/bin/mysql_fix_privilege_tables.
 Otherwise you will not be
 able to use the new GRANT command!
 
 You can start the MySQL daemon with:
 cd /usr/local ; /usr/local/bin/safe_mysqld 
 
 You can test the MySQL daemon with the benchmarks in
 the 'sql-bench' directory:
 cd sql-bench ; run-all-tests
 
 Please report any problems with the
 /usr/local/bin/mysqlbug script!
 
 The latest information about MySQL is available on the
 web at
 http://www.mysql.com
 Support MySQL by buying support/licenses at
 https://order.mysql.com
 
 
 what in the hell am I doing wrong here, this should
 not be that hard to set up and run? 

Nothing, it all went ok.
Hope that above helps.

ds


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

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




Is InnoDB delaying writes or is there a problem with transaction isolation?

2003-01-08 Thread My Deja

InnoDB seems to delaying writes for too long.
After adding or deleting records in a table, viewing
the results of a query from another application on the
same workstation and other workstations does not
reflect the changes.

It is as though another connections are still being
presented with old snapshots.

Even restarting the other applications, thus creating
new connections does not show the updates. The
connections are all set to autocommit.

They show up eventually, but the time delay which in
some cases has been over 15 minutes which is too much.
I have checked the application code to ensure that
data refreshes actually close and reopen the queries.

I am using MySQL 3.23.51 on Windows 2000 and the
library is ZeosLib MySQL components.

Is there a way to force writes to make them
immediately visible to other connections?

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.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




sql delete question

2003-01-08 Thread Veysel Harun Sahin
Hello,

I have two tables whose structures are below.

- Table1 - 
table1id int not null auto_increment
data varchar(30)

- Table2 -
table2id int not null auto_increment
table1id int not null
data varchar(30)


These two tables are connected to each other with the table1id column. I need to 
delete rows in table1 which have no corresponding table1id values in table2 and also 
i need to delete rows in table2 which have no corresponding table1id values in 
table1. Any comments?

Thanks.

sql,query

__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

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

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




Re: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
@mysql_select_db(be); // this doesn't fail, because only the second
(UPDATE) query fails. The first query (SELECT) is done!


- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Nuno Lopes [EMAIL PROTECTED]
Cc: MySQL List [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 5:06 PM
Subject: Re: [PHP] Re: PHP and MySQL bug


 @mysql_select_db(be); -- this failed
 do echo mysql_error(); to see what went wrong



 Nuno Lopes wrote:

 I done a echo of Mysql_error and it returned:
 'Nenhum banco de dados foi selecionado'
 
 (I have the mysql server in portuguese, but the translation is something
 like 'no db was selected')
 
 
 - Original Message -
 From: David Freeman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, January 05, 2003 10:29 PM
 Subject: RE: [PHP] Re: PHP and MySQL bug
 
 
 
 
   @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
   query doesn't work
 
 Personally, I'd call it bad programming practice to do a database update
 and not check to see if it worked or not.  In this case, how are you
 determining that the query did not work?  Are you manually checking the
 database?  You don't have anything in your code to check the status of
 this query.
 
 Perhaps this might get you somewhere:
 
 $qid = @mysql_query(UPDATE d SET h = '$h' WHERE id = '$id');
 
 if (isset($qid)  mysql_affected_rows() == 1)
 {
   echo query executed;
 } else {
   echo query failed:  . mysql_error();
 }
 
 At least this way you might get some indication of where the problem is.
 
 CYA, 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: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
Doesn't you have any simpler answer??


Maybe installing the new version of mysql server - I have version 3.23.49 -
should do the trick



- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: Nuno Lopes [EMAIL PROTECTED]; MySQL List [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 4:12 PM
Subject: RE: [PHP] Re: PHP and MySQL bug


 Since nobody is jumping in to say it is some simple configuration/setting
 personally my next step would be to shut down all services on the box that
 aren't absolutely necessary and stop everything in the registry under run
 and stop anything in the start folder of the start menu and run the same
 tests.  If no positive results I would uninstall php completely and clean
 any reference in the registry of it and then install with everything still
 shut down.  Retest, if no progress do the same with mysql.  These are
 radical and time-consuming methods, but it seems as though it is broken.
If
 you absolutely need this fixed fast you might resort to paying the
 developers to give you a solution, although it may end up being what I
just
 listed, or it could be some simple fix that we aren't aware of.

 Larry S. Brown
 Dimension Networks, Inc.
 (727) 723-8388

 -Original Message-
 From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 07, 2003 4:31 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: PHP and MySQL bug

 I have the latest version of PHP (4.3.0) as module in apache 2.0.43 and
 mysql 3.23.49.
 Everything is working fine, except this.
 With pconnect the error is the same!


 - Original Message -
 From: Larry Brown [EMAIL PROTECTED]
 To: MySQL List [EMAIL PROTECTED]
 Sent: Monday, January 06, 2003 6:28 PM
 Subject: RE: [PHP] Re: PHP and MySQL bug


  This definitely sounds like a buggy installation or there may be some
  problem with the communication between the web server and the mysqld.
Is
  the db on a different machine?  Try using mysql_pconnect instead of
 connect
  just to see what result you get.  I have read some unfavorable
statements
  about using pconnect with a large number of hits so if it works you
should
  read the comments about it on php.net.  Do a search for mysql_pconnect.
 
  Larry S. Brown
  Dimension Networks, Inc.
  (727) 723-8388
 
  -Original Message-
  From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 06, 2003 1:09 PM
  To: MySQL List; [EMAIL PROTECTED]
  Subject: [PHP] Re: PHP and MySQL bug
 
  The problem is if I close the connection and reopen it the query is
done,
  but if I remain with the same connection has the previous query, mysql
  returns an error.
 
 
  - Original Message -
  From: Larry Brown [EMAIL PROTECTED]
  To: MySQL List [EMAIL PROTECTED]
  Sent: Sunday, January 05, 2003 4:16 PM
  Subject: Re:PHP and MySQL bug
 
 
   Try replacing the following line...
  
   @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query
 doesn't
   work
  
   With...
  
   $query = UPDATE d SET h='$h' WERE id='$id';
   $queryr = mysql_query($query) or die(The sql statement does not
  execute);
  
   if(mysql_affected_rows() !== 1)
   {
  die(The sql statement is successfully run however either h did not
   change or there is an internal error.  Try executing the sql from the
   command line to make sure it otherwise works.);
   }
  
   and see which is coming back.
  
  
   Larry S. Brown
   Dimension Networks, Inc.
   (727) 723-8388




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

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: Backups mechanism

2003-01-08 Thread Aaron Clausen
On Tue, 7 Jan 2003 [EMAIL PROTECTED] wrote:


  I use mysqldump to do a total backup of my database.  This is done once a
  day just after midnight.  The file is then taken up by our tape backup
  software.  I do hourly backups of our more important databases, also using
  mysqlbackup.  Works fine and I have used it for restorals on a number of
  occasions.  Even better, mysqlbackup generates SQL files, which, with a
  little manipulation, can be imported into other database systems.

  Doesn't mysqldump also create sql files or at least create the commands
 to rebuild what it is dumping?

Using default options, it creates a SQL script that will create the table
structures and reload the data.  You can use the mysql command to
repopulate the database.  I'm in constant development of an in-house
accounting system, and to test out bug fixes, new features, etc., I'll just
dump the running database and pipe it into a test database.  I found
mysqldump to have a bit of a learning curve, but I could not survive without
it now.

-- 
Aaron Clausen


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

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




Help - select syntax if else

2003-01-08 Thread Svens Klave

Can anybody help me
with select query

how to do this:

I have table foo1 with two fields image check

| image | check |
| 6782  | 0 |
| 2732  | 1 |
| 6734  | 1 |

so I want to make query
select * from foo1 where [so is it possible to make some if check=1 then 
image is image but if check=0 then into image goes other content for 
example noimage]


I mean I need to check if there is  0 or 1 and so if check is 1 then show 
original number from image field but if there is 0 then it changes original 
content to noimage

so then is possible to optimise my database

otherwise I need to do this with web development scripts to check if I have 
image name like in image field  so its sucks

so maybe somebody can help me with that ok

Mega Regards
--
Svens Klave

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

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



got error:Lost connection to MySQL server during query

2003-01-08 Thread kanda
Dear sir
Pls help
I run Mysql 3.23.54 , Os Windows 2000 service pack 3

I'm got error Lost connection to MySQL server during query and also to drop 
service in service control manager.
Anyway, mysql.err log can not help me to resolve this problem.

What Happen ?
Thank you very much.

Kanda Taweechue
Sr.Engineer
Solutions Development Division
Technicial   Operation Dept.
Loxley Information Services Co.,Ltd


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

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: phpmyadmin and mysql

2003-01-08 Thread Ferhat Can
Hello Martin,
Your problem is related to PHP not MySQL. You should check the
max_post_size directive in yor php.ini file. AFAIK, this limit is set to 8M.
If you decreased the size, increasing it may solve your problem.
max_post_size controls the maximim POST size you can do, and if you exceed
this limit, your post will be discarded.

- Original Message -
From: Martin Hudec [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 13:53
Subject: phpmyadmin and mysql


 Hello MySQL,

   we have this problem:

   when using phpmyadmin if we select database to view and we put SQL
   command to ENTER SQL QUERY/QUERIES TO DATABASE field and submit it,
   it will display NO SQL QUERYwhat is wrong?

   please help me...thank you

 --
 Best regards,
  Martin  mail   [EMAIL PROTECTED]
  mobile +421.907.303.393
  icq34358414
  wwwhttp://www.corwin.sk

 PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

 In those days spirits were brave, the stakes were high,
  men were real men, women were real women and small furry
  creatures from Alpha Centauri were real small furry creatures
  from Alpha Centauri.

 by Douglas Adams


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

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

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

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




mysql@lists.mysql.com

2003-01-08 Thread yingjiefareast
mysql
ÄúÏëÔÚÏã¸Û³ÉÁ¢¹«Ë¾Âð£¿
ÄúÏëÔÚÏã¸ÛÓµÓÐ×Ô¼ºµÄµç»°¼°´«ÕæרÏßÂð£¿
ÄúÏë¿Í»§²¦´òÏã¸Ûµç»°£¬¶øÄúÉíÔÚ¹úÄÚ¶¼¿ÉÒÔËæʱ½ÓÊÕÂð£¿
ÄúÏëͨ¹ýÏã¸ÛµÄ¹«Ë¾¿ªÍØÏã¸ÛÊг¡¼°¹ú¼ÊÊг¡Âð£¿
ÄúÏëÏã¸Û¹«Ë¾ÓÐרҵÓÐÀñµÄÃØÊéÒÔ¸óϹ«Ë¾Ãû³ÆÓÃÖÐÓ¢ÎÄ
½ÓÌýµç»°Â𣿲¢¼´Ê±×ªÒÆ»ò»Ø´«(·­Òë)¸øÄãÂð£¿
ÄúÏëÔÚ¼ÒÀïÉÏÍø¾Í¿ÉÒÔ°ÑÏã¸Û¹«Ë¾»§¿ÚµÄ×ʽðµ÷¶¯Âð£¿
ÓÖ»òÕßÄãÒÑÔÚÏã¸ÛÓÐÁË×Ô¼ºµÄ¹«Ë¾£¬Ïë¼õÉÙ·ÑÓá£
Èç¹ûÒÔÉÏ·þÎñÄú¶¼ÐèÒª£¬Ïã¸ÛÓ¯½ÝÔ¶¶«ÓÐÏÞ¹«Ë¾¿ÉÒÔ°ïµ½Äú.¶øÇÒ¼Û¸ñÏ൱ÓŻݣ¬ÊÖÐø¼òµ¥£¬
Ò»·ÝºÏͬ£¬Ò»ÕÅÉí·ÝÖ¤¸´Ó¡¼þOK£¬»¶Ó­À´µç×Éѯ¡£
Ïã¸ÛÓ¯½ÝÔ¶¶«ÓÐÏÞ¹«Ë¾ÉîÛÚ°ìÊ´¦  
E-mail: [EMAIL PROTECTED]
µç»°£º0755-27845051  ´«Õ棺0755-27939416
ÊÖ»ú£º13902985328
ÁªÏµÈË£º³ÂС½ã / ÑîС½ã
ÐÅÏ¢¶ÔÓÐÐèÒªµÄÈËÀ´ËµÊDzƸ»£¬¶Ô²»ÐèÒªµÄÈËÀ´ËµÊÇÀ¬»ø£¬Èç¹ûÄúÓÐÐèÒªµÄ»° 
£¬¾´ÇëÁªÏµÎÒ£¬Èç¹ûÄú²»ÐèÒª£¬ÇëËæÊÖɾµô£¬²¢Çë¶à¶àÁ½⣡
This mail is a business  letter .If you are uninterested in this ,Please delete it 
immediately;If  you do not hope to  receive this mail again ,please send a E-mail 
subject removeto us. we will filter it out of our maillist.Thank you !



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

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




RE: Query mysql on another server

2003-01-08 Thread jarnold4
Why can't you use an Env variable to point to the server you want to query
from and switch the value back and forth as needed in the case that you want
to periodically switch back and forth between servers?  Or write a function
that runs on server1 to query against the tables on server2 making the
results available to a query to be run on server1?

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 11:12 AM
To: Chris Boget; [EMAIL PROTECTED]
Subject: Re: Query mysql on another server


At 10:08 -0600 1/7/03, Chris Boget wrote:
We have a *nix network and on that network we have 2
web servers.  One for development (server1) and one for
production (server2).  And on each of those servers we
have MySQL installed.  Is there a way we can query a
table on server2 from server1?

No.

I know that when you are using a database from the mysql
command line, you can query a table in another database
just by using select databasename.tablename.  But the
same method using servername doesn't work.  Is this even
possible?

No.


thnx,
Chris

sql, query

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

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


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

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




Full text limitation?

2003-01-08 Thread Walter Procopio
Hi,

I have installed mysql max 4.0.7 gamma on a Suse (ver. 8.0 professional)
linux server. I have tried many full text queries and I had only a problem
with a query like this:

SELECT count(a.rsori) pippo
FROM ecoras a, ecotxt b
WHERE MATCH ( b.rstxt ) AGAINST ( '-linux' IN BOOLEAN MODE )
AND a.rsori = b.rsori
AND a.rscod = b.rscod;

If I use only the minus operator I have not a valid resultset. If I use the
minus operator with another one I have a reultset.
For example:

SELECT count(a.rsori) pippo
FROM ecoras a, ecotxt b
WHERE MATCH ( b.rstxt ) AGAINST ( '+linux -windows' IN BOOLEAN MODE )
AND a.rsori = b.rsori
AND a.rscod = b.rscod;

Is it a full text limit?

Thanks
Walter Procopio


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

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




Re: Query mysql on another server

2003-01-08 Thread Chris Boget
 Why can't you use an Env variable to point to the server you want to query
 from and switch the value back and forth as needed in the case that you want
 to periodically switch back and forth between servers?  Or write a function
 that runs on server1 to query against the tables on server2 making the
 results available to a query to be run on server1?

You can do all that.  Unfortunately that wasn't, as Paul rightly picked up, the
crux of my question.  I wasn't asking how (or if) to do it programatically.  I was
asking if it can be done from the (connection made by the) mysql command
line.
I know how to do it programatically and that is what I'm going to have to end
up resorting to.  I was asking my question in hopes that there was an easier
way.

Chris


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

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




Disproportionately slow, but simple, query

2003-01-08 Thread Jim
I've got what would be best described as a medium sized table, which
normally queries quickly, except for this one...

Table data_static has around 35,000 records.
This trivial query:

SELECT tracking_id,
   complainant_email,
   DATE_FORMAT(import_date,'%Y-%c-%e') AS date,
   subject
FROM data_static
WHERE case_id = 0;

...gets explained thus:
  table = data_static
  type = ref
  possible_keys = _case
  key = _case
  key_len = 8
  ref = const
  rows = 7126
  Extra = where used


It takes just right at 60 seconds to generate 6409 result rows.  Removing
the DATE_FORMAT calculation doesn't have any impact.

Why so slow?

One thing I thought of, but isn't trivial to change, is that one of the
fields is a text type that often holds near its size limit, so individual
records can be fairly large.

Is this just a matter of getting the data off the disk and to the client, or
something else?

Jim

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

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




delay on executing mysql_free_result with underfetched query

2003-01-08 Thread Vladimir Zheleznyak
From: [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Subject: delay on executing mysql_free_result with underfetched query
Description:
If to execute mysql_use_result on the query that returns large amount of
records and then
execute mysql_free_result - execution the last function take time equal to
fetch all data to client.
Is it possible to avoid this delay?

Synopsis: Delays on breaking fetch
Originator: Vladimir Zheleznyak
Organization:   Core Lab
MySQL support:  none

Severity: non-critical
Priority: low
Category: mysql client, C
Class:  sw-bug
Release: mysql-3.23.51

Exectutable:   mysqld-nt
Environment:   Celeron 800, RAM 256 MB, localhost
System:Win2000
Compiler:  VC++ 6.0
Architecture:  i

Best regards,
Vladimir Zheleznyak



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

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




Version 4 safe to use?

2003-01-08 Thread David Rock
Are many people using MySQL version 4 yet?  I'm interested in it because I
want to use it's SSL capabilities but would like to hear that people are not
having trouble with it first.

Thanks,
David Rock

 

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

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 - select syntax if else

2003-01-08 Thread Brent Baisley
You don't even need the check field you can just directly check the 
contents of the image field. Although I'm not sure if you are trying to 
set a filter or display something different. If you want to display a 
conditional on a field then you need to specify that field directly.

select *,if(image,1,0) as ImagePresent from foo1 where ...

If you don't want to spell out all of the fields, that's the easiest 
syntax. You'll can all your fields plus an extra column named 
ImagePresent that will be the same as your check column. You could 
just as easily have it show the image number instead of a 1 or 0.

select *,if(image,image,no image) as ImageNumber from foo1 where ...

On Wednesday, January 8, 2003, at 08:27 AM, Svens Klave wrote:

so I want to make query
select * from foo1 where [so is it possible to make some if check=1 
then image is image but if check=0 then into image goes other content 
for example noimage]
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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

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




Re: I'm new in Mysql

2003-01-08 Thread Bhavin Vyas
Hi Beogradjanin
As Paul mentioned yesterday, the final column defination does not require a
comma because it is the final defination.

Bhavin.
- Original Message -
From: Beogradjanin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 7:38 PM
Subject: I'm new in Mysql


 Hello mysql,

   I want to learn MySQL and PHP I've installed Apache , PHP and MySql
   Whan I try to make tables

 create table guestbook
 (
 name varchar( 40 ) null,
 location varchar( 40 ) null.
 email varchar( 40 ) null,
 url varchar( 40 ) null,
 comments text null,
 )
 ;


 I get this

 mysql create table guestbook
  - (
  - name varchar( 40 ) null,
  - location varchar( 40 ) null,
  - email varchar( 40 ) null,
  - url varchar( 40 ) null,
  - comments text null,
  - )
  - ;
  ERROR 1064: You have an error in your SQL syntax near ')' at line 8
 mysql

 Whats wrong here

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



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

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



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

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




Slow response with MRG tables.

2003-01-08 Thread Mariella Di Giacomo
Hello,



I would like to ask three questions related to MySQL and MERGE tables.

I have a program that reads from mysql server  (4.0.5 for Solaris 2.8 on a 
V880 with 8 processors and 32 GB of memory), using Perl  DBI MySQl driver, 
two tables FULLM (merge of 3 tables) and RECKM (merge of 15 tables), that 
are MERGED TABLES.

There is an update program that reads (it has been running for weeks) both 
tables doing a LEFT JOIN in the following matter, where the value
of vkeys changes for each query:

select substring(collection,1,3) as coll, count(*) from FULLM left join 
RECKM on intkeys=starkey where vkeys=
/cors/abcd00/2301-4598/1970/0/79_RODBARD-CARARD group by coll;

I have the slow log option turned on and in general these queries take a 
long time (in most cases over a minute).
What I have noticed is that most of the time is spent in querying the RECKM 
merged table (even in the case where I do not have a join), no matter if I 
am querying through Perl or directly from mysql command line.

My questions are :
1) when a query is made to a MRG table, how is that query implemented by 
MySQL ?
2) Is there anything I could optimize in the query itself ? I cannot have 
ENUM Type fields as procedure analyse() suggests.
3) I have included the table types and description, the mysqld conf file.

Could someone help please ?

Thanks a lot in advance for your help,

Mariella
_

SELECT substring(collection, 1, 3) as coll, count(*) from FULLM LEFT JOIN 
RECKM on intkeys=starkey where vkeys=
/cors/abcd00/0003-0147/106/949/283_NEI-GDBP group by coll PROCEDURE 
ANALYSE() \G
*** 1. row ***
Field_name: coll
Min_value: Art
Max_value: Art
Min_length: 3
Max_length: 3
Empties_or_zeros: 0
Nulls: 0
Avg_value_or_avg_length: 3.
Std: NULL
Optimal_fieldtype: ENUM('Art') NOT NULL
*** 2. row ***
Field_name: count(*)
Min_value: 4
Max_value: 3628
Min_length: 1
Max_length: 4
Empties_or_zeros: 0
Nulls: 0
Avg_value_or_avg_length: 1250.
Std: 1681.9196
Optimal_fieldtype: ENUM('4','119','3628') NOT NULL
2 rows in set (0.78 sec)
_

mysql describe FULLM;
+-+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+-+--+--+-+-+---+
| vkeys | varchar(100) | | PRI | | |
| intkeys | varchar(11) | YES | | NULL | |
+-+--+--+-+-+---+
2 rows in set (0.01 sec)
mysql describe RECKM;
++--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-+---+
| vdkkey | varchar(100) | YES | MUL | NULL | |
| starkey | varchar(11) | YES | MUL | NULL | |
| collection | varchar(15) | YES | | NULL | |
++--+--+-+-+---+
3 rows in set (0.00 sec)



show index FROM RECKM \G
*** 1. row ***
Table: RECKM
Non_unique: 1
Key_name: index_vdkkey
Seq_in_index: 1
Column_name: vdkkey
Collation: A
Cardinality: NULL
Sub_part: NULL
Packed: NULL
Null: YES
Index_type:
Comment:
*** 2. row ***
Table: RECKM
Non_unique: 1
Key_name: index_starkey
Seq_in_index: 1
Column_name: starkey
Collation: A
Cardinality: NULL
Sub_part: NULL
Packed: NULL
Null: YES
Index_type:
Comment:
2 rows in set (0.00 sec)

show index FROM FULLM \G
*** 1. row ***
Table: FULLM
Non_unique: 0
Key_name: PRIMARY
Seq_in_index: 1
Column_name: vkeys
Collation: A
Cardinality: NULL
Sub_part: NULL
Packed: NULL
Null:
Index_type:
Comment:
1 row in set (0.00 sec)

show table STATUS like FULLM \G
*** 1. row ***
Name: FULLM
Type: MRG_MyISAM
Row_format: Dynamic
Rows: 17610691
Avg_row_length: 112
Data_length: 1348904896
Max_data_length: NULL
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: NULL
Update_time: NULL
Check_time: NULL
Create_options:
Comment:




show table STATUS like RECKEYS \G
*** 1. row ***
Name: RECKEYS
Type: MRG_MyISAM
Row_format: Dynamic
Rows: 491596360
Avg_row_length: 127
Data_length: 40240090580
Max_data_length: NULL
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: NULL
Update_time: NULL
Check_time: NULL
Create_options:
Comment:


This is the mysqld my.cnf file

#
set-variable = max_connections=16384
set-variable = 

Re: Disproportionately slow, but simple, query

2003-01-08 Thread Brent Baisley
That would be my guess, the extra time is the data transfer. You can 
easily verify this by changing your query to:
SELECT COUNT(*)
FROM data_static
WHERE case_id = 0;

That will give you the raw query time without the data transfer or 
formatting overhead.


On Wednesday, January 8, 2003, at 10:32 AM, Jim wrote:

One thing I thought of, but isn't trivial to change, is that one of the
fields is a text type that often holds near its size limit, so 
individual
records can be fairly large.

Is this just a matter of getting the data off the disk and to the 
client, or
something else?

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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

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: Still Cannot Get MySQL To Run

2003-01-08 Thread Christensen, Dave
The problem you are having is a result of the permissions that are set on
the data and log directories that are identified in my.cnf, and is
documented in the MySQL Reference Manual.  If you change the ownership of
the data and log directories to mysql (both user and group), the error
should go away.

David Christensen
Brokers International, Ltd.
1200 E Main St
PO Box 160
Panora, IA  50216
(800) 362-1097 or (641) 755-2775
[EMAIL PROTECTED]
 


-Original Message-
From: CM Miller [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Still Cannot Get MySQL To Run




Have a new years resolution, to get MySQL to run


Here are the errors that I keep getting...

I don't understand what this is telling me?

from /var/log

021214 19:13:21 mysqld started
021214 19:13:21 /usr/local/libexec/mysqld: Can't find
file: './mysql/host.frm' (er
rno: 13)
021214 19:13:21 mysqld ended

I haven't messed around with this since late Nov., but
I really don't want to give up on this.

Any ideas?


So, it was recommended to try this-run 'install_db'
from the scripts directory

So I tried that and here is my output: 

Installing all prepared tables
030107 22:35:39  /usr/local/libexec/mysqld: Shutdown
Complete


To start mysqld at boot time you have to copy support-files/mysql.server to
the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root
USER !
This is done with:
/usr/local/bin/mysqladmin -u root  password
'new-password'
/usr/local/bin/mysqladmin -u root -h
phoenix.miller.org  password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL = 3.22.10
you should run
the /usr/local/bin/mysql_fix_privilege_tables.
Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/safe_mysqld 

You can test the MySQL daemon with the benchmarks in
the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the
/usr/local/bin/mysqlbug script!

The latest information about MySQL is available on the
web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com


what in the hell am I doing wrong here, this should
not be that hard to set up and run? 



=
People without goals get used by those who have goals - Unknown

*
GAIM ID:  cmmiller1973
*

__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

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

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

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

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




Re: I'm new in Mysql

2003-01-08 Thread Kip Turk
On Mon, 6 Jan 2003, Beogradjanin wrote:

 Hello mysql,

   I want to learn MySQL and PHP I've installed Apache , PHP and MySql
   Whan I try to make tables

 create table guestbook
 (
 name varchar( 40 ) null,
 location varchar( 40 ) null.
 email varchar( 40 ) null,
 url varchar( 40 ) null,
 comments text null,
 )
 ;

The last line of your table creation comments text null, does NOT need
a comma.  Drop that and you should be fine.

-- 
Kip Turk, RHCE   [EMAIL PROTECTED]
Systems Administrator/Killer of Spam/Writer of Code/Penguin Proponent
West Central Net - tel: 915.234.5678 / 800.695.9016 fax: 915.656.0071
-.-. --- -.. . / -- --- -. -.- . -.-- --..-- /  .- -.-. -.- . .-.

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

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




subselect workaround help?

2003-01-08 Thread Lefevre, Steven
Hey folks-

'nother question.
I'm not an SQL expert, and I think I need a subselect, which means I need a
workaround on MySQL 3.23 or whatever version it is.

Here's the tables I have, with the relevant columns:

Students
 - Name
 - StudentID (PK)
 - ClassID

Classes
 - ClassID (PK)
 - Name

 Each Student belongs to one class.


So, I have the StudentID. I want to get the Classes.Name...
Final result should look like

Student | Class
--
Steve Lefevre | Math101
Stacy Adams | Intro to SQL

Something like

SELECT Student.Name, Classes.Name FROM Students, Classes WHERE
Students.StudentID =  . $ID .  AND Classes.Name IN ( SELECT Classes.Name
FROM Classes WHERE ClassID = Students.ClassID )

I know that probably won't work as a subselect query, but that's my starting
point.

Any help? Thanks!

Steve


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

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




converting text to hypertext

2003-01-08 Thread Rick Tucker
I just imported a .csv file and one of the columns of data was websites
addresses.  Those addresses aren't being recognized as links when I output
an html table from my queries.  I'm scratching me head on how to make the
conversion.  I figured there would by a hypertext datatype of some sort, but
I can't find any information regarding this issue. If someone could point me
in the right direction, I would appreciate it.

Thanks,

rick


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

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: delay on executing mysql_free_result with underfetched query

2003-01-08 Thread Paul DuBois
At 18:06 +0200 1/8/03, Vladimir Zheleznyak wrote:

From: [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Subject: delay on executing mysql_free_result with underfetched query
Description:
If to execute mysql_use_result on the query that returns large amount of
records and then
execute mysql_free_result - execution the last function take time equal to
fetch all data to client.
Is it possible to avoid this delay?


No. The reason this happens is due to the way that mysql_free_result()
is implemented, to avoid commands out of sync errors.  In the old
days, if you used mysql_use_result() and then didn't fetch all the
rows, calling mysql_free_result() released the result set on the client,
but the server still had rows left to send.  The next query would fail
with an out-of-sync error.

Now, mysql_free_result() automatically fetches and discards any yet-unfetched
rows, which avoids that problem.

It'd be nice were it possible to tell the server itself to discard the
rows, but it doesn't work that way.  Maybe you can use LIMIT to generate just
the initial part of the result, if you suspect that you're not going to
need it all.



Synopsis: Delays on breaking fetch
Originator: Vladimir Zheleznyak
Organization:   Core Lab
MySQL support:  none

Severity: non-critical
Priority: low
Category: mysql client, C
Class:  sw-bug
Release: mysql-3.23.51

Exectutable:   mysqld-nt
Environment:   Celeron 800, RAM 256 MB, localhost
System:Win2000
Compiler:  VC++ 6.0
Architecture:  i

Best regards,
Vladimir Zheleznyak



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

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: Weird WHERE clause possible?

2003-01-08 Thread Ryan Fox

- Original Message -
From: Lefevre, Steven [EMAIL PROTECTED]
 The problem (as I see it) is that I'm storing the last name and the first
 name in two seperate fields. I can make an SQL statement like Select *
from
 Students Where LastName Like Smith%;, but can I make something like

 SELECT * FROM Students WHERE (LastName, , , FirstName) AS Name LIKE
 Smith, J%;

Backing up, is the problem that you need to uniquely identify the student's
name after returning the results?  If so, a simple, efficient way is to add
an auto_increment column to your students table, so each name is given a
unique ID.  Then, when results are returned, you can create a link for each
student that includes the student's ID.

If this isn't the case, and you really want to do a statement like that
above, how about:
SELECT * FROM Students WHERE LastName='Smith' and FirstName LIKE 'J%';
or worse,
SELECT * FROM Students WHERE concat(LastName, , , FirstName) LIKE 'Smith,
J%';

Ryan Fox

sql, query, sausage


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

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: Version 4 safe to use?

2003-01-08 Thread Scott Pippin

Are many people using MySQL version 4 yet?  I'm interested in it
because I
want to use it's SSL capabilities but would like to hear that people
are not
having trouble with it first.

We have been using 4.0.x for about five months now on a production
system and have had no problems.


Scott Pippin
[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: sql delete question

2003-01-08 Thread Paul DuBois
At 7:27 -0500 1/8/03, Veysel Harun Sahin wrote:

Hello,

I have two tables whose structures are below.

- Table1 -
table1id int not null auto_increment
data varchar(30)

- Table2 -
table2id int not null auto_increment
table1id int not null
data varchar(30)


These two tables are connected to each other with the table1id 
column. I need to delete rows in table1 which have no corresponding 
table1id values in table2 and also i need to delete rows in table2 
which have no corresponding table1id values in table1. Any 
comments?

Thanks.

sql,query


This sounds like a delete parentless children and childless parents
question.  Turning to my handy copy of MySQL Cookbook which I just happen
to have nearby :-) I see the following under Identifying and Removing
Unattached Records (pp668-669), where the _head and _item are the parent
and child tables that correspond to your table1 and table2:

---
To  use  a  multiple-table  DELETE  statement  for  removing
unmatched records, just take the SELECT statement  that  you
use  to identify those records and replace the stuff leading
up to the FROM keyword with DELETE tbl_name.   For  example,
the  SELECT  that  identifies  childless  parents looks like
this:

 SELECT swdist_head.dist_id AS 'unmatched swdist_head IDs'
 FROM swdist_head LEFT JOIN swdist_item
 ON swdist_head.dist_id = swdist_item.dist_id
 WHERE swdist_item.dist_id IS NULL;

The corresponding DELETE looks like this:

 DELETE swdist_head
 FROM swdist_head LEFT JOIN swdist_item
 ON swdist_head.dist_id = swdist_item.dist_id
 WHERE swdist_item.dist_id IS NULL;

Conversely, the query to identify parentless children is  as
follows:

 SELECT swdist_item.dist_id AS 'unmatched swdist_item IDs'
 FROM swdist_item LEFT JOIN swdist_head
 ON swdist_item.dist_id = swdist_head.dist_id
 WHERE swdist_head.dist_id IS NULL;

And the corresponding DELETE statement removes them:

 DELETE swdist_item
 FROM swdist_item LEFT JOIN swdist_head
 ON swdist_item.dist_id = swdist_head.dist_id
 WHERE swdist_head.dist_id IS NULL;
---

This requires that you have MySQL 4.x, because 3.x doesn't support
multiple-table DELETE.  For 3.x, you must write a program that identifies
the unattached records and generates the appropriate statements to delete
them.  (The code for this is in the Cookbook, too; you can get it at
the book's web site.)

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

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: Full text limitation?

2003-01-08 Thread Paul DuBois
At 14:03 +0100 1/8/03, Walter Procopio wrote:

Hi,

I have installed mysql max 4.0.7 gamma on a Suse (ver. 8.0 professional)
linux server. I have tried many full text queries and I had only a problem
with a query like this:

SELECT count(a.rsori) pippo
FROM ecoras a, ecotxt b
WHERE MATCH ( b.rstxt ) AGAINST ( '-linux' IN BOOLEAN MODE )
AND a.rsori = b.rsori
AND a.rscod = b.rscod;

If I use only the minus operator I have not a valid resultset.


Isn't that the same as asking for records that don't match anything?


 If I use the
minus operator with another one I have a reultset.
For example:

SELECT count(a.rsori) pippo
FROM ecoras a, ecotxt b
WHERE MATCH ( b.rstxt ) AGAINST ( '+linux -windows' IN BOOLEAN MODE )
AND a.rsori = b.rsori
AND a.rscod = b.rscod;

Is it a full text limit?

Thanks
Walter Procopio



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

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




Resetting the auto_increment to start from 1

2003-01-08 Thread Octavian Rasnita
Hi all,

I've read the following in a MySQL book:

  A special case of record deletion occurs when you clear out a table
entirely using a DELETE with no WHERE clause:
 DELETE FROM tbl_name;
  In this case, the sequence counter may be reset to 1, even for table types
for which values normally are not reused (MyISAM and InnoDB). For those
types, if you wish to delete all the records while maintaining the current
sequence value, tell MySQL to perform a record-at-a-time delete by including
a WHERE clause that specifies some trivially true condition:
 DELETE FROM tbl_name WHERE 1  0;

---

Well, I've tried that sql statement, but the auto_increment point of start
was not reset to 1.
I use MySQL 4.05 under Windows 2000.

Thanks.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [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: Backups mechanism

2003-01-08 Thread Jon Bertsch
Jonas,

We use mysqlhotcopy as a command line script set to run daily as a cron 
job. Seems to work fine. You can add flags that allow you to maintain 
previous copies of the db in case you need to go back a version or two. It 
took about 10 minutes to set up. We then run TSM backups to storage of the 
script output.

mysqlhotcopy db_name [/path/to/new_directory]


You can find out more in the manual at:
http://www.mysql.com/doc/en/mysqlhotcopy.html

and here's a general intro:
http://www.mysql.com/doc/en/Backup.html

Sorry, there is some reading involved :-)

Jon Bertsch


At 04:07 PM 1/7/2003 +0100, you wrote:
 Hello world!
Every attempt I have made to find a decent way of backing up a database 
ends up with tons of reading to show hundreds of ways to do database backups.

I want to know which way to do complete backups is most commonly used by 
professional users. (Windows and Linux)

I have pleasant experience from Microsoft SQL Server 2000 where backung up 
is very confident, easy to understand and just a matter of a mouse click.

Is there any similarily convenient way to do this with mysql, for example:
* a shell script (windows / Linux) that works as expected without days of 
configuration?
* scheduled backups, complete or differential?
* GUI-solution ??? (mysql control center does not even mention the word 
backup)

Backup is such an important issue. Why does it seem like it is something 
that the developers don't care about?


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

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: Help - select syntax if else

2003-01-08 Thread Roger Baklund
* Svens Klave
 Can anybody help me
 with select query

I can try.

 how to do this:

 I have table foo1 with two fields image check

 | image | check |
 | 6782  | 0 |
 | 2732  | 1 |
 | 6734  | 1 |

 so I want to make query
 select * from foo1 where [so is it possible to make some if check=1 then
 image is image but if check=0 then into image goes other content for
 example noimage]


 I mean I need to check if there is  0 or 1 and so if check is 1 then show
 original number from image field but if there is 0 then it

SELECT check,IF(check,image,'noimage') AS image FROM foo1;

 changes original content to noimage

eh... a select statement can not change the database. The above SELECT will
change the output of the image column according to your specification, but
it will not change the database. You would need to use UPDATE for that:

UPDATE foo1 SET image = 'noimage' WHERE check = 0;

--
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: Problem inserting the ô character in My

2003-01-08 Thread Egor Egorov
On Wednesday 08 January 2003 03:17, Adam Dershewitz wrote:

 After digging through the mysql web site and hunting on google I couldn't
 find the answer to a problem that I am having.

 It looks like MySQL is having problems differentiating between the
 Т(ascii 244) and the o characters.  If you create the table from the
 SQL below and then try to run the first two insert statements it will give
 you a duplicate error even though they are different.  If you look at the
 data in the table it will be the first one that got inserted so if you
 delete the data and switch the order of the inserts then the other one will
 show up correctly. The two select statements both return then same data.

 CREATE TABLE Test
 (Test VARCHAR(255) NOT NULL DEFAULT '',
  UNIQUE U1Test (Test));

 insert into Test(Test) VALUES('Т')
 insert into Test(Test) VALUES('o')
 select * from Test where Test = 'Т'
 select * from Test where Test = 'o'

Check that you specify appropriate character set for MySQL server. If no, set 
up default-character-set and re-create indexes.



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




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

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




re: InnoDB on update cascade

2003-01-08 Thread Egor Egorov
On Monday 06 January 2003 14:51, Daniel Kiss wrote:

 Does anyone know why 'on update cascade' option does not work in InnoDB
 foreign keys?
 Is it supported anyway?

It's supported since 4.0.8:
http://www.mysql.com/doc/en/News-4.0.8.html



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




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

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




re: Still Cannot Get MySQL To Run

2003-01-08 Thread Victoria Reznichenko
On Wednesday 08 January 2003 06:55, CM Miller wrote:

 Have a new years resolution, to get MySQL to run


 Here are the errors that I keep getting...

 I don't understand what this is telling me?

 from /var/log

 021214 19:13:21 mysqld started
 021214 19:13:21 /usr/local/libexec/mysqld: Can't find
 file: './mysql/host.frm' (er
 rno: 13)
 021214 19:13:21 mysqld ended

 I haven't messed around with this since late Nov., but
 I really don't want to give up on this.

$ perror 13
Error code  13:  Permission denied


It means that MySQL server doesn't have permissions to that file. MySQL server 
should be owner of the data dir.


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





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

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




re: running as NT service problem

2003-01-08 Thread Victoria Reznichenko
On Tuesday 07 January 2003 11:49, Leonid Prokopets wrote:

 I'm having a problem running MySQL as NT service on Win2000 plattform.  It
 works allright in manual mode (by 'mysqld' command), but refuses to run as
 service.  I installed the service by 'mysqld-max-nt --install' command. 
 The system reported NT service successfully installed.  MySQL appeared in
 service list.  But then I tried to start it it returned Error 1067.  The
 MySQL service can not be started.

 I should add that I dont have such problem on WinNT server plattform -
 everything runs smoothly.

Run the following from the DOS prompt:

mysqld-max-nt.exe --standalone --console

You can see errors in the output.



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





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

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




RE: MySQL 4.0.7-gamma: Bugs affecting the privilege system

2003-01-08 Thread Alexander M. Turek
Hi Stefan,

-Original Message-
From: Stefan Hinz, iConnect (Berlin)

 Alexander,

  - After having set up both machines completely, I installed
  the Win32 binary distribution of MySQL 4.0.7-gamma. Although
  I did not upgrade from an earlier version, the privileges
  tables still have the old structure without the new columns
  introduced with MySQL 4.0.2-beta!
  Furthermore, the script menioned in the documentation
  (mysql_fix_privilege_tables) is obiously not included in the
  distribution. Because of this, there is no way to use the new
  privilege system but fixing the tables manually...

 I encountered the same issue, and Miguel Solórzano from MySQL
 AB replied that it was his fault, simply forgetting the new
 privilege tables in the Win32 dist.

 mysql_fix_privilege_tables is nowhere to find, but a list
 member who had pulled the 4.1 source found it in there and
 sent it to me. I extracted the SQL statements, ran the
 script, and now my 4.0.7 has all the new privileges. You'll
 find it at the bottom of this mail.

 Maybe this can fix the other bugs you reported, too.

Hi Stefan,

It does not.
I fixed the priv tables manually, but the other two bugs are still
occuring.
Have you tried to reproduce them?
Thanks,

Alexander




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

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




re: problem with drop table

2003-01-08 Thread Egor Egorov
On Sunday 05 January 2003 16:10, Francesco wrote:

 I tried to drop a table with Mysql 4.0.1 alpha nt and I have encountered
 the following problem:
 ERROR : Error on delete of .'\camcomm.tmpge.MYI'
 The problem persists. I don't know the reason of this error.
 I ask if a new version of Mysql (the version 4.0.7 i s released) is better.

4.0.1 is about one year old. So, upgrade to newest version is recommended in 
any case.



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




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

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




Re: Using Crystal Reports with MySQL

2003-01-08 Thread Scott Pippin

I'm having trouble getting the two to work, when I try to connect to
the
database in Crystal I get an error message saying ODBC Error:
[TCX][MyODBC}
Could not read table names
It is worth a try.  Here are the instructions for the registry fix.

Download odbcregs.zip from Crystal Decisions.

http://support.crystaldecisions.com/communityCS/FilesAndUpdates/odbcregs.zip.asp

1. Open the zip file and extract the files to WINNT/System32 or
Windows/System32 for XP.
NOTE: If any of the files are newer on your machine do not replace
them.
2. run the outjoin.reg file.
3. run regedit and go to HKEY_CURRENT_USER  Software  Seagate
Software  Crystal Reports  DatabaseOptions  Outer Join and click on
SQL2OuterJoin and add MYODBC3(If you are using the 3.x MyODBC Driver) or
to the end of the DataValue list.

Crystal need to be told what the join syntax is for the particular
database you are using.  This fix will work with any Crystal Reports
8.x; I'm not sure if it will work with 9.x or not.  If you are still
having problems after doing this let me know and I can try to help you
track it down.

NOTE: I'll send the file to you in a separate email.  I wanted to put
the fix instructions on the list for others to access if needed.





Scott Pippin
[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 - select syntax if else

2003-01-08 Thread Zak Greant
On Wed, Jan 08, 2003 at 03:27:51PM +0200, Svens Klave wrote:
 
 Can anybody help me
 with select query
 
 how to do this:
 
 I have table foo1 with two fields image check
 
 | image | check |
 | 6782  | 0 |
 | 2732  | 1 |
 | 6734  | 1 |
 
 so I want to make query
 select * from foo1 where [so is it possible to make some if check=1 then 
 image is image but if check=0 then into image goes other content for 
 example noimage]
 
 
 I mean I need to check if there is  0 or 1 and so if check is 1 then show 
 original number from image field but if there is 0 then it changes original 
 content to noimage
 
 so then is possible to optimise my database
 
 otherwise I need to do this with web development scripts to check if I have 
 image name like in image field  so its sucks
 
 so maybe somebody can help me with that ok

  Good Day Svens,

  You can permanently change the database using the following query:

UPDATE foo1 SET image='noimage' WHERE check=0;


  Cheers!

-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Using and Managing MySQL
  MySQL Training: Washington DC, March 17-21, 2003
  Visit http://mysql.com/training for more information

Public Service Announcement:  Sincere Choice (http://sincerechoice.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




Re: Question - Query

2003-01-08 Thread gerald_clark
FROM must precede WHERE.

Terence Ng wrote:


How do I correct this SQL code:

2 tables there, 
lcopen: id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date

#this condition :lcreceive.due_date  current_date
#only affect to : SUM(lcreceive.amount_us)
#and NOT :
#SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open


SELECT
lcopen.bank, 
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open,
#
SUM(lcreceive.amount_us) where lcreceive.due_date 
current_date,
#
# the above statement is not correct 
# 
FROM lcopen, lcreceive 
AND lcopen.id=lcreceive.id 
GROUP BY lcopen.bank;






Terence Ng


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

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

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: Copying MySql database to others

2003-01-08 Thread Frank Peavy


I need to copy a MySql Production database to QA. What is the best method of
doing this? Do I need to write SQL queries or is there another quicker method?
 From the command line?
From, within phpMyAdmin?




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

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: Version 4 safe to use?

2003-01-08 Thread Jeremy Zawodny
On Wed, Jan 08, 2003 at 09:00:51AM -0700, David Rock wrote:

 Are many people using MySQL version 4 yet?  I'm interested in it
 because I want to use it's SSL capabilities but would like to hear
 that people are not having trouble with it first.

I've had very good luck with MySQL 4 in several high-profile
environments.  We began using it in live envrionments back in August
and have contintued to spread MySQL 4 since then.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 24 days, processed 830,915,772 queries (392/sec. avg)

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

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




Re: sql delete question - solved

2003-01-08 Thread Veysel Harun Sahin
Hello Paul,

I have tried the code you have written, before posting to list and it did not work. 
When I have seen the sentence This requires that you have MySQL 4.x at your mail I 
realized the problem. I am using mySQL 3.23.49. :(

Thanks for your help.

Paul DuBois [EMAIL PROTECTED] wrote:

At 7:27 -0500 1/8/03, Veysel Harun Sahin wrote:
Hello,

I have two tables whose structures are below.

- Table1 -
table1id int not null auto_increment
data varchar(30)

- Table2 -
table2id int not null auto_increment
table1id int not null
data varchar(30)


These two tables are connected to each other with the table1id 
column. I need to delete rows in table1 which have no corresponding 
table1id values in table2 and also i need to delete rows in table2 
which have no corresponding table1id values in table1. Any 
comments?

Thanks.

sql,query


This sounds like a delete parentless children and childless parents
question.  Turning to my handy copy of MySQL Cookbook which I just happen
to have nearby :-) I see the following under Identifying and Removing
Unattached Records (pp668-669), where the _head and _item are the parent
and child tables that correspond to your table1 and table2:

---
To  use  a  multiple-table  DELETE  statement  for  removing
unmatched records, just take the SELECT statement  that  you
use  to identify those records and replace the stuff leading
up to the FROM keyword with DELETE tbl_name.   For  example,
the  SELECT  that  identifies  childless  parents looks like
this:

      SELECT swdist_head.dist_id AS 'unmatched swdist_head IDs'
      FROM swdist_head LEFT JOIN swdist_item
          ON swdist_head.dist_id = swdist_item.dist_id
      WHERE swdist_item.dist_id IS NULL;

The corresponding DELETE looks like this:

      DELETE swdist_head
      FROM swdist_head LEFT JOIN swdist_item
          ON swdist_head.dist_id = swdist_item.dist_id
      WHERE swdist_item.dist_id IS NULL;

Conversely, the query to identify parentless children is  as
follows:

      SELECT swdist_item.dist_id AS 'unmatched swdist_item IDs'
      FROM swdist_item LEFT JOIN swdist_head
          ON swdist_item.dist_id = swdist_head.dist_id
      WHERE swdist_head.dist_id IS NULL;

And the corresponding DELETE statement removes them:

      DELETE swdist_item
      FROM swdist_item LEFT JOIN swdist_head
          ON swdist_item.dist_id = swdist_head.dist_id
      WHERE swdist_head.dist_id IS NULL;
---

This requires that you have MySQL 4.x, because 3.x doesn't support
multiple-table DELETE.  For 3.x, you must write a program that identifies
the unattached records and generates the appropriate statements to delete
them.  (The code for this is in the Cookbook, too; you can get it at
the book's web site.)


__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

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

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




RE: subselect workaround help?

2003-01-08 Thread Alexander M. Turek
-Original Message-
From: Lefevre, Steven [mailto:[EMAIL PROTECTED]]

 Hey folks-

 'nother question.
 I'm not an SQL expert, and I think I need a subselect, which
 means I need a workaround on MySQL 3.23 or whatever version it is.

 Here's the tables I have, with the relevant columns:

 Students
  - Name
  - StudentID (PK)
  - ClassID

 Classes
  - ClassID (PK)
  - Name

  Each Student belongs to one class.


 So, I have the StudentID. I want to get the Classes.Name...
 Final result should look like

 Student | Class
 --
 Steve Lefevre | Math101
 Stacy Adams | Intro to SQL


Hi Steve, try

SELECT `Students`.`Name` AS Student, `Classes`.`Name` AS Class FROM
`Students` LEFT JOIN `Classes` USING `ClassID`;

Regards,

Alexander




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

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: MySQL fulltext. Question about the stopword list

2003-01-08 Thread Erlend Hopso Stromsvik
Resending this, since the first one didn't seem to get posted on the MySQL
list.

 -Original Message-
 From: Erlend HopsÛ StrÛmsvik 
 Sent: 7. januar 2003 10:18
 To: [EMAIL PROTECTED]
 Subject: RE: MySQL fulltext. Question about the stopword list
 
 
  What I can easily do without breaking 4.0.x gamma status, 
 is to add
  command line switch --disable-fulltext-stopwords. It can help as a
  temporary solution, untill a proper fix - per-index 
 options, that is -
  will be implemented.
 
 That would be helpful for me, but what about Thomas Spahni's 
 suggestion?
 
  
  Sergei,
  
  but then, could you also add a command line switch
  
  --read-stopwords-from-file=filename ???
  
  Please. That could solve half of my problem.
  
  Best regards,
  Thomas Spahni
 
 I was mere wondering why the stopword list was 'hardcoded' 
 since it seems to me that it's one of those things a user 
 should be able to change/modify without to much hassle and on 
 a more frequent basis than whenever one recompile MySQL. Also 
 a stopword list is very dependent on what kind of text/data 
 one wants to search in so a large system with multiple users 
 and databases might want different stopword lists...
 
  
   I remember working on a project when I was school where we 
  wrote this
   program using autogenerated stopword lists and N-gram 
  matching for the text
   and search string. By this the stopword list was not hard coded..
  
  What is N-gram matching ?
  
 
 I post this to the MySQL board, since maybe someone else has 
 something to add/say about it too :)
 Don't know where I got these texts from, but it should give 
 you a general idea about n-grams. 
 
 
 n-grams are used to describe objects as vectors. This makes 
 it possible to apply geometric, statistical and other 
 mathematical techniques, which are well defined for vectors, 
 but not for objects in general. For example, one of the most 
 common uses is to define a similarity measure between textual 
 documents based on the application of a mathematical function 
 to the vector representations of the documents
 
 N-Grams
 String-similarity approaches to conflation involve the system 
 calculating a measure of similarity between an input query 
 term and each of the distinct terms in the database. Those 
 database terms that have a high similarity to a query term 
 are then displayed to the user for possible inclusion in the query. 
 N-gram matching techniques are one of the most common of 
 these approaches (Freund  Willett, 1982). An n-gram is a set 
 of n consecutive characters extracted from a word. The main 
 idea behind this approach is that, similar words will have a 
 high proportion of n-grams in common. Typical values for n 
 are 2 or 3, these corresponding to the use of digrams or 
 trigrams, respectively.
 
 So if you have the word 'computer' you'll get the following digrams:
 *c, co, om, mp, pu, ut, te, er, r*
 
 and the trigrams:
 **c,*co,com,omp,mpu,put,ute,ter,er*,r**
 
 where '*' denotes a padding space. There are n+1 such digrams 
 and n+2 such trigrams in a word containing n characters.
 
 
 Found this link after some 'googling about' 
 http://web.umr.edu/~tauritzd/ngram/
 This is probably the original text for the first text I had:
 http://web.umr.edu/~tauritzd/ngram/tutorial.html
 
 
  Regards,
  Sergei
  
  -- 
  MySQL Development Team
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
  /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
 ___/
  
 

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

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 fulltext. Question about the stopword list

2003-01-08 Thread Erlend Hopso Stromsvik
 What I can easily do without breaking 4.0.x gamma status, is to add
 command line switch --disable-fulltext-stopwords. It can help as a
 temporary solution, untill a proper fix - per-index options, that is -
 will be implemented.

That would be helpful for me, but what about Thomas Spahni's suggestion?

 
 Sergei,
 
 but then, could you also add a command line switch
 
 --read-stopwords-from-file=filename ???
 
 Please. That could solve half of my problem.
 
 Best regards,
 Thomas Spahni

I was mere wondering why the stopword list was 'hardcoded' since it seems to
me that it's one of those things a user should be able to change/modify
without to much hassle and on a more frequent basis than whenever one
recompile MySQL. Also a stopword list is very dependent on what kind of
text/data one wants to search in so a large system with multiple users and
databases might want different stopword lists...

 
  I remember working on a project when I was school where we 
 wrote this
  program using autogenerated stopword lists and N-gram 
 matching for the text
  and search string. By this the stopword list was not hard coded..
 
 What is N-gram matching ?
 

I post this to the MySQL board, since maybe someone else has something to
add/say about it too :)
Don't know where I got these texts from, but it should give you a general
idea about n-grams. 


n-grams are used to describe objects as vectors. This makes it possible to
apply geometric, statistical and other mathematical techniques, which are
well defined for vectors, but not for objects in general. For example, one
of the most common uses is to define a similarity measure between textual
documents based on the application of a mathematical function to the vector
representations of the documents

N-Grams
String-similarity approaches to conflation involve the system calculating a
measure of similarity between an input query term and each of the distinct
terms in the database. Those database terms that have a high similarity to a
query term are then displayed to the user for possible inclusion in the
query. 
N-gram matching techniques are one of the most common of these approaches
(Freund  Willett, 1982). An n-gram is a set of n consecutive characters
extracted from a word. The main idea behind this approach is that, similar
words will have a high proportion of n-grams in common. Typical values for n
are 2 or 3, these corresponding to the use of digrams or trigrams,
respectively.

So if you have the word 'computer' you'll get the following digrams:
*c, co, om, mp, pu, ut, te, er, r*

and the trigrams:
**c,*co,com,omp,mpu,put,ute,ter,er*,r**

where '*' denotes a padding space. There are n+1 such digrams and n+2 such
trigrams in a word containing n characters.


Found this link after some 'googling about' 
http://web.umr.edu/~tauritzd/ngram/
This is probably the original text for the first text I had:
http://web.umr.edu/~tauritzd/ngram/tutorial.html


 Regards,
 Sergei
 
 -- 
 MySQL Development Team
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
___/
 

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

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: subselect workaround help?

2003-01-08 Thread Joe Stump
I think the problem is in your table structure. If you did this:

Students:
- Name
- StudentID

Classes:
- ClassID
- Name

StudentsClasses:
- StudentID (PK)
- ClassID (PK)

(You make them a combined key by doing PRIMARY KEY (StudentID,ClassID) in
your table def.)

When you add a student to a class you add them to StudentClasses table. In
your previous layout (which was not normalized completely) you are repeating
Name/StudentID each time a student is put into a class (redundant data is a
no-no).

Now to get all classes you just:

SELECT C.* FROM Classes AS C, StudentsClasses AS R WHERE
R.StudentID='364326' AND R.ClassID=C.ClassID

--Joe

--
Joe Stump [EMAIL PROTECTED]
http://www.joestump.net


-Original Message-
From: Lefevre, Steven [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 8:22 AM
To: [EMAIL PROTECTED]
Subject: subselect workaround help?


Hey folks-

'nother question.
I'm not an SQL expert, and I think I need a subselect, which means I need a
workaround on MySQL 3.23 or whatever version it is.

Here's the tables I have, with the relevant columns:

Students
 - Name
 - StudentID (PK)
 - ClassID

Classes
 - ClassID (PK)
 - Name

 Each Student belongs to one class.


So, I have the StudentID. I want to get the Classes.Name...
Final result should look like

Student | Class
--
Steve Lefevre | Math101
Stacy Adams | Intro to SQL

Something like

SELECT Student.Name, Classes.Name FROM Students, Classes WHERE
Students.StudentID =  . $ID .  AND Classes.Name IN ( SELECT Classes.Name
FROM Classes WHERE ClassID = Students.ClassID )

I know that probably won't work as a subselect query, but that's my starting
point.

Any help? Thanks!

Steve


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

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: Load local data infile problem

2003-01-08 Thread Stefan Hinz, iConnect \(Berlin\)
Charles,

 I posted the same problem a couple of days ago. LOCAL will not work
 because of a security improvement the MySQL folks applied.

 LOAD DATA INFILE C:\\mysql\\fred.txt INTO TABLE data_table;
 Hope this helps, but only a workaround...

Without LOCAL, quite alot of things will not work. Imagine an ISP giving
every customer write privileges for the mysql/bin directory ... ;-/

Unfortunately, Monty did'nt mention if this is fixed in 4.0.8 or going
to be fixed in 4.0.9 or 4.1. Personally, I regard this security
improvement rather a bug than a feature.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Charles Mabbott [EMAIL PROTECTED]
To: 'Stefan Hinz, iConnect (Berlin)' [EMAIL PROTECTED];
'Prathmesh J. Mahidharia' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 3:04 AM
Subject: RE: Load local data infile problem


What I did was setup my file in mysql directory (i.e. fred.txt)

LOAD DATA INFILE C:\\mysql\\fred.txt INTO TABLE data_table;

Hope this helps, but only a workaround...

Chuck
http://68.43.100.7:81/aa8vs

==
Patriotism is the willingness to kill and
be killed for trivial reasons.
   - Bertran Russell

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 3:59 PM
To: Prathmesh J. Mahidharia; [EMAIL PROTECTED]
Subject: Re: Load local data infile problem

Prathmesh,

 I have just installed mysql and am facing problems with the
 Load data local infile problem. I went through the manual and did
 all that was said like including the command
 --enable-local-infile and --local-infile[=1], but it does not
 seem to work.

I posted the same problem a couple of days ago. LOCAL will not work
because of a security improvement the MySQL folks applied.

As far as I could figure out, the only way to solve this issue is to
grab a source distribution and compile MySQL with --enable-local-infile.
All the command line options the manual describes do not work at all!

I wonder if - finally and hopefully - someone from MySQL will reply to
the LOCAL problem mails, and tell us what to do (maybe there's a
workaround), or when the problem will be solved.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Prathmesh J. Mahidharia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 5:22 AM
Subject: Load local data infile problem


 hello there,
 I have just installed mysql and am facing problems with the
 Load data local infile problem. I went through the manual and did
 all that was said like including the command
 --enable-local-infile and --local-infile[=1], but it does not
 seem to work. I have the version 4.0.6-gamma-max-nt. If u could
 plz, help me out with that, that would be very nice of u! I m
 developing a project at the moment and have got to make large
 entries into mysql tables, but this command is not working
 properly and i m stuck! Could u plz help me out with that..?
 Thank u in advance.

 Regards:
 Prathmesh Mahidharia



 PRATHMESH J. MAHIDHARIA
 B.E. (Electrical)
 M.Sc.Information Technology (Murdoch Uni, Australia)
 Phone no: (+61) 0421167375


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

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



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

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



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

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




Re: converting text to hypertext

2003-01-08 Thread Paul DuBois
At 8:34 -0800 1/8/03, Rick Tucker wrote:

I just imported a .csv file and one of the columns of data was websites
addresses.  Those addresses aren't being recognized as links when I output
an html table from my queries.  I'm scratching me head on how to make the
conversion.  I figured there would by a hypertext datatype of some sort, but
I can't find any information regarding this issue. If someone could point me
in the right direction, I would appreciate it.


You must perform the conversion yourself, displaying the URL both
as the href atttribute and body text of an a tag.  Don't forget
to URL-encode it for use in the attribute, and HTML-encode it for
use in the body text.

Examples in Perl, PHP, Python, and JSP are available at:

http://www.kitebird.com/mysql-cookbook/

Get the recipes distribution, check the apache/links and tomcat/mcb
directories for the examples.

Mmm, that's two book plugs in a day, I'd better cool off for a while. :-)



Thanks,

rick



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

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 4.0.8- crash on TCP connection

2003-01-08 Thread Andrew Sitnikov
Hello mysql,

  I try use 4.0.8 (max  standard)in our production box,
  and it was crash every TCP connection, For 4.0.7 (standard) i has over 20 days 
uptime.

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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

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




Re: converting text to hypertext

2003-01-08 Thread walt
Rick Tucker wrote:

 I just imported a .csv file and one of the columns of data was websites
 addresses.  Those addresses aren't being recognized as links when I output
 an html table from my queries.  I'm scratching me head on how to make the
 conversion.  I figured there would by a hypertext datatype of some sort, but
 I can't find any information regarding this issue. If someone could point me
 in the right direction, I would appreciate it.

 Thanks,

 rick

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

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

Rick,
Are the addresses appearing in the correct format (http://www.somewhere.com) when
you pull them from the db?
If so,  you'll still have to build the  a href  part in the html so it is
infact a hyperlink.

walt


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

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




Re: converting text to hypertext

2003-01-08 Thread Rodney Broom
From: Rick Tucker [EMAIL PROTECTED]


 Those addresses aren't being recognized as links when I output
 an html table from my queries.
[ snip ]
 I figured there would by a hypertext datatype of some sort...


Do you mean like this:

  CREATE TABLE stuff (
link hypertext
  );

  INSERT INTO stuff (link) VALUES ('http://www.rbroom.com/');

  SELECT * FROM stuff;
  a href=http://www.rbroom.com/;http://www.rbroom.com//a


If so, then the answer is that there isn't such a data type. If you want a link, then 
you'll have to make it yourself. I suggest making your column a varchar(). Then, you 
~might~ get the data with a query like this:

  SELECT CONCAT(CONCAT('a href=', link, ''), link, '/a') FROM stuff;



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

sql



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

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




Re: subselect workaround help?

2003-01-08 Thread Rodney Broom
From: Lefevre, Steven [EMAIL PROTECTED]

 ...I think I need a subselect...

It's rare that a sub-select is actually ~needed~, but it does happen. You can almost 
always get around it with a JOIN of some sort.

 

 Final result should look like
 Student | Class
 --
 Steve Lefevre | Math101
 Stacy Adams | Intro to SQL

How about:

  SELECT Students.Name as Student, Classes.Name as Class
FROM Students, Classes
   WHERE Students.ClassID = Classes.ClassID



On a side note: Some of your schema naming will eventually cause you trouble, or at 
least win you some grief from other programmers.

- A common idiom is to name a table for what ONE record of data will
  represent. That means that you'd name the table that holds student
  information as 'student' instead of 'Students' since one record only
  contains one student.


- It's a bit redundant to have to say 'Students.StudentID'. It might make
  more sence to readers to see 'student.id' and 'student.class_id'.


- You'll notice that I've been using all lower case names. MySQL will
  allow loose case of column names, but not table names. So, you can say:
SELECT name FROM Students;
  But not:
SELECT Name FROM students;

  If you always use lower case, then you and your co-workers will always know
  how to type in names without having to get out a copy of the schema first.


OK, I'll stop preaching now. Let us know if you need more help with this.


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

sql



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

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




Re: Disproportionately slow, but simple, query

2003-01-08 Thread Abhi Sahay
can you send the description of your table. There are lots of reasion for
slowing down your query but I dont thint Date_formate () is a cause for
slowing down the query.You have very less data only 35,000..
You can try to optimize by using

1. Create INDEX on case_id
2. optimize  and check table [tracking_id]
3. flush tables
4.flush table threads
5. User PROPER DATA TYPES in your table. like if you can use tinyint or
smallint as compare to INT then use that one etc.
Just try that one and send the table description and which version r u using

Abhi-

- Original Message -
From: Jim [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 10:32 AM
Subject: Disproportionately slow, but simple, query


 I've got what would be best described as a medium sized table, which
 normally queries quickly, except for this one...

 Table data_static has around 35,000 records.
 This trivial query:

 SELECT tracking_id,
complainant_email,
DATE_FORMAT(import_date,'%Y-%c-%e') AS date,
subject
 FROM data_static
 WHERE case_id = 0;

 ...gets explained thus:
   table = data_static
   type = ref
   possible_keys = _case
   key = _case
   key_len = 8
   ref = const
   rows = 7126
   Extra = where used


 It takes just right at 60 seconds to generate 6409 result rows.  Removing
 the DATE_FORMAT calculation doesn't have any impact.

 Why so slow?

 One thing I thought of, but isn't trivial to change, is that one of the
 fields is a text type that often holds near its size limit, so
individual
 records can be fairly large.

 Is this just a matter of getting the data off the disk and to the client,
or
 something else?

 Jim

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

 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: Disproportionately slow, but simple, query

2003-01-08 Thread Abhi Sahay
can you send the description of your table. There are lots of reasion for
slowing down your query but I dont thint Date_formate () is a cause for
slowing down the query.You have very less data only 35,000..
You can try to optimize by using

1. Create INDEX on case_id
2. optimize  and check table [tracking_id]
3. flush tables
4.flush table threads
5. User PROPER DATA TYPES in your table. like if you can use tinyint or
smallint as compare to INT then use that one etc.
Just try that one and send the table description and which version r u using

Abhi-

- Original Message -
From: Abhi Sahay [EMAIL PROTECTED]
To: Jim [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 11:56 AM
Subject: Re: Disproportionately slow, but simple, query


 can you send the description of your table. There are lots of reasion for
 slowing down your query but I dont thint Date_formate () is a cause for
 slowing down the query.You have very less data only 35,000..
 You can try to optimize by using

 1. Create INDEX on case_id
 2. optimize  and check table [tracking_id]
 3. flush tables
 4.flush table threads
 5. User PROPER DATA TYPES in your table. like if you can use tinyint or
 smallint as compare to INT then use that one etc.
 Just try that one and send the table description and which version r u
using

 Abhi-

 - Original Message -
 From: Jim [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 08, 2003 10:32 AM
 Subject: Disproportionately slow, but simple, query


  I've got what would be best described as a medium sized table, which
  normally queries quickly, except for this one...
 
  Table data_static has around 35,000 records.
  This trivial query:
 
  SELECT tracking_id,
 complainant_email,
 DATE_FORMAT(import_date,'%Y-%c-%e') AS date,
 subject
  FROM data_static
  WHERE case_id = 0;
 
  ...gets explained thus:
table = data_static
type = ref
possible_keys = _case
key = _case
key_len = 8
ref = const
rows = 7126
Extra = where used
 
 
  It takes just right at 60 seconds to generate 6409 result rows.
Removing
  the DATE_FORMAT calculation doesn't have any impact.
 
  Why so slow?
 
  One thing I thought of, but isn't trivial to change, is that one of the
  fields is a text type that often holds near its size limit, so
 individual
  records can be fairly large.
 
  Is this just a matter of getting the data off the disk and to the
client,
 or
  something else?
 
  Jim
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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: Load local data infile problem

2003-01-08 Thread Bhavin Vyas
Hi Prathmesh,
What is the behaviour that you see when you try to LOAD DATA. Any messages?

Regards,
Bhavin.
- Original Message -
From: Prathmesh J. Mahidharia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 11:22 PM
Subject: Load local data infile problem


 hello there,
 I have just installed mysql and am facing problems with the
 Load data local infile problem. I went through the manual and did
 all that was said like including the command
 --enable-local-infile and --local-infile[=1], but it does not
 seem to work. I have the version 4.0.6-gamma-max-nt. If u could
 plz, help me out with that, that would be very nice of u! I m
 developing a project at the moment and have got to make large
 entries into mysql tables, but this command is not working
 properly and i m stuck! Could u plz help me out with that..?
 Thank u in advance.

 Regards:
 Prathmesh Mahidharia



 PRATHMESH J. MAHIDHARIA
 B.E. (Electrical)
 M.Sc.Information Technology (Murdoch Uni, Australia)
 Phone no: (+61) 0421167375


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

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

2003-01-08 Thread Adolfo Bello
 I have two tables whose structures are below.
 
 - Table1 - 
 table1id int not null auto_increment
 data varchar(30)
 
 - Table2 -
 table2id int not null auto_increment
 table1id int not null
 data varchar(30)
 
 
 These two tables are connected to each other with the 
 table1id column. I need to delete rows in table1 which have 
 no corresponding table1id values in table2 and also i need 
 to delete rows in table2 which have no corresponding 
 table1id values in table1. Any comments?

Can you try a multi table DELETE? I haven't done it but I would be a shot at
something like
(adapted from MySQL Manual)
DELETE t1 FROM t1,t2 WHERE t1.id=t2.id AND t2.id IS NULL

Adolfo


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

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




Re: converting text to hypertext

2003-01-08 Thread Zak Greant
On Wed, Jan 08, 2003 at 08:34:25AM -0800, Rick Tucker wrote:
 I just imported a .csv file and one of the columns of data was websites
 addresses.  Those addresses aren't being recognized as links when I output
 an html table from my queries.  I'm scratching me head on how to make the
 conversion.  I figured there would by a hypertext datatype of some sort, but
 I can't find any information regarding this issue. If someone could point me
 in the right direction, I would appreciate it.

  Good Day Rick!

  There is no hypertext/hyperlink data type and I do not know of any plans for 
  one.

  A simple bit of shell scripting like:

mysql -e SELECT something FROM somewhere -H |\
sed -e 's/http:\/\/[^ ]\+/a href=\/a/'

  should replace all of the valid http URLs in your HTML tables with anchors.

  Cheers!
-- 
 Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Using and Managing MySQL
  MySQL Training: London, January 13-17, 2003
  Visit http://mysql.com/training for more information

While we are postponing, life speeds by.--Lucius Annaeus Seneca

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

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




RE: converting text to hypertext

2003-01-08 Thread Rick Tucker
Larry,

This is the code I'm using.  I'm pretty new to PHP, so there may be a simple
solution within PHP of which I'm unaware.  I just thought it could be done
from the MySQL side of things.


$resultID = mysql_query(SELECT * FROM ports, $linkID);

print tabletrthPort #/th;
print thTransport/thth align=centerApplication/thth
align=centerRFC/Vendor's URL/MS KB article/th;

while ($row = mysql_fetch_row($resultID))

{
print tr;
foreach ($row as $field)
{
print td align=center$field/td;
}
print /tr;
}
print /table;
mysql_close ($linkID);



Thanks,

rick


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:13 AM
To: Rick Tucker
Subject: RE: converting text to hypertext


The question seems to me how are you outputting to html?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: converting text to hypertext

I just imported a .csv file and one of the columns of data was websites
addresses.  Those addresses aren't being recognized as links when I output
an html table from my queries.  I'm scratching me head on how to make the
conversion.  I figured there would by a hypertext datatype of some sort, but
I can't find any information regarding this issue. If someone could point me
in the right direction, I would appreciate it.

Thanks,

rick


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

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




Case Problems...

2003-01-08 Thread Nick Stuart
I seem to have found a bug with 4.0.7. I just want to make sure the
issue hasn't been covered before I submit a report.
I have 4.0.7 installed on windows 2000 server with all the service packs
and stuff. When I connect to the database through a Linux client
(haven't tried it on the box itself) and issue:
CREATE DATABASE LookAtMe;
the database is created but as:
lookatme
with no caps.
Anybody run into this before? I know Winblow$ isn't case sensitive and
all but it should still create the database/folder as I type it.
-- 

-Nick Stuart

USM Computer Science Major
Visit us at http://csforum.newtsplace.com
(run with LAMP)

Filter Fodder: mysql, sql, queries, why isn't CREATE or DATABASE in the
god damn list! =D

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

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 - select syntax if else

2003-01-08 Thread Keith C. Ivey
On 8 Jan 2003, at 15:27, Svens Klave wrote:

 | image | check |
 | 6782  | 0 |
 | 2732  | 1 |
 | 6734  | 1 |
 
 so I want to make query
 select * from foo1 where [so is it possible to make some if check=1 then 
 image is image but if check=0 then into image goes other content for 
 example noimage]

If I'm understaning you correctly, you want something like

   SELECT IF(check, image, 'noimage') AS image FROM foo1;

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

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

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




RE: converting text to hypertext

2003-01-08 Thread Larry Brown
Try...

while ($row = mysql_fetch_row($resultID))

{
print tr;
foreach ($row as $field)
{
print td align=centera href=$field$field/a/td;
}
print /tr;
}
print /table;
mysql_close ($linkID);

I don't use print so I'm not sure about that, I use echo.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:58 PM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: RE: converting text to hypertext

Larry,

This is the code I'm using.  I'm pretty new to PHP, so there may be a simple
solution within PHP of which I'm unaware.  I just thought it could be done
from the MySQL side of things.


$resultID = mysql_query(SELECT * FROM ports, $linkID);

print tabletrthPort #/th;
print thTransport/thth align=centerApplication/thth
align=centerRFC/Vendor's URL/MS KB article/th;

while ($row = mysql_fetch_row($resultID))

{
print tr;
foreach ($row as $field)
{
print td align=center$field/td;
}
print /tr;
}
print /table;
mysql_close ($linkID);



Thanks,

rick


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:13 AM
To: Rick Tucker
Subject: RE: converting text to hypertext


The question seems to me how are you outputting to html?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: converting text to hypertext

I just imported a .csv file and one of the columns of data was websites
addresses.  Those addresses aren't being recognized as links when I output
an html table from my queries.  I'm scratching me head on how to make the
conversion.  I figured there would by a hypertext datatype of some sort, but
I can't find any information regarding this issue. If someone could point me
in the right direction, I would appreciate it.

Thanks,

rick


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

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




Alter table error

2003-01-08 Thread Nick Stuart
Got another problem with 4.0.7 when trying to alter the table.
Trying to run:
ALTER TABLE `call_information` CHANGE `close_date` `close_date`
TIMESTAMP DEFAULT '' NOT NULL 
and it returns a:
ERROR 7: Error on rename of '.\helpdesk\call_information.MYI' to
'.\helpdesk\#sql2-b90-81.MYI' (Errcode: 13)

Any ideas on why I would get this?? I think it has something to do with
my case problem that I posted before because if you look it says
helpdesk instead of HelpDesk.

-- 

-Nick Stuart

USM Computer Science Major
Visit us at http://csforum.newtsplace.com
(run with LAMP)

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

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: subselect workaround help?

2003-01-08 Thread Scott Pippin
Student | Class
--
Steve Lefevre | Math101
Stacy Adams | Intro to SQL

Something like

SELECT Student.Name, Classes.Name FROM Students, Classes WHERE
Students.StudentID =  . $ID .  AND Classes.Name IN ( SELECT
Classes.Name
FROM Classes WHERE ClassID = Students.ClassID )

Try 
SELECT Student.Name, Classes.Name FROM Students, Classes WHERE
Students.ClassID = Classes.ClassID.

If you only wnat it for one syudent do:
SELECT Student.Name, Classes.Name FROM Students, Classes WHERE
Students.ClassID = Classes.ClassID AND Students.StudentID = 'some
ID'

Hope this helps.


Scott Pippin
[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: Resetting the auto_increment to start from 1

2003-01-08 Thread Paul DuBois
At 9:33 +0200 1/8/03, Octavian Rasnita wrote:

Hi all,

I've read the following in a MySQL book:

  A special case of record deletion occurs when you clear out a table
entirely using a DELETE with no WHERE clause:
 DELETE FROM tbl_name;
  In this case, the sequence counter may be reset to 1, even for table types
for which values normally are not reused (MyISAM and InnoDB). For those
types, if you wish to delete all the records while maintaining the current
sequence value, tell MySQL to perform a record-at-a-time delete by including
a WHERE clause that specifies some trivially true condition:
 DELETE FROM tbl_name WHERE 1  0;

---

Well, I've tried that sql statement, but the auto_increment point of start
was not reset to 1.


Note that the text in question says *may* be reset to 1.

To reset it for sure, use the statement at the top of page 558. :-)


I use MySQL 4.05 under Windows 2000.

Thanks.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [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: converting text to hypertext

2003-01-08 Thread R. Hannes Niedner
On 1/8/03 8:34 AM, Rick Tucker [EMAIL PROTECTED] wrote:

 I just imported a .csv file and one of the columns of data was websites
 addresses.  Those addresses aren't being recognized as links when I output
 an html table from my queries.  I'm scratching me head on how to make the
 conversion.  I figured there would by a hypertext datatype of some sort, but
 I can't find any information regarding this issue. If someone could point me
 in the right direction, I would appreciate it.
 
 Thanks,
 
 rick

Sorry I was to fast: (mailto: was missing, but you probably figured that by
yourself).

SELECT CONCAT('a href=\mailto:' ,email, '\'', email, '/a') FROM
mytable;

And 'email' is the name of the column that stores your email address.
http://www.mysql.com/doc/en/String_functions.html

Best/h


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

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: Resetting the auto_increment to start from 1

2003-01-08 Thread Stefan Hinz, iConnect \(Berlin\)
Octavian,

 I've read the following in a MySQL book:

It's a rather old book, which deals with MySQL 3.23, and not with MySQL
4.x.

  DELETE FROM tbl_name WHERE 1  0;

In MySQL 3.23, this was a workaround to force the server to delete a
table row by row. By default, 3.23 would on DELETE FROM tbl just do a
DROP TABLE + CREATE TABLE, because this was faster in most cases than
deleting the rows. This behaviour wasn't ANSI SQL compliant, though.

MySQL 4.x does a DELETE FROM tbl with or without WHERE clause ANSI
compliant. This means, it will always delete the rows, not DROP/CREATE
the table. To do the latter, use

 TRUNCATE TABLE tbl

This will in fact do a DROP/CREATE, thus resetting the AUTO_INCREMENT
counter etc.

 Well, I've tried that sql statement, but the auto_increment point of
start
 was not reset to 1.

Actually, the counter is reset to 0, not 1. The first inserted value
then is auto-incremented, and thus becomes 1.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Octavian Rasnita [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 8:33 AM
Subject: Resetting the auto_increment to start from 1


 Hi all,

 I've read the following in a MySQL book:

   A special case of record deletion occurs when you clear out a table
 entirely using a DELETE with no WHERE clause:
  DELETE FROM tbl_name;
   In this case, the sequence counter may be reset to 1, even for table
types
 for which values normally are not reused (MyISAM and InnoDB). For
those
 types, if you wish to delete all the records while maintaining the
current
 sequence value, tell MySQL to perform a record-at-a-time delete by
including
 a WHERE clause that specifies some trivially true condition:
  DELETE FROM tbl_name WHERE 1  0;

 ---

 Well, I've tried that sql statement, but the auto_increment point of
start
 was not reset to 1.
 I use MySQL 4.05 under Windows 2000.

 Thanks.

 Teddy,
 Teddy's Center: http://teddy.fcc.ro/
 Email: [EMAIL PROTECTED]



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

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



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

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




Found it (was Re: Disproportionately slow, but simple, query)

2003-01-08 Thread Jim
FYI:
Setting up a lab environment for this database answered my question.
I moved the big field to a dedicated table, and queries on data_static got
much faster.  Instead of 60 seconds, the query is done in less than 1.

Thanks for all the ideas people sent me privately.

Cheers,
   Jim

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

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




RE: converting text to hypertext

2003-01-08 Thread Bryant Hester
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rick,

How are you pulling the data? PHP? Perl? ASP? HTML doesn't
automatically insert hyperlinks where it finds
http://www.somedomain.com. It has to be told that it is a link by the
A HREF=http://www.somedomain.com;SomeDomain/A 
tag.

If you are pulling via php you could do something along the lines of:
?
While ($row = mysql_fetch_row($result)) {
echo tda href='$row[0]'$row[0]/a\n;
}
?

There is a similar way in ASP  Perl, I'm sure.

HTH,
Bryant H. Hester 

- -Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 08, 2003 10:34 AM
To: [EMAIL PROTECTED]
Subject: converting text to hypertext


I just imported a .csv file and one of the columns of data was
websites addresses.  Those addresses aren't being recognized as links
when I output an html table from my queries.  I'm scratching me head
on how to make the conversion.  I figured there would by a hypertext
datatype of some sort, but I can't find any information regarding
this issue. If someone could point me in the right direction, I would
appreciate it.

Thanks,

rick


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

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


-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBPhyBx0lWu7/HFp4nEQKrSwCfQY25Z+rwm4VOYDnwcyrM/wxwnl4AoNgj
DGgAFbw1Y9Fp7atdT7LNTIl+
=3+NL
-END PGP SIGNATURE-


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

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




Re: MySQL 4.0.7-gamma: Bugs affecting the privilege system

2003-01-08 Thread Stefan Hinz, iConnect \(Berlin\)
Alexander,

 Have you tried to reproduce them?

Bug #1: GRANT USAGE doesn't seem to create a user:

mysql GRANT USAGE ON *.* TO 'foo'@'foohost';
Query OK, 0 rows affected (0.26 sec)

mysql SHOW GRANTS FOR 'foo'@'foohost';
Empty set (0.03 sec)

mysql SELECT Host, User, Password FROM mysql.user WHERE User = 'foo';
+-+--+--+
| Host| User | Password |
+-+--+--+
| foohost | foo  |  |
+-+--+--+
1 row in set (0.04 sec)

Bug #2: SHOW GRANTS shows wrong GRANT statement:

mysql GRANT USAGE ON `footable`.* TO 'foo'@'foohost' IDENTIFIED BY
'foobar'
- WITH GRANT OPTION;
Query OK, 0 rows affected (0.03 sec)

mysql SHOW GRANTS FOR 'foo'@'foohost';
+---

| Grants for foo@foohost
+---

| GRANT USAGE ON *.* TO 'foo'@'foohost' IDENTIFIED BY PASSWORD
'4655c05b05f1
| GRANT  ON `footable`.* TO 'foo'@'foohost' WITH GRANT OPTION
+---

2 rows in set (0.00 sec)

Yes, I can confirm both bugs you encountered. My settings:

Server version: 4.0.7-gamma-max-nt-log
OS: Win2K SP2

Maybe worth mentioning, a database 'footable' doesn't exist on my
machine. Double-checking this, I found out it doesn't matter if a
database exists or not. Bug #2 happens with database 'test', too.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Alexander M. Turek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 4:39 PM
Subject: RE: MySQL 4.0.7-gamma: Bugs affecting the privilege system


 Hi Stefan,

 -Original Message-
 From: Stefan Hinz, iConnect (Berlin)
 
  Alexander,
 
   - After having set up both machines completely, I installed
   the Win32 binary distribution of MySQL 4.0.7-gamma. Although
   I did not upgrade from an earlier version, the privileges
   tables still have the old structure without the new columns
   introduced with MySQL 4.0.2-beta!
   Furthermore, the script menioned in the documentation
   (mysql_fix_privilege_tables) is obiously not included in the
   distribution. Because of this, there is no way to use the new
   privilege system but fixing the tables manually...
 
  I encountered the same issue, and Miguel Solórzano from MySQL
  AB replied that it was his fault, simply forgetting the new
  privilege tables in the Win32 dist.
 
  mysql_fix_privilege_tables is nowhere to find, but a list
  member who had pulled the 4.1 source found it in there and
  sent it to me. I extracted the SQL statements, ran the
  script, and now my 4.0.7 has all the new privileges. You'll
  find it at the bottom of this mail.
 
  Maybe this can fix the other bugs you reported, too.

 Hi Stefan,

 It does not.
 I fixed the priv tables manually, but the other two bugs are still
 occuring.
 Have you tried to reproduce them?
 Thanks,

 Alexander




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

 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




Creating MySQL databases and tables via Perl/DBI

2003-01-08 Thread Ken Hilliard
I'd like to be able to create a new database using Perl/DBI instead of using
the MySQL command line (and other) utilities. It looks like you can create a
new database with the driver handle but I can't seem to make it work.


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

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




Re: Copying MySql database to others

2003-01-08 Thread Stefan Hinz, iConnect \(Berlin\)
Frank,

 I need to copy a MySql Production database to QA. What is the best
method of
 doing this? Do I need to write SQL queries or is there another
quicker method?

There are alot of possibilities to accomplish this fast.

   From the command line?

shell mysqldump -uusername -ppassword your_database  export_file.sql

Or, if you want to copy / backup all your databases:

shell mysqldump -uusername -ppassword  export_file.sql --all-databases

 From, within phpMyAdmin?

First make sure you have a recent copy of phpMyAdmin. 2.3.3pl1 is the
most recent (http://phpmyadmin.net). You can only backup one database at
a time with this tool, not all of them like with --all-databases.

1. In the left frame, choose the database you want to backup / copy.
2. Click the EXPORT tab in the right frame.
3. Choose the tables in the database you want to backup.
4. Choose Structure and data.
5. Check Enclose table and field names with backquotes if your table
or column names might contain special characters (like ä, ö, ü).
6. Check Save as file.
7. Click Go.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Frank Peavy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 6:18 PM
Subject: Re: Copying MySql database to others



 I need to copy a MySql Production database to QA. What is the best
method of
 doing this? Do I need to write SQL queries or is there another
quicker method?
   From the command line?
 From, within phpMyAdmin?



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

 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




My new forum

2003-01-08 Thread Lennart Stevens


I created a new forum for all of you who do not like to dig throught tons of 
a-mail to find one that really matters.You can talk about Linux, mysql and 
pretty much whatever else is computer realted. Check it out here 
http://www.linuxforum.hopto.org

thanks




_
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup


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

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: running as NT service problem

2003-01-08 Thread John Arnold
I had this same problem.  Based on a similar thread, I went into the
properties for the service, changed it run under a user account with admin
privileges, applied the changes, then changed it back to run under the local
account and applied the changes.  No more problem.  Go figure.

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:55 AM
To: [EMAIL PROTECTED]
Subject: re: running as NT service problem


On Tuesday 07 January 2003 11:49, Leonid Prokopets wrote:

 I'm having a problem running MySQL as NT service on Win2000 plattform.  It
 works allright in manual mode (by 'mysqld' command), but refuses to run as
 service.  I installed the service by 'mysqld-max-nt --install' command.
 The system reported NT service successfully installed.  MySQL appeared
in
 service list.  But then I tried to start it it returned Error 1067.  The
 MySQL service can not be started.

 I should add that I dont have such problem on WinNT server plattform -
 everything runs smoothly.

Run the following from the DOS prompt:

mysqld-max-nt.exe --standalone --console

You can see errors in the output.



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





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

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


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

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




Proposition de collaboration

2003-01-08 Thread Jasmin Djipanov
Bonjour,

Consultant / Chef de Projet Indépendant à la recherche d'une mission, 
je vous propose ma collaboration.


Mes principales compétences techniques sont les suivantes :

Systèmes : Windows NT / 2000 / XP, Linux, Unix (Solaris)

Réseaux : Windows NT / 2000 / XP, TCP/IP, DNS, IIS, Netscape
/ iPlanet (Entreprise et Directory Server), routeurs (Cisco), NetWare

Sécurité : PKI, Firewall-1 (CheckPoint), PIX (Cisco)

Messageries : SMTP (sendmail, qmail), MS Exchange, GroupWise

Langages : C/C++, Pascal, VB/VBScript, Java/Javascript

SGBD : Oracle, SQL Server


Je suis disponible immédiatement.

Vous pouvez consulter mon CV, ainsi que toutes les autres informations
concernant cette proposition, à l'adresse suivante :

http://www.djipanov.com

Merci de votre attention.

Cordialement,


Jasmin Djipanov



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

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




RE: Re: Load local data infile problem

2003-01-08 Thread Jennifer Goodie
Imagine an ISP giving every customer write privileges for the mysql/bin
directory ... ;-/

Why would they have to do that? The file does not need to be in that
directory.  In order to use LOAD DATA INFILE without LOCAL the file just
needs to be somewhere on the server that mysqld is running on and be
readable by the mysqld user.  I load my files in from my home directory
because I don't think the mysql base dir and data dir are a great spot to
arbitrarily put files (and I don't have permission to them w/o su-ing).  If
you are connecting via localhost, have FILE permission on the DB, and can
create a readable file somewhere on that server, you would be fine.

We do not allow LOCAL on our servers as we are running replication and
3.23.54 won't support it.  I do not have write permission to any directories
except my home directory.  I have never run into any problems with LOAD DATA
that were not my own fault, usually it is error 13 because I typed the path
wrong or didn't chmod the file.

Obviously this does not negate the fact that LOCAL is sometimes needed, but
allowing all users to write to mysql/bin is not needed at all for any reason
that I can see.  Maybe I am missing something?

From the docs -- http://www.mysql.com/doc/en/LOAD_DATA.html
If the LOCAL keyword is specified, the file is read from the client host.
If LOCAL is not specified, the file must be located on the server. (LOCAL is
available in MySQL Version 3.22.6 or later.)


-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:40 AM
To: Charles Mabbott; 'Prathmesh J. Mahidharia'; [EMAIL PROTECTED]
Subject: Re: Load local data infile problem


Charles,

 I posted the same problem a couple of days ago. LOCAL will not work
 because of a security improvement the MySQL folks applied.

 LOAD DATA INFILE C:\\mysql\\fred.txt INTO TABLE data_table;
 Hope this helps, but only a workaround...

Without LOCAL, quite alot of things will not work. Imagine an ISP giving
every customer write privileges for the mysql/bin directory ... ;-/

Unfortunately, Monty did'nt mention if this is fixed in 4.0.8 or going
to be fixed in 4.0.9 or 4.1. Personally, I regard this security
improvement rather a bug than a feature.





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

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




Re: converting text to hypertext

2003-01-08 Thread Keith C. Ivey
On 8 Jan 2003, at 12:08, Paul DuBois wrote:

 You must perform the conversion yourself, displaying the URL both
 as the href atttribute and body text of an a tag.  Don't forget
 to URL-encode it for use in the attribute, and HTML-encode it for
 use in the body text.

I think Paul meant to say you should HTML-encode it for both the HREF 
value and the link text.  URL-encoding is for *parameters* that are 
going to become part of a URL.  You wouldn't URL-encode a whole URL 
(unless you were passing it as a parameter in another URL -- perhaps 
the URL of a redirection script).  A URL-encoded URL wouldn't work as 
a link, since the slashes would have been changed to '%2F', among 
other things.

The HTML-encoding is only necessary if the URL could contain an 
ampersand (or less-than, greater-than, or quote, but URLs aren't 
supposed to have those characters in them).

[Filter fodder: SQL]

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

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

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: Row value uniqueness?

2003-01-08 Thread Paul DuBois
At 10:27 -0800 1/8/03, Steven Nakhla wrote:

Aside from designating a row as a primary key, is
their any SQL syntax to force that entries within a
row are unique (such as a string value)?  Thanks!

Steve Nakhla


Well, other than using a PRIMARY KEY, you can use a
UNIQUE index, but aside from a couple of small things,
they're pretty much the same thing.

You can use them on string columns, if that's what
you're wondering.

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

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: Row value uniqueness?

2003-01-08 Thread Zak Greant
On Wed, Jan 08, 2003 at 10:27:30AM -0800, Steven Nakhla wrote:
 Aside from designating a row as a primary key, is
 their any SQL syntax to force that entries within a
 row are unique (such as a string value)?  Thanks!

  Hello Steve,

  You can create a UNIQUE key for a column that will ensure that all
  values entered into the column are unique.

  i.e. 
  CREATE TABLE foo (
...,
...,
UNIQUE  (...)
  )

  If you truly want to ensure that a row is unique, then you can create
  a UNIQUE key that contains all of the columns in a table.

  This will allow you to enter duplicate values within the columns, but
  the combination of values (in this case, an entire row) must be
  unique.

  i.e. 
  CREATE TABLE combolock (
tumbler_1   INT NOT NULL,
tumbler_2   INT NOT NULL,
tumbler_3   INT NOT NULL,
UNIQUE  tumblers (tumbler_1, tumbler_2, tumbler_3)
  )

  mysql INSERT INTO combolock VALUES (1,1,1);
  Query OK, 1 row affected (0.00 sec)

  mysql INSERT INTO combolock VALUES (1,1,1);
  ERROR 1062: Duplicate entry '1-1-1' for key 1

  mysql INSERT INTO combolock VALUES (1,1,2);
  Query OK, 1 row affected (0.00 sec)




  Cheers!
  
-- 
Zak Greant [EMAIL PROTECTED] | MySQL Advocate |  http://zak.fooassociates.com

Using and Managing MySQL
  MySQL Training: Stockholm, February 24-28, 2003
  Visit http://mysql.com/training for more information

While we are postponing, life speeds by.--Lucius Annaeus Seneca

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

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: Load local data infile problem

2003-01-08 Thread Charles Mabbott
What I did was setup my file in mysql directory (i.e. fred.txt) 

LOAD DATA INFILE C:\\mysql\\fred.txt INTO TABLE data_table;

Hope this helps, but only a workaround...

Chuck
http://68.43.100.7:81/aa8vs

==
Patriotism is the willingness to kill and
be killed for trivial reasons.
   - Bertran Russell 

-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 07, 2003 3:59 PM
To: Prathmesh J. Mahidharia; [EMAIL PROTECTED]
Subject: Re: Load local data infile problem

Prathmesh,

 I have just installed mysql and am facing problems with the
 Load data local infile problem. I went through the manual and did
 all that was said like including the command
 --enable-local-infile and --local-infile[=1], but it does not
 seem to work.

I posted the same problem a couple of days ago. LOCAL will not work
because of a security improvement the MySQL folks applied.

As far as I could figure out, the only way to solve this issue is to
grab a source distribution and compile MySQL with --enable-local-infile.
All the command line options the manual describes do not work at all!

I wonder if - finally and hopefully - someone from MySQL will reply to
the LOCAL problem mails, and tell us what to do (maybe there's a
workaround), or when the problem will be solved.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Prathmesh J. Mahidharia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 5:22 AM
Subject: Load local data infile problem


 hello there,
 I have just installed mysql and am facing problems with the
 Load data local infile problem. I went through the manual and did
 all that was said like including the command
 --enable-local-infile and --local-infile[=1], but it does not
 seem to work. I have the version 4.0.6-gamma-max-nt. If u could
 plz, help me out with that, that would be very nice of u! I m
 developing a project at the moment and have got to make large
 entries into mysql tables, but this command is not working
 properly and i m stuck! Could u plz help me out with that..?
 Thank u in advance.

 Regards:
 Prathmesh Mahidharia



 PRATHMESH J. MAHIDHARIA
 B.E. (Electrical)
 M.Sc.Information Technology (Murdoch Uni, Australia)
 Phone no: (+61) 0421167375


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

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



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

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


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

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




WHERE clouse

2003-01-08 Thread Dejan Milenkovic
Hi,
 Is there a difference in speed between these two querys:
SELECT  whatever, somethin_else FROM table1 WHERE 1 AND (
table1.whatever='value' OR  )
SELECT  whatever, somethin_else FROM table1 WHERE  table1.whatever='value'
OR ...






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

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




Re: converting text to hypertext

2003-01-08 Thread wcb
 Hi Rick!

You could also do something like the following (I'm assuming that the
http://www part isn't in $field already. . .).

=
print tr;
 foreach ($row as $field)
 {
 print td align=centera
href=http://www.$field/;http://www.$field/td;
 }
 print /tr;
=

Cheers!

-warren



for filter: query, mysql, bigint


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

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: Row value uniqueness?

2003-01-08 Thread Steven Nakhla
Aside from designating a row as a primary key, is
their any SQL syntax to force that entries within a
row are unique (such as a string value)?  Thanks!
 
Steve Nakhla


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

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




RE: converting text to hypertext

2003-01-08 Thread Jennifer Goodie
HTML doesn't just see a URL and automatically make it a hyperlink it is not
helpful like MS products.  So what you are seeing is expected behavior.  I
would alter the while loop to look like this...


while ($row = mysql_fetch_array($resultID)){ #fetch_array adds little
overhead and gives you an associative array that is easy to work with
print tr\n\ttd$row[Port]/td\n\ttd$row[Application]/td\n\ttda
href='$row[URL]' target='_blank'$row[URL]/a/td\n/tr\n;
}

I do not know your column names and have assumed they are Port,Application,
and URL.  I am probably wrong, put your column names in their place.  By
selecting * and just looping through the fields returned you are relying on
them being returned in a certain order, while that will work, it is bad
practice.  It also made the code confusing and hard to read and didn't
really save you any typing.  This is just a quick solution, I did not check
the html or debug the code or look for security flaws, or put logic in place
for poorly formed URLs, you should be able to handle that.




-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:58 AM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: RE: converting text to hypertext


Larry,

This is the code I'm using.  I'm pretty new to PHP, so there may be a simple
solution within PHP of which I'm unaware.  I just thought it could be done
from the MySQL side of things.


$resultID = mysql_query(SELECT * FROM ports, $linkID);

print tabletrthPort #/th;
print thTransport/thth align=centerApplication/thth
align=centerRFC/Vendor's URL/MS KB article/th;

while ($row = mysql_fetch_row($resultID))

{
print tr;
foreach ($row as $field)
{
print td align=center$field/td;
}
print /tr;
}
print /table;
mysql_close ($linkID);



Thanks,

rick


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:13 AM
To: Rick Tucker
Subject: RE: converting text to hypertext


The question seems to me how are you outputting to html?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: converting text to hypertext

I just imported a .csv file and one of the columns of data was websites
addresses.  Those addresses aren't being recognized as links when I output
an html table from my queries.  I'm scratching me head on how to make the
conversion.  I figured there would by a hypertext datatype of some sort, but
I can't find any information regarding this issue. If someone could point me
in the right direction, I would appreciate it.

Thanks,

rick


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

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



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

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


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

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




RE: Alter table error

2003-01-08 Thread Jennifer Goodie
ERROR 7: Error on rename of '.\helpdesk\call_information.MYI' to
'.\helpdesk\#sql2-b90-81.MYI' (Errcode: 13)

Any ideas on why I would get this??

Errorcode 13 is permission denied or file not found.  Either
.\helpdesk\#sql2-b90-81.MYI exists and your mysqld user does not have
permission to overwrite it, or the user does not have write permissions on
the data dir and everything in it.  Using perror will help you decode the
errorcodes.


SQL,QUERY


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

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




  1   2   >