Re: bug report

2001-04-20 Thread René Tegel

Verified. this is a bug

empty table or 1 record returns expected result, insert one more record and
the result of now() is empty.



mysql> select now(), count(*) from t where a in (2);
| now()   | count(*) |
| 2001-04-21 08:12:03 |0 |
1 row in set (0.00 sec)

mysql> insert into t (a) values (1);

mysql> select now(), count(*) from t where a in (2);
| now() | count(*) |
|   |0 |
1 row in set (0.01 sec)

verified on version 3.23.32-debug (w2k) binary.
- Original Message -
From: "Andrew Schmidt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 11:31 PM
Subject: bug report


> >Description:
> tough one to describe.   the step by step example shows all
> basicly once a table gets more than 1 row and doing a select with no
> result will yield a blank date... gah please see the example =)
>
> >How-To-Repeat:
> create database tmpdb;
> use tmpdb;
> create table test (foo int);
> insert into test values (1);
> select NOW(), count(*) from test where foo in (2);
> +-+--+
> | NOW()   | count(*) |
> +-+--+
> | 2001-04-20 17:21:29 |0 |
> +-+--+
>
> insert into test values (1);
> select NOW(), count(*) from test where foo in (2);
> +---+--+
> | NOW() | count(*) |
> +---+--+
> |   |0 |
> +---+--+
>
> notice the date field is blank.
>
> >Fix:
> 
> >Submitter-Id:  
> >Originator:Andrew Schmidt
> >Organization:
>  
> >MySQL support: [none | licence | email support | extended email support ]
> >Synopsis:  
> >Severity:  <[ non-critical | serious | critical ] (one line)>
> >Priority:  <[ low | medium | high ] (one line)>
> >Category:  mysql
> >Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
> >Release:   mysql-3.23.37 (Source distribution)
> >Environment:
> 
> System: FreeBSD wrk-112.tor1.targetnet.pvt 4.2-STABLE-20010112-JPSNAP
> FreeBSD 4.
> 2-STABLE-20010112-JPSNAP #0: Thu Jan 11 20:06:54 GMT 2001
> [EMAIL PROTECTED]
> reebsd.org:/usr/src/sys/compile/GENERIC  i386
> Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
> /usr/
> bin/cc
> GCC: Using builtin specs.
> gcc version 2.95.2 19991024 (release)
> Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
> LIBC:
> -r--r--r--  1 root  wheel  1169222 Jan 11 14:28 /usr/lib/libc.a
> lrwxrwxrwx  1 root  wheel  9 Jan 19 13:01 /usr/lib/libc.so -> libc.so.4
> -r--r--r--  1 root  wheel  559420 Jan 11 14:28 /usr/lib/libc.so.4
> Configure command:
> ./configure  --localstatedir=/usr/local/var/db/mysql --withou
>
t-perl --without-debug --without-readline --without-bench --enable-assembler
>  --e
> nable-thread-safe-client
> Perl: This is perl, version 5.005_03 built for i386-freebsd
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Indizes abschalten.

2001-04-19 Thread René Tegel

I'll try to translate:
in oracle one can turn off indexes within a query (full-table-scan) by
using: +0 or ||''.
for example:
SELECT *
FROM tabelle
WHERE eigenschaft||'' = 'text';

SELECT *
FROM tabelle
WHERE id+0 = 1;

can one do this with mysql?

- Original Message -
From: "Hagen Schmieder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 5:41 PM
Subject: Indizes abschalten.


Hallo Leute,

in Oracle kann man Indizes in einer Abfrage abschalten(Full-Table-Scan). Mit
+0 oder ||''.
z.B.:

SELECT *
FROM tabelle
WHERE eigenschaft||'' = 'text';

SELECT *
FROM tabelle
WHERE id+0 = 1;


Geht das bei mySQL auch?



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

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: Plase Let us know if there is a Racialism for Mysql product and quit

2001-04-19 Thread René Tegel

Yusuf,

i don't understand why you are so angry and are trying to fight it out on
this list.

1. Loads of computer-related things are vulnerable for different
explanations. especially with software that is easily ported between
platforms, it's also easy to have a manual that is not dedicated for one
platform and thus now and then one makes mistakes in interpration. There
will be thousands of other things to discuss about, but there is never
reason to get angry

2. All people joining this list are volunteers. They answer just what they
think, and i never discovered somebody being not honest. Maybe somebody is
wrong, but we all make mistakes. Every sentence said is the author's
personal knowledge and/or opinion.

3. Nobody ever blamed you for not being native english. Only thing said was:
read carefully, and if it's not working, think twice about what's being
said.

4. I'd love it if all software was that well documented as mysql, and that
easy-to-use

Last but not least: i hope you have a nice time programming and researching,
which looks like a better thing to do for me than wasting your time blaming
people for things nobody really did wrong. Let's discuss things technically,
ok?

regards,

rene

- Original Message -
From: "Yusuf Incekara" <[EMAIL PROTECTED]>
To: "John Dean" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 9:49 AM
Subject: Re: Plase Let us know if there is a Racialism for Mysql product and
quit


> - Original Message -
> From: John Dean <[EMAIL PROTECTED]>
> To: Yusuf Incekara <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 10:39 PM
> Subject: Re: Plase Let us know if there is a Racialism for Mysql product
and
> quit
>
>
> > At 18:50 18/04/2001 +0300, you wrote:
> > >You said :
> > >Only those who don't read English too good. Being a native English
> speaker
> > >it is very clear to me.
> >
> > Correct and it is obvious to me that your English is very poor
> >
> It is your humble opinion. I don't care.
> >
> >
> > >Could you please be more open and honest?
> >
> > I could not be more open or honest than what I said above. But just in
> case
> > you don't understand I will say it again. Your English is poor
> >
> It is your humble opinion. I don't care also.
> The problem is not in reading and understanding
> in English.  Problem is in your mind.
> Let me try to explain. Question is about being open and honest.
> That means if you have an opinion you can easily defend this opinion in
> everywhere.
> And have to tell this in every platform as your opinion.
> If theese opinions are rude so you are rude. But this is you are.
> Act what you are and what you seems like.
> But don't try to hide them and don't act in different platform in
different
> ways.
>
> > >It is obviously seen that i can easily read and write in English.
> >
> > Only you think so
> >
> > >But if you disturbed that one Turk found your bug please let me know
> > >and quit .
> >
> > Personally I could not care less from which country you come from
> >
> > >Let all your customers become from Mansfield, England, UK.
> >
> > Look what you said above. That sentence does not make sense. What do you
> > mean, "Let all your customers become from Mansfield " You are not
even
> > a customer you are just an upset user who can not take the truth
>
> Well the truth is situation is not about my English or not about me to pay
> license fee.
> The problem is about you are harding to accept you fault.
> So i solved my problem. And just don't want others users to have same
> problem.
> That's all.
>
> >
> >
> > >I am not insisting that my English is perfect. But be sure that
> > >it is not necessary that being a native English speaker.
> > >
> > >I said that no matter but you are looking for a trouble ...
> >
> > Only you say that because you must have some kind of persecution complex
> or
> > inferiority complex
>
> Well it must be a complex of yours and i think it can be named
> insufficient understanding complex , harding to accepting you fault
complex
> ,
> (thinking) faultless complex , individuality complex etc...
>
> >
> >
> > >If you read carefully followed instructions ( by using your perfect
> native
> > >English )
> > >you 'll see the differences between Windows directory and System
> Directory.
> >
> > I am perfectly aware of the difference but it is obvious you don't what
is
> > meant by what is written in the manual. Windows-system-directory does
not
> > equal windows\system. The give away are the hyphens i.e '-' between the
> > words windows, system and directory. Note it does not contain any
> > backslashes i.e. '\'
> >
> >
> well it is more obvious that
> Windows-system-directory is not equal Windows directory.
> Any Windows programmer - as well as noticed in Microsoft References-
> knows that Windows Directory is a c:\Win95 or c:\WinNT and
> System Directory or Windows System Directory is a c:\Win95\System or
> c:\WinNT\System32 (or c:\WinNT\System or whatever).
> And this sit

Re: Help restarting mysqld !!

2001-04-19 Thread René Tegel

on my linux boxes this is:
/etc/rc.d/init.d/mysql stop | start

- Original Message -
From: "Martin Cabrera Diaubalick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 9:42 AM
Subject: Help restarting mysqld !!


> Hello everyone! This is the first time I post here, so please bear with
me.
>
> It all started when I deleted a whole table by mistake. So I try to
> recovered it by copying yesterday's backup. I had never done that before
and
> it all worked wrong. I found out MySQL server had to be restarted in order
> to changes take effect.
>
> I kill mysqld daemon with a 'kill PID', but I didn't know how to restart
it
> .I tried with a 'mysqld'  but as soon as I close the Terminal Window,
mysqld
> died.
> Then I tried with 'mysqld &' and it crashed after a while.
> Finally I found this nice little script below, I executed it but due to my
> ignorance I don't if what I did is right. Everything seems to be ok right
> now but I'm not sure if it's gonna crash in a while.
>
> Could you please take a look at it and tell me what you think.
>
>
> Thanks in advance
>
> Regards
>
> MySQL version: 3.22.32
> OS: FreeBSD 4.2
>
>
>
>
>
>
> ***   Beginning of safe_mysqld
> 
>
> #!/bin/sh
> # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron
HB
> # This file is public domain and comes with NO WARRANTY of any kind
> #
> # scripts to start the MySQL daemon and restart it if it dies unexpectedly
> #
> # This should be executed in the MySQL base directory if you are using a
> # binary installation that has other paths than you are using.
> #
> # mysql.server works by first doing a cd to the base directory and from
> there
> # executing safe_mysqld
>
> trap '' 1 2 3 15   # we shouldn't let anyone kill us
>
> # Check if we are starting this relative (for the binary release)
> if test -d ./data/mysql -a -f ./share/mysql/english/errmsg.sys -a \
>  -x ./bin/mysqld
> then
>   MY_BASEDIR_VERSION=`pwd`  # Where bin, share and data are
>   DATADIR=$MY_BASEDIR_VERSION/data # Where the databases are
>   ledir=$MY_BASEDIR_VERSION/bin  # Where mysqld is
> # Check if this is a 'moved install directory'
> elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a
\
>  -x ./libexec/mysqld
> then
>   MY_BASEDIR_VERSION=`pwd`  # Where libexec, share and var are
>   DATADIR=$MY_BASEDIR_VERSION/var # Where the databases are
>   ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
> else
>   MY_BASEDIR_VERSION=/usr/home/notodo/usr/local/mysql
>   DATADIR=/usr/home/notodo/usr/local/mysql/var
>   ledir=/usr/local/bin/
>   if test ! -x $ledir/mysqld
>   then
> echo "The file $ledir/mysqld doesn't exist or is not executable"
> echo "Please do a cd to the mysql installation directory and restart"
> echo "this script from there as follows:"
> echo "./bin/safe_mysqld".
> exit 1;
>   fi
> fi
>
> pid_file=$DATADIR/`/bin/hostname`.pid
> log=$DATADIR/`/bin/hostname`.log
> err_log=$DATADIR/`/bin/hostname`.err
>
> # Parse arguments to see if caller wants the pid_file somewhere else.
> for arg
> do
>   case $arg
> in
> --pid-file=*)
>   pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"`
>   ;;
> --datadir=*)
>   DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"`
>   ;;
>   esac
> done
>
> #
> # If there exists an old pid file, check if the daemon is already running
> # Note: The switches to 'ps' may depend on your operating system
>
> if test -f $pid_file
> then
>   PID=`cat $pid_file`
>   if /bin/kill -0 $PID
>   then
> if /bin/ps p $PID | grep mysqld > /dev/null
> then# The pid contains a mysqld process
>   echo "A mysqld process already exists"
>   echo "A mysqld process already exists at " `date` >> $err_log
>   exit 1;
> fi
>   fi
>   rm -f $pid_file
>   if test -f $pid_file
>   then
> echo "Fatal error: Can't remove the pid file: $pid_file"
> echo "Fatal error: Can't remove the pid file: $pid_file at " `date` >>
> $err_log
> echo "Please remove it manually and start $0 again"
> echo "mysqld daemon not started"
> exit 1;
>   fi
> fi
>
> #
> # Uncomment the following lines if you want all tables to be automaticly
> # checked and repaired at start
> #
> # echo "Checking tables in $DATADIR"
> # isamchk --silent --force $DATADIR/*.ISM
>
> echo "Starting mysqld daemon with databases from $DATADIR"
>
> #Default communication ports
> #MYSQL_TCP_PORT=3306
> if test -z "$MYSQL_UNIX_PORT"
> then
>   MYSQL_UNIX_PORT="/tmp/mysql.sock"
>   export MYSQL_UNIX_PORT
> fi
> #export MYSQL_TCP_PORT
>
> # Does this work on all systems?
> #if type ulimit | grep "shell builtin" > /dev/null
> #then
> #  ulimit -n 256 > /dev/null 2>&1  # Fix for BSD and FreeBSD systems
> #fi
>
> echo "mysqld started on " `date` >> $err_log
> while true
> do
>   rm -f $MYSQL_UNIX_PORT $pid_file # Some extra safety
>   if test "$#" -eq 0
>   then
> nohup $ledir/mysqld --ba

Re: there is no mysql/var directory

2001-04-18 Thread René Tegel

take a look at /var/mysql :)

- Original Message -
From: "Philip Mak" <[EMAIL PROTECTED]>
To: "feldekis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 11:59 PM
Subject: Re: there is no mysql/var directory


> On Wed, 18 Apr 2001, feldekis wrote:
>
> > Hi everybody!!
> > I've got a pb during the installation of the binary of mysql-3.22.32
(the same
> > for 3.23.36 version):
> > there is no mysql/var directory, so when i write: chown -R mysql
> > /usr/local/mysql/var
> > that doesn't work. And it's exactly the same for mysql/bin.
> > So PLEASE!!! if someone can help me
> > Thanks in advance
>
> Find the correct path for the mysql directory. I think it might be in
> /usr/bin/*mysql* and /var/lib/mysql. Try typing locate mysql, or find /usr
> -name "*mysql*"
>
> Then chown those files.
>
> -Philip Mak ([EMAIL PROTECTED])
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: Plase Let us know if there is a Racialism for Mysql product and quit

2001-04-18 Thread René Tegel

lol. guess yusuf gots some point here.

Obviously, for one reason or another m$ decided to place some files in the
%windir%, and some in the %windir%\system32 dir. Although it never became
totally clear to me what structure they had in mind (if there is any).

Roughly said: %windir% is for executables, .ini files and other stuff, and
%windir%\system32 for 32-bit dll's (and %windir%\system for 16 bit dll's).

but hey, take a look at a random installation, and you see loads of
(especially big...) companies messing up. In the end, windows doesn't care
at all where .dll's , and lot of other stuff, is placed, as long as it is in
the path.

Although yusuf, if you know the windows api's that well, you should also
know that application .ini files should be placed in the windir.

with regards,

rene


- Original Message -
From: "Yusuf Incekara" <[EMAIL PROTECTED]>
To: "John Dean" <[EMAIL PROTECTED]>; "Mysql Mailing list"
<[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 5:50 PM
Subject: Plase Let us know if there is a Racialism for Mysql product and
quit


> You said :
> Only those who don't read English too good. Being a native English speaker
> it is very clear to me.
>
>
> Could you please be more open and honest?
>
> It is obviously seen that i can easily read and write in English.
> But if you disturbed that one Turk found your bug please let me know
> and quit . Let all your customers become from Mansfield, England, UK.
>
> I am not insisting that my English is perfect. But be sure that
> it is not necessary that being a native English speaker.
>
> I said that no matter but you are looking for a trouble ...
>
> If you read carefully followed instructions ( by using your perfect native
> English )
> you 'll see the differences between Windows directory and System
Directory.
>
> If still there is some issues that your perfect English mind can not
> understand
> please mail me.
>
> If you say still i am native English. No one can knows better then me even
> Microsoft
> so there is nothing to say.
>
> If you undertand your mistake and wanna apologize please forget it.
>
> Regards.
>
> Yusuf Incekara
> Avukatpro Limited Sirketi
> Izmit/Turkey (sorry for not being a native English but smart)
>
>
>
>
> GetSystemDirectory
>
> Reference : Microsoft Web site :
> http://msdn.microsoft.com/library/psdk/sysmgmt/sysinfo_1unt.htm
>
> The GetSystemDirectory function retrieves the path of the system
directory.
> The system directory contains such files as dynamic-link libraries,
drivers,
> and font files.
>
> UINT GetSystemDirectory(
>   LPTSTR lpBuffer,  // buffer for system directory
>   UINT uSize// size of directory buffer
> );
> Parameters
> lpBuffer
> [out] Pointer to the buffer to receive the null-terminated string
containing
> the path. This path does not end with a backslash unless the system
> directory is the root directory. For example, if the system directory is
> named WINDOWS\SYSTEM on drive C, the path of the system directory
retrieved
> by this function is C:\WINDOWS\SYSTEM.
> uSize
> [in] Specifies the maximum size of the buffer, in TCHARs. This value
should
> be set to at least MAX_PATH.
> Return Values
>
>
>
> GetWindowsDirectory
>
> Reference : Microsoft Web site :
> http://msdn.microsoft.com/library/psdk/sysmgmt/sysinfo_4k55.htm
>
>
> GetWindowsDirectory
> The GetWindowsDirectory function retrieves the path of the Windows
> directory. The Windows directory contains such files as applications,
> initialization files, and help files.
>
> UINT GetWindowsDirectory(
>   LPTSTR lpBuffer,  // buffer for Windows directory
>   UINT uSize// size of directory buffer
> );
> Parameters
> lpBuffer
> [out] Pointer to the buffer to receive the null-terminated string
containing
> the path. This path does not end with a backslash unless the Windows
> directory is the root directory. For example, if the Windows directory is
> named WINDOWS on drive C, the path of the Windows directory retrieved by
> this function is C:\WINDOWS. If the system was installed in the root
> directory of drive C, the path retrieved is C:\.
> uSize
> [in] Specifies the maximum size, in TCHARs, of the buffer specified by the
> lpBuffer parameter. This value should be set to MAX_PATH to allow
sufficient
> room for the path.
>
>
>
>
>
> - Original Message -
> From: John Dean <[EMAIL PROTECTED]>
> To: Yusuf Incekara <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 10:11 AM
> Subject: Re: Ynt: Bug in Documentation ?
>
>
> > At 09:29 18/04/2001 +0300, you wrote:
> > >Ok . No matter for me anymore. cause i solved my problem.
> > >i'm paying attention for other users not to have
> > >the same problem.
> >
> > Only those who don't read English too good. Being a native English
speaker
> > it is very clear to me
> >
> > >Regards
> > >Yusuf Incekara
> > >
> > >
> > >- Original Message -
> > >From: John Dean <[EMAIL PROTECTED]>
> > >To: Yusuf Incekara <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > >Sent: Tuesday, 

Re: Database Planning

2001-04-17 Thread René Tegel

well, start with reading a book about designing databases, especially about
the subject 'normalisation'.
normalisation is a way to split up data ('entities') in a way that every
piece of data only occurs once in your database. (although sometimes for
practical reasons you may decide otherwise, but normalising your data is
always a good first step!)

Since you say newbies will like this, i'll try to give an example.

suppose you have a database of books. The database stores the book, it's
title and so on, the author, the publisher and the bookstores that sell this
particulair book:

book title description author author_address publisher publisher_address
bookshop bookshop_address [bookshop bookshop_addr], []

well, you could try to make this fit in one table, but you'll get a tough
time.
so, you split up ('normalise'):

books:
book_id
ISDN
title
description
author_id
publisher_id

authors:
author_id
author_name
author_addr
author_email

publishers:
publisher_id
publisher_name
publisher_addr
publisher_phone
publisher_email

bookshops:
bookshop_id
bookshop_name
bookshop_addr
bookshop_phone

availability:
available_id
book_id
bookshop_id

So, you split up your data in more elementary parts.

Especially notice how you create a table that links books to the bookshop
that sell those books, you only need the two id's from the book and the
bookshop.

If your very smart, you might figure out by yourself further. Elsewise i
still recommend to go to a (online) bookshop and get a nice book about
developing databases.

gl,

rene


- Original Message -
From: "Jeff Holzfaster" <[EMAIL PROTECTED]>
To: "General MySQL List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 4:01 AM
Subject: Database Planning


> I realize this may be a little OT but I'm sure many of us MySQL rookies
> would be interested in the responses.
>
> I would be interested in hearing how someone goes about planning the
layout
> of their database including how they determine what tables, fields, column
> types, queries, etc they will need.  How do you start the process?  How do
> you determine the correct questions to ask of your application?  Do you
use
> some kind of diagramming tool?  Blah... Blah... Blah...
>
> 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: Can you Help me? I have Appostroph problem

2001-04-16 Thread René Tegel

escape the apostrof with a backslash:

select ID from table where sentence = 'does\'t take'

you should do this for some other characters as well, like the backslash
itself.
if you'd use php you could use the function 'addslashes()';

basically what you should do to make a string binary-safe is replace the
following chars:
' -> \'
" -> \"
\ -> \\
 -> \0
where  is a binary null.

gl

- Original Message -
From: "Sofiane Sakhri" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 11:37 AM
Subject: Can you Help me? I have Appostroph problem


> Hi, I'm new in mysql,
> I have a problem in the apostroph,
> I would write a query like :
>
> select ID from table where sentence = 'does't take'
>
> Can you help me?
>
> ___
> Do You Yahoo!? -- Pour dialoguer en direct avec vos amis,
> Yahoo! Messenger : http://fr.messenger.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: how to get average value for top n records?

2001-04-15 Thread René Tegel

select sum(a)/3 from atable order by record_id desc limit 3;

- Original Message -
From: "Kevin Xin Lin" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Sunday, April 15, 2001 9:04 PM
Subject: how to get average value for top n records?


> Hi, if I have a table with only one field A like this:
>
> record#1: 2
> record#2: 3
> record#3: 2
> record#4: 4
> record#5: 6
> record#6: 8
>
> How to write a sql statement to retrieve the average value of field A
> for the last 3 records?
>
> Did I make sense here? Thanks for help.
>
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: bug - multiple column primary key cannot correctly determine duplicate entry

2001-04-14 Thread René Tegel

the 'integers' you insert as key are too big to fit in the size of a
integer.
mysql replaces such a big or small integer by the biggest or smallest value
possible.
if you look closely at your query, you see that the key returned by mysql
are not the same values as you inserted.
you have to: or change field type to contain bigger values, or insert
integers that fit within a integer field. for example you could use the
numeric type. setting integer(11) has no effect, numeric(11) has.


gl

rene

- Original Message -
From: "Filip Trojan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2001 11:53 AM
Subject: bug - multiple column primary key cannot correctly determine
duplicate entry


Dear MySQL experts

In the following example I created simple table with two-column primary key
ID,IDT. After some inserts there came insert with ID, IDT values, that are
not equal to none of the previous couples, but MySQL still reported error
"Duplicate entry". In the lines below there is source code that can by used
to reproduce the problem. This example was run under local environment of
Microsoft Windows 98 4.10.1998 on MySQL Ver 3.23.32 for Win95/Win98 on i32
with user privileges select, insert, update, delete, create, drop, alter and
index.
Please feel free to answer that this was my fault. I am just a beginner and
it would be the best result. Otherwise it would be serios bug.

Filip Trojan, Prague, Czech Republic


# MySQL dump 8.12
#
# Host: localhostDatabase: tourservis
#
# Server version 3.23.32-log

#
# Table structure for table 'pobzajturnus'
#

CREATE TABLE pobzajturnus (
  ID int(11) NOT NULL default '0',
  IDT int(11) NOT NULL default '0',
  DZAP datetime NOT NULL default '-00-00 00:00:00',
  DAKT datetime NOT NULL default '-00-00 00:00:00',
  DZAC datetime NOT NULL default '-00-00 00:00:00',
  DKON datetime NOT NULL default '-00-00 00:00:00',
  POCMIST smallint(6) default NULL,
  POCVOLN smallint(6) default NULL,
  DOPRAVA varchar(40) default NULL,
  VEDOUCI int(11) default NULL,
  POZN blob,
  PRIMARY KEY (ID,IDT)
) TYPE=MyISAM;

#
# Dumping data for table 'pobzajturnus'
#

INSERT INTO pobzajturnus VALUES (-2147483648,1544414423,'2001-04-14
10:57:56','2001-04-14 10:57:56','2001-06-09 00:00:00','2001-06-16
00:00:00',NULL,NULL,'vlastní nebo autobusovou linkou (není za',0,'');
INSERT INTO pobzajturnus VALUES (-2147483648,44245749,'2001-04-14
10:57:56','2001-04-14 10:57:56','2001-06-16 00:00:00','2001-06-23
00:00:00',NULL,NULL,'vlastní nebo autobusovou linkou (není za',0,'');
INSERT INTO pobzajturnus VALUES (-2147483648,2147483647,'2001-04-14
10:57:56','2001-04-14 10:57:56','2001-06-23 00:00:00','2001-06-30
00:00:00',NULL,NULL,'vlastní nebo autobusovou linkou (není za',0,'');
INSERT INTO pobzajturnus VALUES (-2147483648,1338875697,'2001-04-14
10:57:56','2001-04-14 10:57:56','2001-06-30 00:00:00','2001-07-07
00:00:00',NULL,NULL,'vlastní nebo autobusovou linkou (není za',0,'');
INSERT INTO pobzajturnus VALUES (-2147483648,1969892214,'2001-04-14
10:57:56','2001-04-14 10:57:56','2001-07-07 00:00:00','2001-07-14
00:00:00',NULL,NULL,'vlastní nebo autobusovou linkou (není za',0,'');

insert into pobzajturnus set
 id=-2154422840,
 idt=4764690836,
 dzap=now(),
 dakt=now(),
 dzac='2001-07-14 00:00',
 dkon='2001-07-21 00:00',
 doprava='vlastní nebo autobusovou linkou (není zahrnuta v ceně)',
 vedouci='',
 pozn='';

ERROR 1062 at line 38: Duplicate entry '-2147483648-2147483647' for key 1




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

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: Is this a bug?

2001-04-12 Thread René Tegel

you try to select the march 87. 2001 ;)
read the manual about date/time conversion and math:

mysql> select current_date(), current_date()-0, current_date()-14;
| current_date() | current_date()-0 | current_date()-14 |
| 2001-04-12 | 20010412 |  20010398 |
1 row in set (0.00 sec)

gl

- Original Message -
From: "Chris Harshman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 8:32 PM
Subject: Is this a bug?


> At the first of the month (no changes made to the database; this script is
> just running SELECT statements at present) the number of rows returned by
> this query dropped noticeably.  Is this a bug, is my query just fubar'd,
> or...?
>
> SELECT account.username AS account_username, customers.username AS
> customers_username, account.accout_no, account.email, customers.last_mod
> FROM account LEFT JOIN customers ON account.username = customers.username
> WHERE (customers.username IS NULL OR customers.username LIKE
> \"%_expired\") OR (customers.last_mod <= current_date() - 14 AND
> customers.access_status = 'D') ORDER BY last_mod";
>
> The number of rows returned:
> 4/10 253
> 4/9 247
> 4/8 243
> 4/7 241
> 4/6 234
> 4/5 226
> 4/4 221
> 4/3 216
> 4/2 207
> 4/1 197
> 3/31 333
> 3/30 312
>
>
> Thanks!
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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

2001-04-11 Thread René Tegel

although it somehow _is_ possible (even documented but i don't know where,
registry settings should do) to run services on win 9x, like virus scan and
other stuff...
if someone knows details :)

- Original Message -
From: "Dan Harrington" <[EMAIL PROTECTED]>
To: "Sylvain Besson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 8:05 PM
Subject: RE: Millenium


> Windows Millenium editon is not made to be a server.
>
> Regardless of whether or not it will run, I wouldn't do it if I were you.
>
> Go to Win2K pro if you must be on a windows box, but Win ME will only
> cause you needless pain.
>
> my 2cents
> :-)
>
>
> > -Original Message-
> > From: Sylvain Besson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 11, 2001 9:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: Millenium
> >
> >
> > Hi
> > Is mysql running on Windows Millenium ?
> > Thank you in advance
> >
> > Sylvain Besson
> >
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Cannot DELETE all records with NULL entries in UNIQUE KEY fields

2001-04-10 Thread René Tegel

i'm very suprised this table definition works for you.
on a -some elder- version of mysql i could not create something like:
create table test (
t integer,
unique (t)
);
well, i then get a warning form mysql, about the field being able to be NULL
so that it could not be unique.
create table test (
t integer NOT NULL,
unique (t)
);
this works!
other databases (interbase) did not show this behaviour.

i guess the newer mysql one 1 hand now allows you to define the field as
null, but internally does not expect this.

maybe you can skip the unique clause and just use an index for the time
being?

gl


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 6:43 PM
Subject: BUG: Cannot DELETE all records with NULL entries in UNIQUE KEY
fields


> >Description:
>
> Attempting to delete all records in a table containing NULL values in a
> UNIQUE KEY field does not work as expected.  Only a single record is
deleted,
> presumably because the server thinks that the table will only have one
record
> with a NULL value in it (as it is in a UNIQUE field).
>
> >How-To-Repeat:
>
> Run the following SQL commands:
>
> --- BEGIN SQL TEST
STATEMENTS --
>
> USE test;
> #
> # Create a table with a unique key in addition to a primary key
> #
> DROP TABLE IF EXISTS table_with_key;
> CREATE TABLE table_with_key (
>   id int(10) unsigned NOT NULL auto_increment,
>   uniq_id int(10) unsigned default NULL,
>   PRIMARY KEY  (id),
>   UNIQUE KEY idx1 (uniq_id)
> ) TYPE=MyISAM;
> #
> # Create a table with only a primary key
> #
> DROP TABLE IF EXISTS table_without_key;
> CREATE TABLE table_without_key (
>   id int(10) unsigned NOT NULL auto_increment,
>   uniq_id int(10) unsigned default NULL,
>   PRIMARY KEY  (id)
> ) TYPE=MyISAM;
> #
> # Insert test data into table with unique key
> #
> INSERT INTO table_with_key VALUES (1,NULL);
> INSERT INTO table_with_key VALUES (2,NULL);
> INSERT INTO table_with_key VALUES (3,1);
> INSERT INTO table_with_key VALUES (4,2);
> INSERT INTO table_with_key VALUES (5,NULL);
> INSERT INTO table_with_key VALUES (6,NULL);
> INSERT INTO table_with_key VALUES (7,3);
> INSERT INTO table_with_key VALUES (8,4);
> INSERT INTO table_with_key VALUES (9,NULL);
> INSERT INTO table_with_key VALUES (10,NULL);
> #
> # Insert identical data into table without unique key
> #
> INSERT INTO table_without_key VALUES (1,NULL);
> INSERT INTO table_without_key VALUES (2,NULL);
> INSERT INTO table_without_key VALUES (3,1);
> INSERT INTO table_without_key VALUES (4,2);
> INSERT INTO table_without_key VALUES (5,NULL);
> INSERT INTO table_without_key VALUES (6,NULL);
> INSERT INTO table_without_key VALUES (7,3);
> INSERT INTO table_without_key VALUES (8,4);
> INSERT INTO table_without_key VALUES (9,NULL);
> INSERT INTO table_without_key VALUES (10,NULL);
> #
> # Delete all records from each table where the uniq_id field is null
> #
> DELETE FROM table_with_keyWHERE uniq_id IS NULL;
> DELETE FROM table_without_key WHERE uniq_id IS NULL;
> #
> # Select what is left -- notice the difference
> #
> SELECT * FROM table_with_keyORDER BY uniq_id, id;
> SELECT * FROM table_without_key ORDER BY uniq_id, id;
>
> --- END SQL TEST
STATEMENTS 
>
> The output for the last four statements looks like the following:
>
> --- BEGIN SQL TEST
OUTPUT --
>
> mysql> DELETE FROM table_with_keyWHERE uniq_id IS NULL;
> Query OK, 1 row affected (0.00 sec)
>
> mysql> DELETE FROM table_without_key WHERE uniq_id IS NULL;
> Query OK, 6 rows affected (0.00 sec)
>
> mysql> SELECT * FROM table_with_keyORDER BY uniq_id, id;
> ++-+
> | id | uniq_id |
> ++-+
> |  2 |NULL |
> |  5 |NULL |
> |  6 |NULL |
> |  9 |NULL |
> | 10 |NULL |
> |  3 |   1 |
> |  4 |   2 |
> |  7 |   3 |
> |  8 |   4 |
> ++-+
> 9 rows in set (0.00 sec)
>
> mysql> SELECT * FROM table_without_key ORDER BY uniq_id, id;
> ++-+
> | id | uniq_id |
> ++-+
> |  3 |   1 |
> |  4 |   2 |
> |  7 |   3 |
> |  8 |   4 |
> ++-+
> 4 rows in set (0.00 sec)
>
> --- END SQL TEST
OUTPUT 
>
>
> >Fix:
>
> No idea.
>
> >Submitter-Id: 
> >Originator: Matt Loschert
> >Organization:  ServInt Internet Services
>
>   Matt Loschert | email: [EMAIL PROTECTED] |
>   Software Engineer | web:   http://www.servint.net/ |
>   ServInt Internet Services | phone: (703) 847-1381 |
>
> >
> >MySQL support: none
> >Synopsis: Cannot DELETE all records with NULL entries in UNIQUE KEY
fields
> >Severity: serious
> >Priority: high
> >Category: mysql
> >Class: sw-bug
> >Release: mysql-3.23.36 (Source distribution)
>
> >Environment:
>
> System: FreeBSD delft.servint.com 4.3-RC FreeBSD 4.3-RC #0: Thu Mar 29
11:50:53 EST 2001
[EMAIL PROTECTED]:/

Re: Deleted user

2001-04-09 Thread René Tegel

stop mysql service, restore the backup from the mysql.user table (or: copy
from a other mysql with known users, or: copy from the installation files),
restart mysql.

- Original Message -
From: "Bob Dushok" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:09 PM
Subject: Deleted user


> I've made a stupid error.  While logged in as root I was deleting
> records from the user table.  Someone was talking to me while I was
> entering a command and I didn't realize what I entered until it was too
> late.  I entered:
> delete from user where user='root';
>
> I immediately used an insert statement to re-insert the root entry, but
> it's not working.  I can still log in as root but appear to have lost
> access to the mysql database.
>
> Is there any way to recover?
>
> Thanks,
> Bob
>
>
>






> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: fastest queries

2001-04-04 Thread René Tegel

not for speed, but i defitively prefer your second query. Reason for this is
simple: you name the field you want to insert.

with your first query, if you'd ever alter the table you would have to check
all your source code that interacts with this table.

speed difference should be very minimal anyhow, since it's only the parser's
speed making some diff in speed, whereas your actual delay is in the writing
of the data to disk.

regards,

rene

- Original Message -
From: "Bryan Wheelock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 3:19 PM
Subject: fastest queries


> I'm working on a MySQL db and I was just curious what type of query was
> faster.
>
> e.g.
> I have this table1
> id (auto# primary key) |  date| Name | address | email
>
> I want to insert a new name into the DB.
> Which method would be faster?
> 1.
> INSERT INTO table1 VALUES(null,null,'Bryan',null,null);
>
> 2.
> INSERT INTO table1( name ) VALUES('Bryan');
>
> Thanks,
> Bryan
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Question about low priority deletes

2001-03-29 Thread René Tegel

try
delete ... limit n;
where n is a reasonable (small) amount. repeat until 0 rows affected :)

- Original Message -
From: "Basil Hussain" <[EMAIL PROTECTED]>
To: "MySQL List" <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 7:10 PM
Subject: Question about low priority deletes


> Hi,
>
> There's something I'm not sure about with DELETE LOW_PRIORITY. It says in
> the manual that:
>
> "If you specify the keyword LOW_PRIORITY, execution of the DELETE is
delayed
> until no other clients are reading from the table."
>
> What exactly does it mean by "no other clients are reading"? Does it mean
> that when you first issue the delete query that if other processes are
> reading from the table then it won't start until they have finished? I
> imagine this is the case, BUT, what if other processes want to read from
the
> table once the delete has started - will the delete pause until the other
> processes have finished reading? What about other processes wanting to
> insert records too?
>
> The reason I ask this is that it's critical that I delete approximately
> 300,000 records from a 2 million record table, but whilst still letting
> other processes read from and (mainly) insert records in a timely manner.
>
> Can anyone offer a precise explanation of what DELETE LOW_PRIORITY
> facilitates?
>
> Regards,
>
> 
> Basil Hussain ([EMAIL PROTECTED])
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: Complexe query ....

2001-03-27 Thread René Tegel

excuse me, this just wouldn't work. and excuse last unfinished message.

if one on of the tables matches none, the query will return no match, which
is maybe not what you want.
else it'll return all data matched against each other, which is again not
likely what you want (since you get multiple results for each table).

guess you'll have to query each of the music, video and book tables seperate
to return sensefull results (read: presentable results).

only circumstance when this give nice results is when each book/video/music
table contains exactly one match.

sorry for too rapid answering...

regards,

rene


- Original Message -----
From: "René Tegel" <[EMAIL PROTECTED]>
To: "Amazing-Books.Com" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 5:16 PM
Subject: Re: Complexe query 


> select book.title, video.title, music.title from provider, book, video,
> music where provider.name='providername' and
> book.provider_id=provider.provider_id and
> video.provider_id=provider.provider_id and
> music.provider_id=provider.provider_id;
>
> - Original Message -
> From: "Amazing-Books.Com" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 27, 2001 10:39 AM
> Subject: Complexe query 
>
>
> Hi everybody. I got a complexe question well according to me. I am working
> with PHP and i am making some queries to some database. here is a
> description of the tables.
>
>   provider book video music
>   provider_id title title title
>   name provider_id provider_id provider_id
>
>
>
> I need to select all the title from book, video, music that matches a
> provider name and not a provider id.
>
> I know i can make 2 queries to do it but i am shure i can do a complexe
join
> somewhere that would allow me only to connect once. I want to do it this
one
> because to connect twince to a db could slow down the performance.
>
> This problem goes beyound my knowledge of MySQL a bit of help would be
> appreciated :-)
>
> Thanks
>
>
> Yann Larrivée
> www.ProtonicDesign.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: Complexe query ....

2001-03-27 Thread René Tegel

excuse, this just won't work.

- Original Message -
From: "René Tegel" <[EMAIL PROTECTED]>
To: "Amazing-Books.Com" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 5:16 PM
Subject: Re: Complexe query 


> select book.title, video.title, music.title from provider, book, video,
> music where provider.name='providername' and
> book.provider_id=provider.provider_id and
> video.provider_id=provider.provider_id and
> music.provider_id=provider.provider_id;
>
> - Original Message -
> From: "Amazing-Books.Com" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 27, 2001 10:39 AM
> Subject: Complexe query 
>
>
> Hi everybody. I got a complexe question well according to me. I am working
> with PHP and i am making some queries to some database. here is a
> description of the tables.
>
>   provider book video music
>   provider_id title title title
>   name provider_id provider_id provider_id
>
>
>
> I need to select all the title from book, video, music that matches a
> provider name and not a provider id.
>
> I know i can make 2 queries to do it but i am shure i can do a complexe
join
> somewhere that would allow me only to connect once. I want to do it this
one
> because to connect twince to a db could slow down the performance.
>
> This problem goes beyound my knowledge of MySQL a bit of help would be
> appreciated :-)
>
> Thanks
>
>
> Yann Larrivée
> www.ProtonicDesign.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: Password function

2001-03-27 Thread René Tegel

well, as easy as is: store the original password, or use a php/your
programming_language_specific function like encrypt() and decrypt().
password function is (and should be) irreversable, like a md5 hash. that's
where it's ment for.


- Original Message -
From: "Kevin Williams" <[EMAIL PROTECTED]>
To: "MySQL Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 3:27 PM
Subject: Password function


Peeps,

My problem is this. I'm not happy about storing plain text passwords in my
database for users, so was considering using the password () function in
order to store a hash of the password instead.

sample SQL.

$sql = "SELECT login,IPaddress,password,administrator,valid
 FROM $user_details_table
 WHERE IPaddress =\"$address\" OR (login =\"$username\" AND password =
password(\"$password\"))
 ";

now I don't have any problems writing to the database, or extracting either.
The problem is I want to include one of those "Forgotten your password ?"
entry points to email the user their password.  How can I insert into an
email their password, i.e. reverse the password function ? Cant find it
documented anywhere.

Much appreciated

Kevin Williams



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

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




Re: Complexe query ....

2001-03-27 Thread René Tegel

select book.title, video.title, music.title from provider, book, video,
music where provider.name='providername' and
book.provider_id=provider.provider_id and
video.provider_id=provider.provider_id and
music.provider_id=provider.provider_id;

- Original Message -
From: "Amazing-Books.Com" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 10:39 AM
Subject: Complexe query 


Hi everybody. I got a complexe question well according to me. I am working
with PHP and i am making some queries to some database. here is a
description of the tables.

  provider book video music
  provider_id title title title
  name provider_id provider_id provider_id



I need to select all the title from book, video, music that matches a
provider name and not a provider id.

I know i can make 2 queries to do it but i am shure i can do a complexe join
somewhere that would allow me only to connect once. I want to do it this one
because to connect twince to a db could slow down the performance.

This problem goes beyound my knowledge of MySQL a bit of help would be
appreciated :-)

Thanks


Yann Larrivée
www.ProtonicDesign.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: question ...

2001-03-27 Thread René Tegel

make sure the field definition where you store your password is at least 16
bytes size (i.e. char(16) or varchar(255) or something). i guess such must
be a problem since your query looks just fine.

gl

rene


- Original Message -
From: "jsimlo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 2:16 PM
Subject: question ...


> Hi,
> i have a big problem ... why this doesnt work?:
>
> INSERT INTO mytable (login, heslo) VALUES ('login', Password('heslo'));
> SELECT * FROM mytable WHERE login='login' AND heslo=Password('heslo');
>
> the second line gives me no result ... i have spent a lot of
> time looking at that, but i cant find, where the problem is,
> but the password function ...  i have read all the
> documentation around it, but i have no idea, whats wrong ...
> if you can help me, please tell me, whats wrong ... thanx a
> lot, jsimlo ;)
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: pulling audio out of a blob and playing it

2001-03-27 Thread René Tegel

make sure you send the right mimetype to the client with the php header
function.
some browsers try to detect the mime-type based on the file extension if
they are unsure about the sent mime-type, but you should not rely on this
and different browsers/version are likely not to generate the result you
want.

header ("Content-Type: audio/wave") or something should do the trick.


- Original Message -
From: "WCBaker" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 2:21 AM
Subject: pulling audio out of a blob and playing it


>
> Hi!
>
> I store image files in a MySql table,  and can upload, store and retrieve
> these binary files without problems.  I also store some audio files (they
> happen to be in .wav format).   I'm having difficulty dragging these audio
> files out in a way that IE and Netscape can recognize.
>
> This doesn't work:
>
> print " CONTROLS = console VOLUME = 70  LOOP = FALSE width=70 height='25'
AUTOSTART
> = FALSE NAME = 'classic' MASTERSOUND >";  (script is in PHP4)
>
> The "$reference_passed" refers to a reference number in one table that
> points to a blob in another table containing the binary information.
>
> However, if I change the $reference_passed to something with a
recognizable
> extension, like .wav or .au, I get a little console and this appears to be
> usable (if only I could make a variable called $reference_passed.wav , but
I
> can't, so I cannot successfully play this file).
>
> Am I doing something really dumb here?   I'd rather not store references
in
> the table and then audio files on disk.   It is very tidy to have
everything
> in MySql.  Could someone point the way?
>
> Thanks so much!
>
> -Warren
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: MySQL vs Microsoft SQL

2001-03-23 Thread René Tegel

platform independency, reasonable portability, performance(!), optimal
load/performance ratio, loads of access methods including odbc and web based
scripts like php,asp, active development, integration with apache
authentication, very very good & personal online help (this mailing list :),
low network traffic (ie: good performance when client & server are not on
the same machine), reasonable ansi-92 sql compliance except for a few
issues, automatic incrementing primary keys (w/o stored procedures), usable
from java, perl, c, c++, delphi, kylix, php, apache, almost: name it,
platform indepent, environment indepent, future safe (ie: not a dead end in
computer history)

- Original Message -
From: "Ciprian A." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 7:35 PM
Subject: MySQL vs Microsoft SQL


> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> Hi,
>
> I would need some reasons for choosing MySQL instead of Microsoft SQL.
> (beside the fact that MySQL is free). (not for me but for my boss).
>
> It may sound silly but trust me I really need these reasons. So please
help
> me with this.
>
> Thanks,
> Ciprian A.
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: building a timer for controlled display of records

2001-03-23 Thread René Tegel

well, i think you'll have to work with frames. 1 php script shows your
refreshing data, 1 script allows the user to enter data (this could be a
single script called with different parameters as well).

then in the refreshing script you put something like this before sending any
other data:
header ("Refresh: 15");
this will make the clients browser refresh this page every 15 seconds.
if you'd put those in different frames you client can enter data and see
refreshing data.

best regards,

rene

- Original Message -
From: "WCBaker" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 2:13 PM
Subject: building a timer for controlled display of records


> Hi!
>
> Has anyone a nice example of a timer that will run on a Win OS?   It is to
> be a timed display in which a record is retrieved from a MySql database
> table and after 15 seconds the next record comes up for display.   Since
the
> application has to be responsive to user input during the "show" of
records,
> a loop that causes the OS to be unresponsive until the next display of a
> record is to be avoided.
> I have exausted examples in the manuals for both MySql and PHP4.
>
> Any suggestions will be very much appreciated.
>
> Cheers!
>
> -Warren
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: howto: telnet shell

2001-03-22 Thread René Tegel

maybe he hasn't got telnet server. probably win32 < w2k.

- Original Message -
From: "Seung-woo Nam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 6:41 AM
Subject: Re: howto: telnet shell


> Why not just telnet into the server where mysql is running and log into
mysql from there? That way, there is no need
> to install mysql client.  It look like he already has a telnet client on
the computer...
>
> Seung-woo Nam
>
> [EMAIL PROTECTED] wrote:
>
> > as someone else has mentioned, you would need to install mysql client
into your computer and then use the command
> >
> > mysql -u -h -p
> >
> > to access your remote database.
> >
> > Alan.
> >
> > > yes, that is what i am wanting to do.  i have found a way around by
using uSOFT
> > > Query, but would like to get to a command line type connection
(remotely).
> > >
> > > thanks
> > >
> > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, March 22, 2001 6:53 PM
> > > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > > Subject: Re: howto: telnet shell
> > > >
> > > >
> > > > do you mean that you want to go into the database console directly
> > > > from your office?
> > > >
> > > > Alan.
> > > >
> > > > > i have a MySQL server running in my office.  i need to be able to
> > > > telnet into
> > > > > the MySQL server remotely.  can anyone point me at documentation
> > > > that will tell
> > > > > me how?
> > > > >
> > > > > right now (from a dos window) when i issue:
> > > > >
> > > > > TELNET server.name 3306
> > > > >
> > > > > -  it reports "BAD HANDSHAKE"
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > i think that somehow i need to supply a user name and password,
but
> > > > unclear how
> > > > > to accomplish.
> > > > >
> > > > >
> > > > >
> > > > > thanks
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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: Large search engine

2001-03-22 Thread René Tegel

where's the second option?

about your construction:
> We populate 2 tables:
> one containing the documents (text and ID)
> one containing all the words and the documents ID containing each word

how you plan to make 1 table with words, and several (unlimited)
document_ids?

what you'll need is:
1 table with doc_ids (and perhaps document)
1 table with words
1 table which links words to docs
1 table which gives the position of a word in a doc.

create table documents (doc_id integer primary key auto_increment, document
text);
create table words (word_id integer primary key auto_increment, word
varchar(255));
create table occurences (occ_id integer primary key auto_increment, doc_id
integer, word_id integer);
create table positions (pos_id integer primary key auto_increment, occ_id
integer, position integer);

this way you can handle "unlimited" words with "unlimited" occurences in
"unlimited" documents.

any other solution would force you to construct very inefficient tables, or
use of blob fields which really horribly would slow down your db when adding
data for example, and is generally a very very bad way you shouldn't even
think of.

More tables may look like more programming, but you'll notice things are
easier since this is a correct solution.

i'd suggest you read some stuff about normalisation though! get a nice
(my)sql book, or search for online docs (loads of references can be found in
this mailing list for example!)

btw: your email address looks like "postmaster", is this a bug in the lists
or are you subscribed as postmaster?

regards,

rene


- Original Message -
From: "Cedric Veilleux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 4:30 AM
Subject: Large search engine


> Hi,
>
>   I am planning a very large search engine. I've spent some time reading
> the archive and I found some suggestions on how to do this. The word
> indexing method is a very interesting alternative to slow "...where like
> '%foo%';" queries.
>
>   There is from 100k to 500k documents to index, each are about 10
> KBytes large. Plain text.
>
>   The search engine will allow complex boolean queries (AND, OR, NEAR,
> NOT).
>
>   I have 2 plans in mind, I'd like to have opinions on what's would be
> the most efficient.
>
> First Way:
> We populate 2 tables:
> one containing the documents (text and ID)
> one containing all the words and the documents ID containing each word
>
> The idea is to first filter the documents and then to perform a query in
> the documents that contains at least one of the words, so we're supposed
> to get a decent speed.
>
> I know this is used by many people and I know it gives good results,
> even when searching through 100k+ documents. Although, I am wondering if
> there is not a way to do it without any use of LIKE statements. I really
> don't know if what I have in mind is a good idea, it may be completely
> stupid and inefficient, I have very little DB experiences.
>
> Anyways, what if in the table containing the words and the matching
> document ID's, we also specify where in each documents the word is
> located.
>
> ex:
> WORD|   DOCS |   LOCATIONS
> sun | 32;45;1302 | 3 ; 554,1022 ; 76,675,3445
>
> So word sun is the third word of doc 32, the 554th and 1022th word doc
> 45, etc..
>
> Then the search script will do all the job without sending any other
> queries. May get quite complicated but it should work, it may also be
> easier to process sun NEAR star (maybe this is easy to do with LIKE too,
> I don't know, but I saw nothing in the docs.)
>
>
> Thank you,
>
> Cedric Veilleux
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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




speed of list

2001-03-21 Thread René Tegel

the email list seems to be very slow now and them... wouldn't it be an
option to make a web-based list ?


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

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: "text stored as binary" question posted earlier

2001-03-21 Thread René Tegel

Regarding to the manual there is no difference between blob and text fields,
except that searching on text fields is case-insensitive and searches on
blobs are binary safe.
However, i'm quite stunned if you say you cannot use mysql_query to query
binary data, i've never experienced this problem:
mysql> create table test (b tinyblob);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into test values ('test');
Query OK, 1 row affected (0.00 sec)
mysql> select * from test;
+--+
| b|
+--+
| test |
+--+
1 row in set (0.00 sec)

mysql> select * from test where b like '%t%';
+--+
| b|
+--+
| test |
+--+
1 row in set (0.00 sec)

with both PHP and delphi i did not experience any problem at all.
which version and environment are you using and can you reproduce it ?

- Original Message -
From: "WCBaker" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 4:42 AM
Subject: "text stored as binary" question posted earlier


> Hi all!
>
> Regarding my earler question about storing text as binary -   I found no
> problem storing the text as mediumtext or longtext, and then dragging it
out
> with a normal  "mysql_query ".This solves my problem.
>
> However, if anyone has other ideas I'd love to hear them!
>
> Thanks very much!
>
> -Warren
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Wats the CREATE TABLE statement?

2001-03-20 Thread René Tegel

what about:

CREATE UNIQUE INDEX id ON thistable (APPCODE, EMAILID);

regards,

rene


- Original Message - 
From: "Duke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 4:02 PM
Subject: Wats the CREATE TABLE statement?


I would like to know how to write a SQL statement if i have a composite key
present in the table. eg. my table is

APPCODE EMAILID EMAIL
1 ML1 [EMAIL PROTECTED]
1 ML2 [EMAIL PROTECTED]
2 ML1 [EMAIL PROTECTED]
3 ML1 [EMAIL PROTECTED]
4 ML1 [EMAIL PROTECTED]
4 ML2 [EMAIL PROTECTED]


as you can see in the above table . emailids per appcode is maximum 2.,
hence each appcode will repeat. 
Also the combination of APPCODE+EMAILID helps to identify a given row
uniquely. ie. APPCODE + EMAILID are a combined primary key.

but i havent able to figure out how to go bout writing the SQL code.

does any1 know what the SQL CREATE TABLE statement will be?


Website: http://www.ilug-bom.org.in/
Ftp site: ftp.ilug-bom.org.in
Chat: irc.ilug-bom.org.in
Linuxers mailing list: [EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers



Get free email and a permanent address at http://www.netaddress.com/?N=1

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

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: Renaming and/or copying a database

2001-03-19 Thread René Tegel

copying tables between databases:

create table db2.table2 select * from db1.table1;

however, you'll loose meta data (indexes) on this table, so you'd have to
create them again.

second method:
use the explorer or a dos shell to rename any table or db as shown in the
\mysql\bin directory. From within the sql client the name of a db cannot be
changed afaik, but table names can. Read he docs on this issue ('alter
table' syntax).

regards,

rene



- Original Message -
From: "Marko Milutinovič" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 8:05 AM
Subject: Renaming and/or copying a database


> Hi!
>
> I'm running MySQL on Win NT 4. I'm trying to rename a database from my
> program, but I haven't found any inforamtion about this on the MySQL site.
> Can anybody help me?
>
> Can a database named 2001 be created? Can a database be copied to another
> one via SQL statements?
>
>
> regards,
> m@rko
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: connection lost on long-distance connection

2001-03-14 Thread René Tegel

well, i use mysql_query as ported from libmysql.dll

function mysql_query(_mysql:pmysql;const query:
pchar):integer;stdcall;external 'libmysql.dll';

this function is supposed to return non-zero on failure and zero on succeed
( includes select/update/delete/insert/show etc.etc).

This function behaves entirely normal. Until being idle for a while. The
function then fails after first attempt to connect. But why? i haven't got
any sql error.

So i tested with the console client. Both win32 and linux clients behave the
same. Unfortunately i can only test on a win32 server at "long" distance,
but in fact i'd espect a linux server to behave the same (since i didn't
notice any real difference before)

Normally you'd expect them in the status "ERROR 2006: MySQL server has gone
away
No connection. Trying to reconnect..."

However, i got: "ERROR 2013: Lost connection to MySQL server during query"

Both client and server think the connection is active, but for one reason or
another they fail.

in the server's processlist you'll see the anomalial client for a while. The
client just reconnects using a new socket resource.

So, i can test if the function succeeds, i could test if had a reconnection
error, but: why should i test if the function is supposed to reconnect by
itself... and then fails ???
imho the result should be false because: - the server is really unavailable
or: - the query is invalid.

however it's not only libmysql.dll that suffers from this problem, it's also
the (original) client...

regards,

rene

----- Original Message -
From: "Boulat Khakimov" <[EMAIL PROTECTED]>
To: "René Tegel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 1:11 AM
Subject: Re: connection lost on long-distance connection


> Hi,
>
> Here is the way I would fix that problem
> (assuming you're a programmer)
>
>
> write a simple function check_connection(MYSQL **conn) for example.
> that will issue a query "SELECT NOW()" to mysql, if that query fails
> that means connection to mySQL has gone away and the function has to
> reconnects to mySQL, if not then life is good and the function
> exits without having to do anything else.
>
> Now after writing that function, call it right before executing
> any query in your program.
>
> Regards,
> SC
>
>
>
> --
> Nothing Like the Sun
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: apostrophe ....

2001-03-14 Thread René Tegel

Rolf,

i asked my college "did you use the original ini" ?  "yes, i did." he said,
" i only changed some layout".
for myself i changed some parameters on this .ini file like max execution
time and max upload time, nothing more.

excuse me for not verifying further but as far as i see this php.ini
dramatacally changes with any version.

sorry mysql list, it has in fact nothing to do with mysql.. but it took me
several hours on several days within the last year...

- Original Message -
From: "Rolf Hopkins" <[EMAIL PROTECTED]>
To: "René Tegel" <[EMAIL PROTECTED]>; "Eric Fitzgerald" <[EMAIL PROTECTED]>;
"Randy Johnson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 12:40 AM
Subject: Re: apostrophe 


>
> - Original Message -
> From: "René Tegel" <[EMAIL PROTECTED]>
> To: "Rolf Hopkins" <[EMAIL PROTECTED]>; "Eric Fitzgerald"
> <[EMAIL PROTECTED]>; "Randy Johnson" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, March 14, 2001 18:48
> Subject: Re: apostrophe 
>
>
> > tx Rolf!
> >
> > Yes, indeed. by default, on the newest releases of the php.ini file,
> > magic_quotes_gpc is turned off.
>
> uh...umm...  I think you mean "on" not "off"
> O  |  O
> \/
>
>
>
> > Of course one can switch it on/off running single scripts. The ini file
in
> > fact mentions in the introduction that is has changed.
> >
> > but.. why does php change default parameters, especially when releasing
> > minor upgrades/patch levels. This stuff can take loads of time from the
> > programmer, just by changing platform version from v4.01 to 4.04pl1
> >
>
> Don't know why.  Maybe the php list is getting too many questions on how
to
> insert "special" character into  "M y S Q L"  :))) so they decided to
change
> it for those who are too lazy to read the manual and find out about
> addslashes.
>
> But whatever there reason, it sure makes it harder for the rest of us.
>
> >
> > regards,
> >
> > rene
> >
> >
> > - Original Message -
> > From: "Rolf Hopkins" <[EMAIL PROTECTED]>
> > To: "René Tegel" <[EMAIL PROTECTED]>; "Eric Fitzgerald" <[EMAIL PROTECTED]>;
> > "Randy Johnson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 14, 2001 1:27 AM
> > Subject: Re: apostrophe 
> >
> >
> > > Or you can fix your php by turning off the magic_quotes_gpc flag.  You
> > then
> > > won't need to change your code.
> > >
> > > Check out http://www.php.net/manual/en/configuration.php on how to do
> > this.
> > > I have provided an example on how to do this with apache running on a
> > linux
> > > machine.
> > >
> > > - Original Message -
> > > From: "René Tegel" <[EMAIL PROTECTED]>
> > > To: "Eric Fitzgerald" <[EMAIL PROTECTED]>; "Randy Johnson"
> > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 14, 2001 2:56
> > > Subject: Re: apostrophe 
> > >
> > >
> > > > this was true on php 4.01 but not on php 4.04pl1, i have to escape
my
> > > > strings again. or it's some switch or conf setting i never
> > > > seen/heard/thought of...
> > > >
> > > > i now use $var=addslashes($var) on php4.0.4pl1 redhat 7 where i do
not
> > > have
> > > > to on a other system running php4.0.1 redhat 6.2 !
> > > >
> > > > especially php seems to have loads of undocumented - and worse,
> > changing,
> > > > behaviour.
> > > >
> > > > regards,
> > > >
> > > > rene
> > > >
> > > > - Original Message -
> > > > From: "Eric Fitzgerald" <[EMAIL PROTECTED]>
> > > > To: "Randy Johnson" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > > > Sent: Tuesday, March 13, 2001 7:15 PM
> > > > Subject: Re: apostrophe 
> > > >
> > > >
> > > > > Two things here.
> > > > >
> > > > > First off, we had this problem spring up on us, and I think I may
> know
> > > why
> &

connection lost on long-distance connection

2001-03-14 Thread René Tegel

I've ran into some problems when connecting to a mysql server over a
long-distance connection (i.e.: the internet). The first time a client
reconnects from a idle connection this reconnect fails, only the second time
it succeeds.
The main problem is that i've written a win32 app that connects to this
server. Normally the client and server will be on a LAN but i test the
program on a their database from my place. I use libmysql.dll for this. (no
odbc!)
Normally i relied on libmysql.dll to reconnect when a connection was lost,
on a lan this never gave any problem but now it does, giving my app no
result set on a particulair query after been idle for a while, and thus
introducing bugs.

I am able to reproduce this with the standard mysql client. Both the win32
and the linux client behave the same.

Tech info:
server running mysql 3.23.32 win32 binary distribution
Client app is behind a firewall, MySQL server is directly connected to the
internet. Telnet or other sessions normally remain alive through my
firewall.
ping trip-around time: about 200ms, however sometimes loads of packet loss
(possible cause?)

Just after a connection everything is fine:

mysql> show processlist;
+-+---++--+-+--+---+
--+
| Id  | User  | Host   | db   | Command | Time | State |Info
|
+-+---++--+-+--+---+
--+
| 429 | admin | cx.upc-c.chello.nl | NULL | Query   | 0| NULL  |show
processlist |
+-+---++--+-+--+---+
--+
1 row in set (0.21 sec)

Then if a leave the client for a while (say: ten minutes) the connection is
gone:

mysql> show processlist;
ERROR 2013: Lost connection to MySQL server during query
mysql> show processlist;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:430
Current database: *** NONE ***

+-+---++--+-+--+---+
--+
| Id  | User  | Host   | db   | Command | Time | State |Info
|
+-+---++--+-+--+---+
--+
| 429 | admin | cx.upc-c.chello.nl | NULL | Sleep   | 2732 |   |NULL
|
| 430 | admin | cx.upc-c.chello.nl | NULL | Query   | 0| NULL  |show
processlist |
+-+---++--+-+--+---+
--+
2 rows in set (5.99 sec)

So, the server still thinks i've got an active connection. this list keeps
on growing.

For as far as I can see, my win32 app behaves the same as the mysql client.
It'll try to reconnect but it fails, only second time it succesfully
reconnects.

I ported my app from interbase to mysql. with interbase i did not have this
connection problem, but it's so terribly slow on many queries/ larger result
sets (interbase fetches a result field by field, generating numerous network
packets...)
I also have some PHP scripts that connect to this server, running in win32
cgi mode. They do behave normally, i guess because they have to connect
every time (i.e.: no persistant connections for win32 w/o isapi) they are
called.

When not idle (i.e. active querying) everything behaves normal and i notice
no errors at all, not even on heavy load.

Any ideas / solution would be really appreciated

thanx in advance,

rene




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

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




Re: win to linux

2001-03-14 Thread René Tegel

use ftp to copy your database/table files :)

- Original Message -
From: "rozakdemir" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 10:05 PM
Subject: win to linux


Hello,

I am using MySQL on windows platform. How can I port mt datas from MySQL
server on windows to MySQl server on Linux?

Thanks for all.



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

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




Re: setting simple mysqld options in /etc/my.cnf

2001-03-14 Thread René Tegel

you chowned mysql.cnf to owner/group mysql ?

- Original Message -
From: "Bill Marrs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 1:16 PM
Subject: setting simple mysqld options in /etc/my.cnf


> Hi,
>
> I like to run mysqld with these 3 options:
>
> --log-slow-queries
> --delay-key-write-for-all-tables
> --skip-networking
>
> But, so far, I've been unable to get mysqld to read them out of
/etc/my.cnf.
> Here's what's inside my /etc/my.cnf:
>
> [mysql.server]
> log-slow-queries
> delay-key-write-for-all-tables
> skip-networking
>
> Am I doing this wrong?
>
> I looked, but I didn't find any documentation of how to format simple
> options like this in /etc/my.cnf.   ...or perhaps, I have them under the
> wrong header (is "mysql.server" correct?)
>
> ...or perhaps I just can't set these options in /etc/my.cnf.  Currently, I
> set them by editing the mysql start script, adding them to the safe_mysqld
> line.
>
> Any help would be appreciated.
>
> -bill
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




connection lost on long-distance connection

2001-03-14 Thread René Tegel

I've ran into some problems when connecting to a mysql server over a
long-distance connection (i.e.: the internet). The first time a client
reconnects from a idle connection this reconnect fails, only the second time
it succeeds.
The main problem is that i've written a win32 app that connects to this
server. Normally the client and server will be on a LAN but i test the
program on a their database from my place. I use libmysql.dll for this. (no
odbc!)
Normally i relied on libmysql.dll to reconnect when a connection was lost,
on a lan this never gave any problem but now it does, giving my app no
result set on a particulair query after been idle for a while, and thus
introducing bugs.

I am able to reproduce this with the standard mysql client. Both the win32
and the linux client behave the same.

Tech info:
server running mysql 3.23.32 win32 binary distribution
Client app is behind a firewall, MySQL server is directly connected to the
internet. Telnet or other sessions normally remain alive through my
firewall.
ping trip-around time: about 200ms, however sometimes loads of packet loss
(possible cause?)

Just after a connection everything is fine:

mysql> show processlist;
+-+---++--+-+--+---+
--+
| Id  | User  | Host   | db   | Command | Time | State |
Info  |
+-+---++--+-+--+---+
--+
| 429 | admin | cx.upc-c.chello.nl | NULL | Query   | 0| NULL  |
show processlist |
+-+---++--+-+--+---+
--+
1 row in set (0.21 sec)

Then if a leave the client for a while (say: ten minutes) the connection is
gone:

mysql> show processlist;
ERROR 2013: Lost connection to MySQL server during query
mysql> show processlist;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:430
Current database: *** NONE ***

+-+---++--+-+--+---+
--+
| Id  | User  | Host   | db   | Command | Time | State |
Info  |
+-+---++--+-+--+---+
--+
| 429 | admin | cx.upc-c.chello.nl | NULL | Sleep   | 2732 |   |
NULL  |
| 430 | admin | cx.upc-c.chello.nl | NULL | Query   | 0| NULL  |
show processlist |
+-+---++--+-+--+---+
--+
2 rows in set (5.99 sec)

So, the server still thinks i've got an active connection. this list keeps
on growing.

For as far as I can see, my win32 app behaves the same as the mysql client.
It'll try to reconnect but it fails, only second time it succesfully
reconnects.

I ported my app from interbase to mysql. with interbase i did not have this
connection problem, but it's so terribly slow on many queries/ larger result
sets (interbase fetches a result field by field, generating numerous network
packets...)
I also have some PHP scripts that connect to this server, running in win32
cgi mode. They do behave normally, i guess because they have to connect
every time (i.e.: no persistant connections for win32 w/o isapi) they are
called.

When not idle (i.e. active querying) everything behaves normal and i notice
no errors at all, not even on heavy load.

Any ideas / solution would be really appreciated

thanx in advance,

rene





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

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

2001-03-14 Thread René Tegel

tx Rolf!

Yes, indeed. by default, on the newest releases of the php.ini file,
magic_quotes_gpc is turned off.
Of course one can switch it on/off running single scripts. The ini file in
fact mentions in the introduction that is has changed.

but.. why does php change default parameters, especially when releasing
minor upgrades/patch levels. This stuff can take loads of time from the
programmer, just by changing platform version from v4.01 to 4.04pl1


regards,

rene


- Original Message -
From: "Rolf Hopkins" <[EMAIL PROTECTED]>
To: "René Tegel" <[EMAIL PROTECTED]>; "Eric Fitzgerald" <[EMAIL PROTECTED]>;
"Randy Johnson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 14, 2001 1:27 AM
Subject: Re: apostrophe 


> Or you can fix your php by turning off the magic_quotes_gpc flag.  You
then
> won't need to change your code.
>
> Check out http://www.php.net/manual/en/configuration.php on how to do
this.
> I have provided an example on how to do this with apache running on a
linux
> machine.
>
> - Original Message -
> From: "René Tegel" <[EMAIL PROTECTED]>
> To: "Eric Fitzgerald" <[EMAIL PROTECTED]>; "Randy Johnson"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, March 14, 2001 2:56
> Subject: Re: apostrophe 
>
>
> > this was true on php 4.01 but not on php 4.04pl1, i have to escape my
> > strings again. or it's some switch or conf setting i never
> > seen/heard/thought of...
> >
> > i now use $var=addslashes($var) on php4.0.4pl1 redhat 7 where i do not
> have
> > to on a other system running php4.0.1 redhat 6.2 !
> >
> > especially php seems to have loads of undocumented - and worse,
changing,
> > behaviour.
> >
> > regards,
> >
> > rene
> >
> > - Original Message -
> > From: "Eric Fitzgerald" <[EMAIL PROTECTED]>
> > To: "Randy Johnson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 13, 2001 7:15 PM
> > Subject: Re: apostrophe 
> >
> >
> > > Two things here.
> > >
> > > First off, we had this problem spring up on us, and I think I may know
> why
> > > it's doing it to you.  If your using PHP, the more recent version
> > > automatically escape out variables sent to the mysql driver.  Thus
> randy's
> > > is converted to randy's.  HOWEVER, if you still have old code where
you
> > ran
> > > things through addslashes, it turns out like to look like randy\\\'s.
> > Which
> > > ends up being stored as randy\'s.
> > >
> > > To correct this, first fix your code, then run the following query:
> > >
> > > UPDATE table SET fieldname = REPLACE(fieldname,'\\','');
> > >
> > >
> > > - Original Message -
> > > From: "Randy Johnson" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 13, 2001 9:54 AM
> > > Subject: apostrophe 
> > >
> > >
> > > > When a text with an apostrophe in it has a \'  in it.  How can I fix
> > this?
> > > >
> > > >
> > > > example
> > > >
> > > > randy's is stored in the DB as randy\'s
> > > >
> > > >
> > > > thanks
> > > >
> > > > Randy
> > > >
> > > >
> > > >
> > > >
> > >
> -
> > > > Before posting, please check:
> > > >http://www.mysql.com/manual.php   (the manual)
> > > >http://lists.mysql.com/   (the list archive)
> > > >
> > > > 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.my

Re: apostrophe ....

2001-03-13 Thread René Tegel

this was true on php 4.01 but not on php 4.04pl1, i have to escape my
strings again. or it's some switch or conf setting i never
seen/heard/thought of...

i now use $var=addslashes($var) on php4.0.4pl1 redhat 7 where i do not have
to on a other system running php4.0.1 redhat 6.2 !

especially php seems to have loads of undocumented - and worse, changing,
behaviour.

regards,

rene

- Original Message -
From: "Eric Fitzgerald" <[EMAIL PROTECTED]>
To: "Randy Johnson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 7:15 PM
Subject: Re: apostrophe 


> Two things here.
>
> First off, we had this problem spring up on us, and I think I may know why
> it's doing it to you.  If your using PHP, the more recent version
> automatically escape out variables sent to the mysql driver.  Thus randy's
> is converted to randy's.  HOWEVER, if you still have old code where you
ran
> things through addslashes, it turns out like to look like randy\\\'s.
Which
> ends up being stored as randy\'s.
>
> To correct this, first fix your code, then run the following query:
>
> UPDATE table SET fieldname = REPLACE(fieldname,'\\','');
>
>
> - Original Message -
> From: "Randy Johnson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 13, 2001 9:54 AM
> Subject: apostrophe 
>
>
> > When a text with an apostrophe in it has a \'  in it.  How can I fix
this?
> >
> >
> > example
> >
> > randy's is stored in the DB as randy\'s
> >
> >
> > thanks
> >
> > Randy
> >
> >
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > 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: Errors in PHP after upgrading to MySQL 3.23.34

2001-03-12 Thread René Tegel

Sorry, it appears to be _not_ a bug in mysql 3.23.34 but a conflict with the
apache module mod_auth_mysql.

It's still weird since i only noticed after installing 3.23.34, and had no
problems herefore.
Downgrading to a earlier version however did not solve the problem!
My collegue installed the mod_auth_mysql this weekend and did not experience
any problem as well.

So there sure is some kind of conflict which I wouldn't dare to tell which,
but it probably is not mysql 3.23.34 to blame!

regards,

rene

- Original Message -----
From: "René Tegel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 6:19 AM
Subject: Errors in PHP after upgrading to MySQL 3.23.34


> I installed the MySQL 3.23.34-1 rpm on my redhat 7 box. It all seemed to
> work fine, but suddenly i got this error in numerous of my php scripts. it
> happens only on update and insert statements. The data however might have
> been stored in the db.
>
> Warning: MySQL: Unable to save result set in /var/www/html/sub.php on line
> 34
>
> when i look in the mysql error log i see such lines on some of the failed
> query's:
>
> 010312  6:04:13  Aborted connection 196 to db: 'logboek' user: 'html'
host:
> `localhost' (Got an error reading communication packets)
>
> i'm especially wondering about the connection id, this seems to increase
at
> every connection, however from my php scripts I make a persistant
> connection.
>
> Is this a incompatability issue of the php interface to mysql? ifso, must
i
> re-compile my php binary after upgrading to 3.23.34?
>
> Fortunately it's not a production machine yet.
>
> thanx in advance,
>
> rene
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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




Errors in PHP after upgrading to MySQL 3.23.34

2001-03-11 Thread René Tegel

I installed the MySQL 3.23.34-1 rpm on my redhat 7 box. It all seemed to
work fine, but suddenly i got this error in numerous of my php scripts. it
happens only on update and insert statements. The data however might have
been stored in the db.

Warning: MySQL: Unable to save result set in /var/www/html/sub.php on line
34

when i look in the mysql error log i see such lines on some of the failed
query's:

010312  6:04:13  Aborted connection 196 to db: 'logboek' user: 'html' host:
`localhost' (Got an error reading communication packets)

i'm especially wondering about the connection id, this seems to increase at
every connection, however from my php scripts I make a persistant
connection.

Is this a incompatability issue of the php interface to mysql? ifso, must i
re-compile my php binary after upgrading to 3.23.34?

Fortunately it's not a production machine yet.

thanx in advance,

rene



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

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: May I ask for your assistance?

2001-03-11 Thread René Tegel


- Original Message -
From: "René Tegel" <[EMAIL PROTECTED]>
To: "Thomas Morton" <[EMAIL PROTECTED]>
Sent: Sunday, March 11, 2001 8:42 PM
Subject: Re: May I ask for your assistance?


> Thomas,
>
> as far as i know, i didn't notice _any_ difference in the behaviour if
mysql
> on linux or win32. i seems like it behaves entirely the same, which maybe
> not true for some minor issues but is true for sql syntax and other things
> (user rights and so) you'd like to do. In fact you should be able to just
> ftp your databases between linux and win32 and use them.
> gl,
>
> rene
>
> - Original Message -
> From: "Thomas Morton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 11, 2001 7:50 PM
> Subject: May I ask for your assistance?
>
>
> Dear Sir or Madam,
>
> Re: Installation MySQL version 3.23.22-beta.
>
> I am awfully sorry to bother you with some basics.  I am a novice.  I am
> trying to use the above on my PC which is running on Windows 98.  In
> WinMySQLAdmin, my.ini set up appears complete.  I have looked at the
> starting tutorial in the manual which I downloaded along with the above
but
> I do not find your instructions very helpful.  (shell> suggests you have
> written the manual for Unix users?) Will I be able to enjoy the benefit of
> this software in my current Windows environment?  Is it necessary for me
to
> run my PC either on Windows NT or Windows 2000 to have the full benefit of
> your SQL software?
>
> Your kind reply, however brief, would be very much appreciated.
>
> Regards,
>
> Thomas Morton
> Flat 18
> 9 Chenies Street
> London
> WC1E 7ET
>
>
>


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

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: troubles with joining list

2001-03-07 Thread René Tegel

Well yes, i had troubles with the list as well - i did not see any message
on nor the mysql list nor the win32-mysql list... i figured i could be our
is' mail server, so i offered to join the list with another e-mail account.
I only got it confirmed after >> 24 hours...

So there are networking problems going on, but I couldn't dare to tell where
the problem is. As far as i noticed the list just continued this week-end.

So, my guess is: some traffic jam on the internet.

Maybe others experienced problems as well..

regards,

rene


- Original Message -
From: "Network" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 06, 2001 11:06 AM
Subject: troubles with joining list


>
> I don't see an address for the list owner so I'm mailing this here in hope
of
> getting help.  Why is the connection constantly resetting and not allowing
me to
> join the list?
>
> This mail also serves as a test to see if I can post to the list without
joining
> via [EMAIL PROTECTED]
>
> Mar  6 04:34:49 Imani sendmail[90483]: f269Hm190455:
> to=<[EMAIL PROTECTED]>,
ctladdr=<[EMAIL PROTECTED]>
> (1000/69), delay=00:17:01, xdelay=00:05:00, mailer=esmtp, pri=120439,
> relay=lists.mysql.com. [192.58.197.162], dsn=4.0.0, stat=Deferred:
Connection
> reset by lists.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




"set password"

2001-02-26 Thread René Tegel

The documentation describes the use of "set password = password ('newpass')
as:
"PASSWORD = PASSWORD('some password')
Set the password for the current user. Any non-anonymous user can change his
own password!"

Well, nice I thought, a user can change it's password without having access
rights to mysql db as I presume.

However, when i try to do so (i tried 2 users: a 'power' user with all
privileges and a restricted user) i get the error:
"mysql> set password = password('test');
ERROR 1133: Can't find any matching row in the user table"

however, the logged on user does exist (of course), with appropiate hostname
(set to fixed ip address, not a range).

Any clue?

Sysinfo:
server: mysql v. 3.23.32 on NT4 sp6a
client: mysql v.3.23 on w2kpro sp1




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

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: + or - in place of = does what???

2001-02-19 Thread René Tegel

i guess the calculation returns a result (ie: whether it's successfull or
not), so '1-1' evaluates true; but 1-A evaluates false because A is not a
number so you can't calculate on it.

So in your case, this would be:
where user_num+"AL011-33"
if user_num='0':
  where '0'="%any%"; /// returns True;
if user_num='Xxx':
 where NAN= any...; /// returns False

makes some sense..if user_num is valid to calculate with %any% other value,
comparison returns true, elsewise false.


- Original Message -
From: "Jordan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001-02-19 11:29 PM
Subject: + or - in place of = does what???


> First time here, sorry if this is too much of a novice question to get
> answered...
>
> I just sent the command:
>
> DELETE FROM users WHERE user_num+"AL011-33";
>
> by accident (I meant to use an "=" not the "+").  It killed 81 rows.  I
> restored the data, but I couldn't find anything in the docs about what
that
> command actually did.
>
> After restoring the data, I ran the command again (substituting SELECT for
> DELETE) and it looks like it gives me all the users that have user_num
that
> start with a number rather than a letter.  I got the same results
> regardless of whether I sent the command with a "-" or a "+".  What gives?
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Unable to designate host

2001-02-18 Thread René Tegel

You did use

 flush privileges;

after inserting the new users? elsewise mysql won't recognize them until a
restart.

- Original Message -
From: "Michael Fischer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001-02-18 7:55 AM
Subject: Unable to designate host


>
> Ok, I looked through the archive, unsuccessfully.
>
> Here's the "problem":
>
> I rebuilt a machine running a MySQL db, and stupidly
> only backed up the user-oriented databases, and not
> the mysql administrative ones. Nonetheless, I went
> back in and used the guiclient to do the appropriate
> grants. After frustration, I removed those rows,
> and repeated on the command line the exact statement
> I had used to get the original up and running:
>
> GRANT select, insert, update, delete
> ONdbname.*
> TOnonrootuser@'%'
> IDENTIFIED BY 'password';
>
> Now I discover that no matter how I set the hostnames
> in the mysql db tables, ( hostname, hostname.domain.tld,
> or "%" ) only root@localhost works. Hrmf!
>
> This becomes a real pain when the client app is on a
> different machine, of course
>
> Running SuSE 7.0
>
> Can I trust that the value returned by the 'hostname'
> command is what I want for the value of the host columns
> in the mysql db? If so, what might I have done wrong?
>
> Suggestions?
>
> TIA.
>
> Michael Fischer
> --
> [EMAIL PROTECTED]
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: Can't connect in Windows 2000

2001-02-15 Thread René Tegel

> Sometimes it says something like 'NTLM authentication
> required'. I have IIS 5 installed. Does anyone know what I can do to
> connect?

well yes (although this is in fact not mysql related).

w2k offers it's own telnet server, very handy to connect to a w2k machine
with the command prompt (and to run mysql, i presume).

What you need is the w2k telnet client, this allows NTLM authentication. Any
other telnet client just won't work!

So, suppose you use win98 to connect, then copy from the w2k machine the
exe:
c:\winnt\system32\telnet.exe
It probably just runs on any other windows (9x, nt) platform.

Also notice the the _current logged on user_  and it's password (on client
side) are used to connect to NT.
So, on the w2k machine must exist a user account with the same username and
password as how you logged on to your client.

You might want to use different telnet clients for win and linux as well,
since win telnet client is not that great to logon and work with linux (no
function keys, ansi etc etc)

good luck,

rene

- Original Message -
From: "James T Fielding" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001-02-15 12:56 PM
Subject: Can't connect in Windows 2000


> I have installed Mysql on my Windows 2000 machine and everything seems to
be
> working fine. However, when I try to telnet using the ip address on port
23
> it won't connect. Sometimes it says something like 'NTLM authentication
> required'. I have IIS 5 installed. Does anyone know what I can do to
> connect?
>
> Many thanks
>
> James
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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: executing script file

2001-02-15 Thread René Tegel

easy:

linux/unix:
mysql -h myhost -u myuser -p [mydatabase] < mysqcript.sql

nt:
type myscript.sql | mysql -h myhost -u myuser [mydatabase]

where "mydatabase" is optional.

tip: read the manual, it's all in there :)

gl

rene


- Original Message -
From: "Andris Jancevskis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001-02-15 10:57 AM
Subject: executing script file


> Hi,
>
>   I didn't find any information on possibility to execute script file.
>   On oracle it is possible via @file_name command from client.
>   Is it possible on mysql? I want to update 3 different databases
>   to keep these equvalent.
>
> TIA,
> --
> Andris
> mailto:[EMAIL PROTECTED]
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: problems running mySQL via Telnet

2001-02-07 Thread René Tegel

i agree .. the mysql server _should_ accept telnet sessions. Maybe in a
future release ? it'd really be very handy

- Original Message -
From: "Quentin Bennett" <[EMAIL PROTECTED]>
To: "'@ndYD'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 7:56 PM
Subject: RE: problems running mySQL via Telnet


> Hi,
>
> You don't connect to mysql server using telnet, you use the mysql command
> line client 'mysql'.
>
> Regards
>
> Quentin
>
> -Original Message-
> From: @ndYD [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 8 February 2001 07:13
> To: [EMAIL PROTECTED]
> Subject: problems running mySQL via Telnet
>
>
> Hello,
>
> server version: 3.22.34-shareware-debug
> OS: Windows 98
>
> I tried to access the mySQL- server via the Win-Telnet Client.
>
> If the connection is established, the following mysterious string appears:
>
> (
>  3.22.34-shareware-debugk7qS,~Z),
>
> After that, I entered some characters.
> Then the connection will be closed by the server and the error string "Bad
> Handshake" appears.
>
> Question:
> Is this feature (Telnet) not available in the shareware-version. Or is
this
> a basically problem?
>
> Thanks in advance for all tips.
>
> Regards
> Andy
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> The information contained in this email is privileged and confidential
> and intended for the addressee only. If you are not the intended
> recipient, you are asked to respect that confidentiality and not
> disclose, copy or make use of its contents. If received in error
> you are asked to destroy this email and contact the sender immediately.
> Your assistance is appreciated.
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: MySQL driver for DELPHI ?

2001-02-06 Thread René Tegel

Well, depends how you want to connect.
For example, if you have the mysql odbc driver, you could use odbc to
connect.
However, i personally prefer to use libmysql.dll, with a delphi interface
file.
I can send you the interface file i use if you want (originally written by
bob silva, but i adjusted some); but i know there are some minor 'faults' in
it, however, it works.
You can also look at mysql homepage - win 32 - contributed. Somebody made a
component out of this header file, looks good to me.

Regards,

rene
- Original Message -
From: "Paulo Serra" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 3:40 PM
Subject: MySQL driver for DELPHI ?



I am a DELPHI developer and I need to know if exists
a MySQL driver for DELPHI.

Does MySQL have a driver for DELPHI???

   If it does, please send me it...

   My e-mails:  [EMAIL PROTECTED]
[EMAIL PROTECTED]

   ... at least I´d like to know if it does or it
doesn´t and where I can find it.


__
Acesso fácil, rápido e ilimitado? Suporte 24hs? R$19,90?
Só no AcessoBOL. http://www.bol.com.br/acessobol/



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

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: amazingly slow

2001-02-06 Thread René Tegel

Tim,

Hmmm... so you are suggesting the format of the query might be the cause of
this slow response. I find it hard to believe, unless you have a very big
result set i believe the query should complete within short time.

can you send the output of DESCRIBE db.tablename of all used tables?

regards,

rene



- Original Message -
From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
To: "René Tegel" <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 3:07 PM
Subject: Re: amazingly slow



Yep, all requested fields are indexed.

At 02:25 PM 6-2-2001 +0100, you wrote:
>Tim,
>Just kidding about the 513 Mb
>
>you put an index on wordindex.word as well ? (it's not in the table
>description but you use it in your query...Not indexing this field means
>mysql searches whole table for values.. Then your P800 has a reasonable
>performance on such a big table :)) )
>
>regards,
>
>rene
>
>- Original Message -
>From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
>To: "René Tegel" <[EMAIL PROTECTED]>
>Sent: Tuesday, February 06, 2001 1:58 PM
>Subject: Re: amazingly slow
>
>
>
>
>Dear René,
>
>Thanks for your reply.
>
>Oops, the 513 was a typing mistake.
>
>And yes, all the requested fields are indexed.
>
>
>CREATE TABLE wordindex (
>   WordNumber int(11) NOT NULL,
>   RecordNumber int(11) NOT NULL,
>   KEY WordNumber (WordNumber),
>   KEY RecordNumber (RecordNumber)
>);
>
>CREATE TABLE books (
>   RecordNumber int(11) NOT NULL auto_increment,
>   Field1 varchar(60) NOT NULL,
>   Field2 varchar(60) NOT NULL,
>   Field3 varchar(60) NOT NULL,
>   Field4 varchar(60) NOT NULL,
>   Field5 varchar(60) NOT NULL,
>   Price bigint(20) unsigned NOT NULL,
>   PRIMARY KEY (RecordNumber),
>   KEY Price (Price)
>);
>
>Any suggestions are very welcome.
>
>Tim
>
>At 01:51 PM 6-2-2001 +0100, you wrote:
>>Tim,
>>
>>1. i'd remove 1 Mb from your 513 Mb machine... maybe it's an very old edo
>>simm or something.
>>2. you put an index on all requested fields (maintable.recordnumber and
>>wordindex.word) ? I bet not.
>>
>>
>>- Original Message -
>>From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Tuesday, February 06, 2001 12:04 PM
>>Subject: amazingly slow
>>
>>
>>>
>>>
>>> Hello, I don't understand why my queries are so incredibly slow.
>>> We have MySQL on a 800MHz Linux machine with 513Mb.
>>> Most queries look like this:
>>>
>>> SELECT B.* FROM maintable AS M, wordindex AS YL1,
>>>wordindex AS YL2, wordindex AS YL3
>>> WHERE
>>>   YL1.Word = 'billy' AND
>>>   YL1.RecordNumber = M.RecordNumber AND
>>>   YL2.Word = 'bob' AND
>>>   YL2.RecordNumber = M.RecordNumber AND
>>>   YL3.Word = 'john' AND
>>>   YL3.RecordNumber = M.RecordNumber AND
>>>   M.Price >= 1000
>>> LIMIT 0,50;
>>>
>>> wordindex is a table that contains all words present in maintable.
>>> For each word there is a link to maintable through RecordNumber.
>>>
>>> This query searches for all records in maintable that contain the
>>> three words and where it's price is more than 1000.
>>>
>>> This query takes more than 20 seconds!
>>> I hear from others that this query should be returned in a flash!
>>>
>>> maintable contains about 900,000 records.
>>> wordindex contains about 21,000,000 records
>>>
>>> All columns are indexed.
>>>
>>> Here are my parameters:
>>>
>>> key_buffer=256M
>>> table_cache=256
>>> sort_buffer=1M
>>> record_buffer=2M
>>> join_buffer=4M
>>> max_sort_length=30
>>> max_connections=300
>>>
>>> I am really desperate. I've been trying everything.
>>> I've tried the OPTIMIZE TABLE commands, but this also doesn't help.
>>>
>>> Anyone out there who wants to save me and our company?
>>>
>>> Thanks a lot!
>>>
>>> Tim
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -
>>> Before posting, please check:
>>>http://www.mysql.com/manual.php   (the manual)
>>>http://lists.mysql.com/   (the list archive)
>>>
>>> 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: amazingly slow

2001-02-06 Thread René Tegel

Tim,
Just kidding about the 513 Mb

you put an index on wordindex.word as well ? (it's not in the table
description but you use it in your query...Not indexing this field means
mysql searches whole table for values.. Then your P800 has a reasonable
performance on such a big table :)) )

regards,

rene

- Original Message -
From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
To: "René Tegel" <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 1:58 PM
Subject: Re: amazingly slow




Dear René,

Thanks for your reply.

Oops, the 513 was a typing mistake.

And yes, all the requested fields are indexed.


CREATE TABLE wordindex (
   WordNumber int(11) NOT NULL,
   RecordNumber int(11) NOT NULL,
   KEY WordNumber (WordNumber),
   KEY RecordNumber (RecordNumber)
);

CREATE TABLE books (
   RecordNumber int(11) NOT NULL auto_increment,
   Field1 varchar(60) NOT NULL,
   Field2 varchar(60) NOT NULL,
   Field3 varchar(60) NOT NULL,
   Field4 varchar(60) NOT NULL,
   Field5 varchar(60) NOT NULL,
   Price bigint(20) unsigned NOT NULL,
   PRIMARY KEY (RecordNumber),
   KEY Price (Price)
);

Any suggestions are very welcome.

Tim

At 01:51 PM 6-2-2001 +0100, you wrote:
>Tim,
>
>1. i'd remove 1 Mb from your 513 Mb machine... maybe it's an very old edo
>simm or something.
>2. you put an index on all requested fields (maintable.recordnumber and
>wordindex.word) ? I bet not.
>
>
>- Original Message -
>From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, February 06, 2001 12:04 PM
>Subject: amazingly slow
>
>
>>
>>
>> Hello, I don't understand why my queries are so incredibly slow.
>> We have MySQL on a 800MHz Linux machine with 513Mb.
>> Most queries look like this:
>>
>> SELECT B.* FROM maintable AS M, wordindex AS YL1,
>>wordindex AS YL2, wordindex AS YL3
>> WHERE
>>   YL1.Word = 'billy' AND
>>   YL1.RecordNumber = M.RecordNumber AND
>>   YL2.Word = 'bob' AND
>>   YL2.RecordNumber = M.RecordNumber AND
>>   YL3.Word = 'john' AND
>>   YL3.RecordNumber = M.RecordNumber AND
>>   M.Price >= 1000
>> LIMIT 0,50;
>>
>> wordindex is a table that contains all words present in maintable.
>> For each word there is a link to maintable through RecordNumber.
>>
>> This query searches for all records in maintable that contain the
>> three words and where it's price is more than 1000.
>>
>> This query takes more than 20 seconds!
>> I hear from others that this query should be returned in a flash!
>>
>> maintable contains about 900,000 records.
>> wordindex contains about 21,000,000 records
>>
>> All columns are indexed.
>>
>> Here are my parameters:
>>
>> key_buffer=256M
>> table_cache=256
>> sort_buffer=1M
>> record_buffer=2M
>> join_buffer=4M
>> max_sort_length=30
>> max_connections=300
>>
>> I am really desperate. I've been trying everything.
>> I've tried the OPTIMIZE TABLE commands, but this also doesn't help.
>>
>> Anyone out there who wants to save me and our company?
>>
>> Thanks a lot!
>>
>> Tim
>>
>>
>>
>>
>>
>>
>>
>>
>> -
>> Before posting, please check:
>>http://www.mysql.com/manual.php   (the manual)
>>http://lists.mysql.com/   (the list archive)
>>
>> 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: amazingly slow

2001-02-06 Thread René Tegel

 Tim,

 1. i'd remove 1 Mb from your 513 Mb machine... maybe it's an very old edo
 simm or something.
 2. you put an index on all requested fields (maintable.recordnumber and
 wordindex.word) ? I bet not.


> - Original Message -
> From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 06, 2001 12:04 PM
> Subject: amazingly slow
>
>
> >
> >
> > Hello, I don't understand why my queries are so incredibly slow.
> > We have MySQL on a 800MHz Linux machine with 513Mb.
> > Most queries look like this:
> >
> > SELECT B.* FROM maintable AS M, wordindex AS YL1,
> >wordindex AS YL2, wordindex AS YL3
> > WHERE
> >   YL1.Word = 'billy' AND
> >   YL1.RecordNumber = M.RecordNumber AND
> >   YL2.Word = 'bob' AND
> >   YL2.RecordNumber = M.RecordNumber AND
> >   YL3.Word = 'john' AND
> >   YL3.RecordNumber = M.RecordNumber AND
> >   M.Price >= 1000
> > LIMIT 0,50;
> >
> > wordindex is a table that contains all words present in maintable.
> > For each word there is a link to maintable through RecordNumber.
> >
> > This query searches for all records in maintable that contain the
> > three words and where it's price is more than 1000.
> >
> > This query takes more than 20 seconds!
> > I hear from others that this query should be returned in a flash!
> >
> > maintable contains about 900,000 records.
> > wordindex contains about 21,000,000 records
> >
> > All columns are indexed.
> >
> > Here are my parameters:
> >
> > key_buffer=256M
> > table_cache=256
> > sort_buffer=1M
> > record_buffer=2M
> > join_buffer=4M
> > max_sort_length=30
> > max_connections=300
> >
> > I am really desperate. I've been trying everything.
> > I've tried the OPTIMIZE TABLE commands, but this also doesn't help.
> >
> > Anyone out there who wants to save me and our company?
> >
> > Thanks a lot!
> >
> > Tim
> >
> >
> >
> >
> >
> >
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>


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

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




Re: newbie: problem with "select in (select)"

2001-02-05 Thread René Tegel

go to www.codecity.com

mysql just does not support in :(((

it's good, but far for 'sql compliant'...

gl
rene

- Original Message -
From: "Henrik Lebtien Mohr" <[EMAIL PROTECTED]>
To: "MySQL List" <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 7:46 PM
Subject: newbie: problem with "select in (select)"


> Hi again
>
> If I try the following on my MySQL DB, I get an error:
>
> select user_id from tblUser where user_id in (select user_id from
> tblUserLink where group_id = xx)
>
> xx is an integer defining which group_id we want info on (mediumint(9))
> user_id in tblUser and tblUserLink is also defined as mediumint(9).
>
> tblUserLink is used to connect tblUser with tblGroup in a many-to-many
> relationship.
>
> Why doesn't it work? Please help.
>
> Thanks in advance, and kind regards,
> /Henrik Mohr - Denmark
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Setting up data model

2001-02-05 Thread René Tegel

If you mean you link table techadress to table domains, and then billing & admin 
adress to techadress, then i think you'r odd..
You should learn some about 'normalization', look for it on the web or in a book.

I'd suggest something like this:


Customer
client_id
clientaddr_id   
..details...

Domains
domain_id
client_id//references customer
techaddr_id//references addresses
billaddr_id// "
adminaddr_id//   "
name
type
...info...

Adresses
address_id
type
name
addr
city
country
.etc...

If you'd like to have more than three addresses, you just add an extra table, and skip 
the '..addr_id' 's from domains:

domainaddresses
da_id
domain_id
address_id
type

This table then links the domain to n addresses.

good luck,

rene



- Original Message - 
From: "Kevin O" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 6:31 PM
Subject: Setting up data model


> Hello all,
> 
> I've got a few questions about setting up a data model for a database I'm 
> creating.  I want to set it up to be most efficient and would like input 
> from anyone that has the time.
> 
> I'm setting up your basic customer database, except I'd like to allow for a 
> customer within a customer option.  Not everyone will have this, but for 
> those that choose to, it will be available.
> 
> Here is basically what I have:
> 
> 1) I'm a web hosting company and would like for each customer to have the 
> ability to have multiple domains under their account.  (this is the easy 
> part, just a basic customer database)
> 
> 2) Each domain however will need the ability to have up to 3 addresses 
> associated with it.  For example, Administrative, Technical and Billing 
> Contacts.
> 
> Now, the question is how do I set this up to be the most efficient storage 
> of the data?
> 
> My thought is
> 
> Main Customer Table
>   |
>   |
>   Domain Table
>|
>|
> TechAddress Table-- --AdminAddress Table
>|
>|
>   BillingAddress Table
> 
> Am I way off here?
> 
> I will be checking for things like if each of the addresses being entered 
> are the same as the main address in the main customer table.
> 
> I know this is very confusing.  Can someone please help?
> 
> Thanks,
> Kevin
> [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 



libMySQL.dll

2001-02-04 Thread René Tegel

I have some problems with the win32 interface dll libMySQL.dll.
Everything works out fine when only retrieving correct queries. 
However, when executing an incorrect query, everything behaves normal until i 
terminate the application (and thus unload the dll).

With other types of access (mysql console (linux, nt, gui) or PHP i notice no problems 
at all.

System: -libmySQL.dll for mysql 3.23 (date: 17-1-2001);
RedHat7, with the rpm of mysql 3.23 installed;
Windows 2000 pro SP1 workstation;
Programming environment: delphi 5.

My interface routines are based on the interface unit by Bob Silva, and like this:

TYPE
{some more type declarations}
 PMYSQL=^MYSQL;
 MYSQL= record
_net: NET;
host,user,passwd,unix_socket,server_version,host_info,info,db: pchar;
port,client_flag,server_capabilities,protocol_version,field_count: Cardinal;
thread_id, affected_rows, insert_id, extra_info:longint;
status: mysql_status;
fields: PMYSQL_FIELD;
field_alloc: MEM_ROOT;
free_me, reconnect: MY_BOOL;
   end;


function mysql_connect( _mysql: pmysql; const 
host,user,passwd:pchar):pmysql;stdcall;external 'libmysql.dll';

procedure mysql_close( _mysql: pmysql); stdcall;external thelib;



function Mysqlconnect(host, user, pass:String): Boolean;
var f:PMySQL;
begin
  f:=mysql_connect (@my_sql_db,PChar(host),PChar(user),PChar(pass));
  Result:= (@my_sql_db=f);
end;

procedure Mysqldisconnect;
begin
 mysql_close(@my_sql_db);
end;


Any ideas?




Re: Web Interface

2001-02-03 Thread René Tegel

You might want to try the php-nuke 'construction kit'. Looks good
(www.wageningen.org was build using this, take a look)

- Original Message -
From: "John Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 03, 2001 8:44 PM
Subject: Web Interface


> I'm running MySQL 3.22.32 on Linux.  I was wondering if anybody knew of a
> good robust program to put a web interface on a database so that it can be
> viewed and modified by people who don't know SQL syntax.
>
> Thanks,
> John
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Fw: system requirements?

2001-02-02 Thread René Tegel


- Original Message -
From: "René Tegel" <[EMAIL PROTECTED]>
To: "Jeff Harris" <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 9:09 PM
Subject: Re: system requirements?


> Jeff,
>
> yes the win32 version of mysql runs perfectly under nt.
>
> Some notes about mysql, php and nt:
> -php won't run as a module within windows (apache or IIS), but acts as a
cgi
> scripts. Problems on this are: some reduced performance, no non-buffered
> output, and problems sending headers. This also involves http
authentication
> issues, since NT ms-iis tends to use it's own user database. This can be
> quite hard to circumvent.
> -installation/configuration of php may be some harder. You might want to
run
> apache for NT anyhow instead of ms-iis.
>
> So, linux or another unix platform is optimal for the combination of php
and
> mysql, but stuff perfectly runs under NT. Compliments for the authors :)
>
>
> - Original Message -
> From: "Jeff Harris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 02, 2001 9:02 PM
> Subject: system requirements?
>
>
> > can mysql be run on windows 2000 or nt 4.0
> > is there any issues mixing ms sql and mysql?
> > or running php files on iis4 or 5?
> >
> >
> >
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
> >
>


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

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




Fw: [CGI] Gas Prices

2001-02-01 Thread René Tegel


- Original Message -
From: "René Tegel" <[EMAIL PROTECTED]>
To: "Redvers Davies" <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 7:17 PM
Subject: Re: [CGI] Gas Prices


> This sure would be a reason for microsoft to distribute less cd's and more
> pre-installed os's due to 'increased distribution costs' :)
>
> ps... you send a cc to your address book... but also to the mysql mailing
> list.. now whole world knows your private contacts?
>
> regards
>
> rene
>
> - Original Message -
> From: "Redvers Davies" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Ray Ray" <[EMAIL PROTECTED]>; "mySQL Mailing List"
> <[EMAIL PROTECTED]>; "Jeff Hunt" <[EMAIL PROTECTED]>; "Ed Holmes"
> <[EMAIL PROTECTED]>; "Chris Goehrig" <[EMAIL PROTECTED]>; "CGI Mailing List"
> <[EMAIL PROTECTED]>; "Bill Turay" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, February 01, 2001 6:03 PM
> Subject: Re: [CGI] Gas Prices
>
>
> > > > By now you're probably thinking gasoline priced at about $1.49 is
> cheap.
> > > > Me too!  As it is now $1.58 for regular unleaded.  Now that the oil
> >
> > Just an off topic observation. $1.58 is cheap.  Here, (in the UK) our
> > Gas price is > $6 a gallon.  (Yes, six US dollars a gallon).
> >
> > Its kinda annoying to hear people complaining about gas being
> > $1.50 as "high" ;)
> >
> > Red
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>


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

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




Re: How to select the 10 last items from a table?

2001-01-31 Thread René Tegel

mistake, sorry. works not either (see last message)
- Original Message -
From: "Remco van den Berg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 3:15 PM
Subject: Re: How to select the 10 last items from a table?


> On Wed, Jan 31, 2001 at 08:00:23AM -0600, The Tilghman wrote:
> > Try sorting in DESCending order.
> >
> > SELECT * FROM item ORDER BY id DESC LIMIT 10;
> >
> > -Tilghman
>
> People,
>
> Thanks for all the answers, but the question was:
>
>   "How to get the last 10 items in incrementing order."
>
> Please read thread before answering.
>
> -Remco
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: How to select the 10 last items from a table?

2001-01-31 Thread René Tegel

This works:

select * from db.table A, db.table B WHERE A.id=B.id order by B.id,A.id desc
limit 10;

regards
rene


- Original Message -
From: "Remco van den Berg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 3:15 PM
Subject: Re: How to select the 10 last items from a table?


> On Wed, Jan 31, 2001 at 08:00:23AM -0600, The Tilghman wrote:
> > Try sorting in DESCending order.
> >
> > SELECT * FROM item ORDER BY id DESC LIMIT 10;
> >
> > -Tilghman
>
> People,
>
> Thanks for all the answers, but the question was:
>
>   "How to get the last 10 items in incrementing order."
>
> Please read thread before answering.
>
> -Remco
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Binary data

2001-01-31 Thread René Tegel

Barry,

This can be done using normal insert/update statements. You only have to
'escape' the binary zero, the backslash and the quotes (' or ") out;
suppose jpg contains the binary data, the following code will do the trick:

 (pseudo code:)

 for (i=length(jpg); i--; i>0) {
  if (jpg[i] in [#0, '\', , '"'] ) { jpg=jpg[1..i-1] + '\' +
jpg[i..length(jpg)]
 };


 Original Message -
From: "Barry Radloff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 7:55 AM
Subject: Binary data


>
>
> hi I am pretty new at this and would like to know how does one store a
> binary blob to the mysql DB ie I would like to store a jpeg to the db
>
> Thanks
>
> Barry Radloff
> R&D
> Media24
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Auto-Increment - how can I avoid repeating IDs?

2001-01-30 Thread René Tegel

The most lovely feature of auto_increment is one of the reasons why we
switched from interbase to mysql. Instead of having to call a stored
procedure every time you need a unique id, or obtain one by triggers, or
create a semi-unique one the way you do, one just have a flexible and
controlable unique id function :)
So i strongly disagree the unwantedness of auto_increment. at least: you
dont have to use it if you don't like to, as you proved by a simple client
side function.


- Original Message -
From: "Roger Ramirez" <[EMAIL PROTECTED]>
To: "Viken Nokhoudian" <[EMAIL PROTECTED]>
Cc: "MySQL List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 11:07 PM
Subject: RE: Auto-Increment - how can I avoid repeating IDs?


> Use your own id's.  I personally hate auto increment.  I do all my work in
> php so I make my id's like this.
>
> srand(time());
> $id = md5(uniqid(rand()));
>
> This will make a 32 character id.
>
> > -Original Message-
> > From: Viken Nokhoudian [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 3:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: Auto-Increment - how can I avoid repeating IDs?
> >
> >
> > I am using MySQL ver. 3.22.32
> >
> > When a table has an auto-incrementing ID field and the last inserted
> > record had an ID of, say, 100, then I delete that record, the database
> > engine will re-use the 100 value. How can I get the engine to never
> > repeat an ID value to avoid corrupted data correlations?
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > 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: idle CPU

2001-01-30 Thread René Tegel

Yes tim, buy better/faster hard drives and/or put more memory in your
machine.

this 60% idle is the time your proc is waiting for the hard drive reading
data.


- Original Message -
From: "Tim Samshuijzen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 4:03 PM
Subject: idle CPU


>
>
> Hello,
>
> We're running a large database on a dedicated server.
> When I look in the list of active processes, I notice that a
> complicated query takes up no more than about 30 % of CPU.
> During this time the CPU is more than 60 % idle.
> Is there some way to speed up the process?
>
> Tim Samshuijzen
>
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: New way to learn Mysql?

2001-01-29 Thread René Tegel

Very nice. Recommend to go there, could come a awfull lot of tricks & things
to know there, in a entertaining way.

- Original Message -
From: "Jeff Cordova" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 6:54 PM
Subject: New way to learn Mysql?


> I've spent the last couple of years building well-known e-commerce sites
> using Open Source code. Turns out that a fair amount of my time was spent
> teaching the "Open Source way" to jr. programmers. Well, I got so tired of
> going through the training ritual with each new engineer, that I put
> together a website  www.codecity.com to help me out. I thought I would
tell
> this group about it as you may find it useful too. I've just got the site
> started, so the MySQL quiz database isn't too deep yet. If you could
submit
> a quiz or two that would be highly appreciated. Any feedback would also be
> welcome.
>
> Thankyou,
>
> Jeff C.
> www.codecity.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: Bug ?? combining NOT and like in where clause

2001-01-27 Thread René Tegel

Tor-Erik,

If 'I' was a language syntax interpreter, i'd see
 "where not field like pattern" as
 where (not(field) like pattern
and
 "where field not like pattern" as
 where (field !like pattern)

notice that not(field) probably returns 'False' so your first query is:
 where False like pattern
with, of course, a empty result set

Use brackets anyhow because
 "where not (field like pattern)"
makes sense!

rene


- Original Message -
From: "Tor-Erik Hagen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Tor-Erik Hagen" <[EMAIL PROTECTED]>
Sent: Sunday, January 28, 2001 12:56 AM
Subject: Bug ?? combining NOT and like in where clause


> Tested on the following versions of mysql: 3.22.32, 3.23.31 on Linux
>
> Description:
> "where not field like pattern" gives empty set, while
> "where field not like pattern" return what i expect
>
> How-To-Repeat:
> create table testtabell(test varchar(10));
> insert into testtabell values('test.com')
> insert into testtabell values('test.no')
> insert into testtabell values('test2.com')
> insert into testtabell values('test2.no')
>
> select * from testtabell where not test like '%.no';
> This returns an empty set
>
> select * from testtabell where test not like '%.no';
> This one returns:
> +---+
> | test  |
> +---+
> | test.com  |
> | test2.com |
> +---+
> 2 rows in set (0.00 sec)
>
> That is right.
>
> I don't know if the first one is legal syntax, but it should
> then return an parse error on the sql, not an empty set.
>
>
> MySQL support: none
> Severity:  non-critical
> Priority:  low
> Category:  mysql
> Class: sw-bug
> Release:   mysql-3.23.31 (Source distribution)
>
> Environment:
> 
> System: Linux zalo 2.2.16 #73 Fri Jun 16 18:48:22 PDT 2000 i586 unknown
> Architecture: i586
>
> Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
> GCC: Reading specs from
/usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
> Configure command: ./configure  --without-bench
>
>


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

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




disk free space

2001-01-27 Thread René Tegel

I really miss a function to retrieve the free disk space on a MySQL server. 

Previously this was not a problem since a ran PHP and MySQL on the same server, but 
for performance reasons i split them. 
However, there seems no function to get the free disk space automatically via MySQL, 
so a 'intelligent' application or script cannot decide wether or not to store data 
depending on free file space (note: this may be huge amounts of data so it is quite 
sensefull).
Only workaround I though of is installing PHP on the mysql server as well :(((

Anybody knows a nice workaround?



disk free space

2001-01-27 Thread René Tegel

I really miss a function to retrieve the free disk space on a MySQL server. 

Previously this was not a problem since a ran PHP and MySQL on the same server, but 
for performance reasons i split them. 
However, there seems no function to get the free disk space automatically via MySQL, 
so a 'intelligent' application or script cannot decide wether or not to store data 
depending on free file space (note: this may be huge amounts of data so it is quite 
sensefull).
Only workaround I though of is installing PHP on the mysql server as well :(((

Anybody knows a nice workaround?