Re: MySql support View?

2001-11-15 Thread Ken Kinder

There is no support for views -- just hard-code your queries.

On Thursday 15 November 2001 09:38 am, Alessio Torino wrote:
> hi all,
> can anyone explain me if mysql support view???
> if yes what is the syntax?
>
> thanks to all
>
> alessio
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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 support View?

2001-11-15 Thread Ken Kinder

I would advice against using temporary tables as views for performance 
reasons.

On Thursday 15 November 2001 10:21 am, Alexei V. Alexandrov wrote:
> > There is no support for views -- just hard-code your queries.
>
> It is olso possible to use temporary tables.
> But still the support for views in mysql will be great :)
>
> > On Thursday 15 November 2001 09:38 am, Alessio Torino wrote:
> > > hi all,
> > > can anyone explain me if mysql support view???
> > > if yes what is the syntax?
> > >
> > > thanks to all
> > >
> > > alessio
> > >
> > > -
> > > Before posting, please check:
> > >http://www.mysql.com/manual.php   (the manual)
> > >http://lists.mysql.com/   (the list archive)
> > >
> > > 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: What do I need for Perl

2001-11-15 Thread Ken Kinder

The mysql-perl had something called the Perl DBI. Go to this url:

http://www.mysql.com/downloads/api-dbi.html

Get the DBI and the Mysql-Perl tarballs. They are funny to install, but 
basicly you untar them:

  tar zxvf 

then, in the directory created by that:

perl Makefile.PL
make
make install

You can optionally stick make test inbetween make and make install.

I don't know of a decent MySQL Perl DBI in RPM format that keeps up with the 
latest and greatest MySQL.

On Thursday 15 November 2001 03:46 pm, Patrick Nelson wrote:
> I'm sorry but I have tried to solved this on my own, but I'm unable to.  I
> have a RH system and I installed the (at the time) most current stable
> mysql system 3.23.43-1 and have it up and running.  The problem that I have
> is that I want to start working with Perl and MySQL, but don't know what I
> really need.  The Powertools of RH6.2 had an rpm called
> mysql-perl-3.20.32a-3.i386.rpm which seems to match the mysql server,
> client, and shared versions that came on the powertools cd.  I've tried to
> installed the mysql-perl-3.20.32a-3.i386.rpm but it fails wanting
> libmysqlclient.so.4 to be installed and I have libmysqlclient.so.10
> installed with the 3.23.43 server, client, and shared rpms.  I've been to
> rpmfind.org and have searched extensively for mysql-perl (which gives me
> the mysql-perl-3.20.32a-3.i386.rpm and that's about it), a search for mysql
> gives a bunch of files but I'm really not sure what I need having never
> used modules in perl before.  I feel like an idiot here, but this is what I
> have:
>
> RH 6.2
> mysql 3.23.43-1
> mysql-client-3.23.43-1
> mysql-shared-3.23.43-1
> mysql-devel-3.23.43-1
> perl 5.6.1 installed from CPAN
>
> With this system what do I need to do to utilize Perl with MySQL?
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Subtracting Dates

2001-11-15 Thread Ken Kinder

The date addition and subtraction functions in mysql don't seem to quiet do 
this. I was wondering if anyone know a way I could do this in the query:

Say you have two fields, start_time, and end_time, representing the start and 
end of a period of time. Both are datetime datatypes. What I want is the 
logical equivalent of:

select end_time - start_time as duration from 

I want the difference between those two, such that it would say "0 days, 4 
hours" or something.

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

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




Re: Subtracting Dates

2001-11-16 Thread Ken Kinder

Well, I really do need the exact timespan in human-readable format. What I 
did do was get the difference in seconds, then properly format that manually. 
:/

Thanks anyway though.

On Friday 16 November 2001 07:24 am, Walter D. Funk wrote:
> Why don´t you try
> select TO_DAYS(end_date)-TO_DAYS(start_date) as duration : this will return
> the difference in days
> if you need mor accuracy i.e. difference in hours, you should word on a
> TIMESTAMP 14 instead of date ; this data type holds up to seconds and is
> mathematically easy to operate ...
> i hope it helps
>
> - Original Message -
> From: "Ken Kinder" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 15, 2001 8:32 PM
> Subject: Subtracting Dates
>
> > The date addition and subtraction functions in mysql don't seem to quiet
>
> do
>
> > this. I was wondering if anyone know a way I could do this in the query:
> >
> > Say you have two fields, start_time, and end_time, representing the start
>
> and
>
> > end of a period of time. Both are datetime datatypes. What I want is the
> > logical equivalent of:
> >
> > select end_time - start_time as duration from 
> >
> > I want the difference between those two, such that it would say "0 days,
> > 4 hours" or something.
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
>
> <[EMAIL PROTECTED]>
>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: help adding /rempoving users

2001-11-19 Thread Ken Kinder

Diana, in regard to adding and removing users. What I do is just login to the 
database 'mysql' which holds the actual mysql information:

connect mysql;

Then, you can insert directly into the user table. Do you know enough about 
SQL to understand how the insert statement works? Basically the Y/N fields in 
the user table reflect the access this user will have to certain statements. 
My advice is to look at a row for a user who your student inserted, and copy 
the Y's and N's, thus giving your new user the same permissions.

Don't forget to run mysqladmin reload after you modify the user table.

In regard to creating databases: I'm not sure what you mean. Each database 
should be created using the mysqladmin command:

mysqladmin create 

All of this is well-documented on the mysql web site, mysql.com. I suggest 
you take a look at its chapters on creating users, databases, etc.

On Monday 19 November 2001 12:57 pm, DIANA CLEVELAND wrote:
> We had a student setup the MySQL program and had written instructions on
> how to add users.  Somehow those instructions got lost.  I tried a grant
> command and an insert command but neither gave me a line in db that looked
> like the ones previous.  How do I remove those lines to try again?  Also do
> I need to create a database before the insert command or will the insert
> command create the database as well as the user if they don't exist?
>
> I am running version  3.22.32 on AIX 4.3.3.
>
> A line from the  db file looks like:
> | localhost | wolfe\_% | wolfe| Y   | Y   | Y
> | Y   | Y   | Y | N  | Y   | Y
> |
> | Y  |
>
> with this header:
> | Host  | Db   | User | Select_priv | Insert_priv |
> | Update_priv Delete_priv | Create_priv | Drop_priv | Grant_priv |
> | References_priv | Index_
>
> riv | Alter_priv |
>
>  a line from the user file looks like:
>  | N | N  | N   | N  | N   
>  |   |
> |
> | localhost | wolfe| encrypted password here| N   | N  
> | | N
> |
> | N   | N   | N | N   | N |
> | N
> |
>  | N | N  | N   | N  | N   
>  |   |
>
> with a header line of :
> | Host  | User | Password | Select_priv | Insert_priv |
> | Update_
>
> riv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv |
> Pro ess_priv | File_priv | Grant_priv | References_priv | Index_priv |
> Alter_priv |
>
>
> Thank you,
>
> Diana
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Removing all escape Characters?

2001-11-19 Thread Ken Kinder

So, then even if you make a quote function that's too much work?

On Monday 19 November 2001 03:21 pm, berndt wrote:
> Problem with this unfortunately though is that i have probably 100+ sql
> queries spread over several hundred cfm pages to find and change. Plus if i
> ever want to go back to ms sql i have to switch them all back again.
>
> Dave
>
> At 05:07 PM 11/19/2001 -0500, you wrote:
> >>>2. a coldfusion function to make the sql statements "safe".
> >
> >You only have to escape like 3 characters.  ', ", and \.  You could
> > just do 3 string replacements or create your own function to perform 3
> > string replacements.
> >Chris
> >
> >
> >-
> >Before posting, please check:
> >   http://www.mysql.com/manual.php   (the manual)
> >   http://lists.mysql.com/   (the list archive)
> >
> >To request this thread, e-mail <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail
> > <[EMAIL PROTECTED]> Trouble
> > unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Nusphere is spamming me

2001-11-19 Thread Ken Kinder

I can confirm that NuSphere subscribes to mailing lists and spams its 
posters, as this has happened to me too, under similar circumstances. Perhaps 
the admins of this list should remove NuSphere.

On Monday 19 November 2001 04:55 pm, Michael A. Peters wrote:
> This e-mail address is brand new.
>
> I used it to subscribe to the MySQL list.
> I sent one e-mail to the MySQL list.
> I used it to send two e-mails to my web hosting provider.
> I used it to send one e-mail to [EMAIL PROTECTED]
>
> That's it! No others yet.
>
> I know my web hosting provider did not sell my e-mail address to nusphere.
> I know that php.net did not.
>
> They got my brand spanking new e-mail address of of the one post I made to
> this list.
> I'm sure that is a violation, it is with most mail lists.
>
> If you use MySQL I respectfully ask to to avoid NuSphere.
> Do not support spammers.
>
> This really ticks me off, I mean really ticks me off big time.
> Have they no shame?
>
> If someone at mysql.com would like the e-mail they spammed me with for
> further investigation, I would be happy to provide it.
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: MySQL and encryption

2001-11-20 Thread Ken Kinder

4.0 does support SSL connections. Note that this isn't an encrypted database, 
it's just that the connection between you and the server is encrypted -- 
which is of course, good. One more thing: you have to specifically use the 
SSL feature -- don't assume that your connection is encrypted! I suggest 
literally using tcpdump to make sure your data isn't coming through clear 
text.

As for encrypted databases, I there is a one-way hash function, password() 
that encrypts a password similarly to how Unix does it. But it isn't 
unbreakable, it's just a measure to keep your DB admin from seeing everyone's 
passwords with just a select query.

I would like to know if anyone has some advice on encrypting credit cards 
myself, as it's something I'm going to be needing to look into for my own 
purposes.

On Tuesday 20 November 2001 01:30 am, Thomas Kotze` wrote:
> Hi,
>
> I am new to MySQL and would like to know what encryption capabilities the
> MySQL database have.
>
>
> Regards
> Thomas
>
>
>
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> http://www.mycomax.com";>www.mycomax.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: 24 hour query confusion....

2001-11-20 Thread Ken Kinder

3076 is 2:53 in the morning, not the afternoon.

On Tuesday 20 November 2001 08:46 am, Andy wrote:
> Summary
> If I have a filed of type "DATETIME" in a table and do a query with an
> order on that field than records with a datetime in the afternoon are
> returned before articles in the morning.
>
> EG:
> mysql> select pubtime,articleid,headline from articles where  articleid
> mysql> >3050 order by pubtime;
>
> will return:
> | 2001-11-20 02:53:32 |  3076 | "Simpsons" collections coming next year
> | 2001-11-20 10:02:06 |  3073 | Pearl Harbor
> | 2001-11-20 11:05:45 |  3074 | Simpsons season 2 at the BBFC ?
> | 2001-11-20 12:15:02 |  3075 | Paramount announce "Down to Earth"
>
> Note articleid 3076 is timestamped 02 in the afternoon.  Article 3075 is
> 12:15 noon.  Clearly article 3076 should come after 3075.
>
> Can I set the select query to deal with the order by 24 hour clock or am I
> missing something big time here !
>
> Andy C
> Editor R2 project
> http://www.r2-dvd.org
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: SCSI vs IDE

2001-11-20 Thread Ken Kinder

I'd say that if your database can fit on the SCSI drive you can afford, there 
is no reason for not choosing SCSI. Or, hec, if it's a really small database, 
why not ramdist?

In regard to your question about whether it confirms a write before commiting 
a transaction. First of all, check to see if there are any notes about 
MySQL's behavior on your platform: 
http://www.mysql.com/doc/O/p/Operating_System_Specific_Notes.html you can 
also refer to the optimization guide. 
http://www.mysql.com/doc/M/y/MySQL_Optimisation.html

I don't _think_ it checks to make sure the write actually happens before 
confirming the transaction, but I'm not certain.

On Tuesday 20 November 2001 08:52 am, Thomas S. Iversen wrote:
> Hi
>
> This is not an atempt to start a flamewar!!
>
> We're about to build a db server for educational purposes. Running 150+
> databases pr. semester. Nothing big, nothing demanding when looking at a
> single database, but combined it may give some load (might be a lot of
> concurrent activity during classes, none afterwords, etc).
>
> Back to the question: we're on a limited budget, and have to choose
> between either inexpensive but large IDE disk or fast but small SCSI
> disks. The machine has 1GB memory. First thought would be IDE disks since
> we have enough memory to cache the DBs.
>
> Question: Does a write transaction in mysql wait for the disk to actually
> write the data onto the platter (thereby eliminating our cache), or
> doesn't it care about the data hitting the disk before returning (leaving
> it to the OS)? If it's the first we might opt for SCSI, if it's the
> latter we'll go for IDE.
>
> Thanks for your time.
>
> Regards Thomas, 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




Re: MySQL and encryption

2001-11-21 Thread Ken Kinder

Monty, is this like a product you're selling? I would like more information, 
although I haven't gotten to this yet in my security sweep.

On Wednesday 21 November 2001 06:27 am, Michael Widenius wrote:
> Hi!
>
> >>>>> "Ken" == Ken Kinder <[EMAIL PROTECTED]> writes:
>
> 
>
> Ken> I would like to know if anyone has some advice on encrypting credit
> cards Ken> myself, as it's something I'm going to be needing to look into
> for my own Ken> purposes.
>
> We are working on a solution to this which will be available in about
> 3 weeks. Some of the features of this are:
>
> - We will use a strong encryption function: (des_encrypt()/des_decrypt())
> - The credit cards will be crypted in the data files. Just getting
>   access to the data files will not make it possible to decrypt the
>   credit cards.
> - The 'salt' used for encryption can either be stored in a file on the
>   server (as a default value for the des_xxx() functions) or specified
>   in the SQL statement.
>   This enables a customers to do search in the customer database for
>   his entry based on his credit card number without having to know the
>   'salt'
>
>   SELECT * from customer_database WHERE
> credit_card=des_encrypt("his-used-credit-card");
>
> - To decrypt things, the MySQL user need to have certain privileges
>   (for using the default key) or specify the used 'salt' to des_decrypt()
>
> We will write a full documentation for this as soon we got this
> implemented.
>
> Regards,
> Monty

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

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




Re: opinion - voating

2001-11-26 Thread Ken Kinder

Oracle is certainly more full-featured, but if you know very little about 
databases, Oracle is not the right choice. Only use Oracle if you have a 
full-time fix-figure-salary Oracle expert AND you actually need Oracle's 
features.

If you don't specifically know you need Oracle, you don't.

On Wednesday 21 November 2001 09:45 pm, Mamun Murtaza Sheriff wrote:
> Dear All
>
> You all are working on Database for Long time. In your opinion Which one is
> best 1. MySql or 2. Oracle
>
>
> Mamun
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: MySQL and encryption

2001-11-26 Thread Ken Kinder

Oh you're actually from MySQL -- I didn't notice that.

That'll be very cool when you get that finished. Also, having a datatype 
specifically for credit card numbers would be cool. :)

On Thursday 22 November 2001 09:52 pm, Michael Widenius wrote:
> Hi!
>
> >>>>> "Ken" == Ken Kinder <[EMAIL PROTECTED]> writes:
>
> Ken> Monty, is this like a product you're selling? I would like more
> information, Ken> although I haven't gotten to this yet in my security
> sweep.
>
> This is something a customer of our is sponsoring and that we will put
> into MySQL 4.0 as soon as it's ready.
>
> We will probably also make available a patch for 3.23, but we don't
> have any plans to put this code into the standard 3.23 code tree to
> not accidently break anything for a lot of users..
>
> >> We are working on a solution to this which will be available in about
> >> 3 weeks. Some of the features of this are:
> >>
> >> - We will use a strong encryption function:
> >> (des_encrypt()/des_decrypt())
>
> ...
>
> Regards,
> Monty

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

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




Re: AW: opinion - voating

2001-11-26 Thread Ken Kinder

On a final note, real Oracle users don't use SQLPlus, they use TOAD, Tool for 
Oracle Application Developers. :)

On Monday 26 November 2001 01:32 pm, Christian Sage wrote:
> Neil,
>
> I'm not going to argue against your view, because for a discussion on
> Oracle this is clearly the wrong place. However, I would like to correct
> your facts in one respect: while SQL plus has a standard line size of 80
> characters and a standard page size of 24, you can very easily set your
> linesize to any value you want (within reason, but I know I have used 512
> successfully, and that is certainly wider than any terminal size I would
> set), and pagesize could traditionally go up to 32767 or be set to 0,
> which means no page breaks, no headers, etc. You can also have it pause
> for you after each page and set the prompt it will give you whenever it so
> pauses. There are numerous other things you can set on the fly or via a
> configuration scripts.
>
> It takes some effort to get familiar with SQL plus, but once you have done
> that, it is a very powerful and versatile tool indeed. Which has no
> bearing at all on MySQL, but I think a measure of fairness towards
> competitors is always indicated.
>
> Cheers,
> Christian
>
> > -Ursprungliche Nachricht-
> > Von: Neil Zanella [mailto:[EMAIL PROTECTED]]
> > Gesendet: Montag, 26. November 2001 21:00
> > An: Ken Kinder
> > Cc: Mamun Murtaza Sheriff; MySQL Mailing List
> > Betreff: Re: opinion - voating
> >
> > On Mon, 26 Nov 2001, Ken Kinder wrote:
> > > Oracle is certainly more full-featured, but if you know very
> >
> > little about
> >
> > > databases, Oracle is not the right choice.
> >
> > I agree. First of all the system requirements are high. For instance the
> > Oracle Universal Installer took something like three hours on a fairly
> > high end PIII with 133MHz FSB! I have heared it takes for ages (up to a
> > whole day) on other machines. This is not the worse part either. Have
> > you ever used the sqlplus command line utility (which is the equivalent
> > of the mysql command line tool or PostgreSQL's psql command line
>
> client).
>
> > Well, sqlplus assumes your terminal is 24x80 even after you resize it.
> > At least this is so with Oracle8i. I can tell you this: you won't learn
> > much with a crappy tool like that cause as soon as you have more than
> > two columns you won't be able to see the output in human readable form.
> > Now my other point: Oracle8i is highly non-SQL compliant (although
> > Oracle9i seems to be a little bit better). My last point about Oracle
> > is that it is based on Java (see that JServer stuff when you start
> > sqlplus?) and that is perhaps one of the reason it needs so much RAM.
> > With a bit of bias we could conclude that if it were not for its
> > disk and address space requirements then Oracle would be a fairly
> > sluggish beast.
> >
> > > Only use Oracle if you have a
> > > full-time fix-figure-salary Oracle expert AND you actually need
>
> Oracle's
>
> > > features.
> > >
> > > If you don't specifically know you need Oracle, you don't.
> >
> > Exactly. If I had the choice I would stay away from Oracle. Plus Oracle
> > does not have good enough documentation either compared to most Open
> > source products.
> >
> > Now there is one thing that we must be aware of. There are things that
> > mysql does not support (yet). These include foreign keys, views,
> > subselects, triggers, and procedural SQL, and I can't remember
> > if mySQL supports transaction processing either, perhaps someone
> > can confirm. However, mysql is much faster than other database
> > system so you may still want to use it depending on the
> > complexity of your database. If your database is not
> > complex or if you do not need subselects then go
> > with mysql. Most of the time you can get around
> > all of this by recoding some things here and there.
> > But if you are just learning go with postgresql, which
> > will be slower, but will support all this stuff you
> > need to know about databases. Once you have tested
> > your application under postgresql and are certain
> > that your code does not violate the database's
> > foreign key constraint, simply run it under mysql
> > after the testing phase. Then your code will run
> > faster and at the same time free of errors.
> > This is just my own personal recommendation
> > for relatively small applications.
> >
> > Bye,
> >
> > Neil
> >

Re: Strange COUNT results

2001-11-26 Thread Ken Kinder

There's probably something wrong with your PHP code. It should look something 
like...

$result = mysql_query("select count(*) as cnt from table") or die 
(mysql_error());
$row = mysql_fetch_array($result);
$count = $row[cnt];
print $count;

Sounds like you're doing something more like:

$result = mysql_query("select count(*) as cnt from table") or die 
(mysql_error());
print $result;

On Monday 26 November 2001 03:43 pm, Cory Gagliardi wrote:
> I'm using PHP with mySQL and I got very weird results when I ran a count. 
> I used "SELECT COUNT(*) FROM $TableName", with $TableName being my table's
> name, for the Query.  When I printed the result I got "Resource id #2",
> what does that even mean.  And what did I do wrong?
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Problem moving database datadir

2001-11-27 Thread Ken Kinder

Although I wouldn't suggest doing this, it seems to work fine for me. I 
suggest in moving the directory, do not make ANY changes to the permissions - 
any. Just do this as root:

(Assuming you have redhat'ish directory structure)

cd /var/lib/mysql
mv dbname /home/user/database
ln -s /home/user/database /var/lib/mysql/dbname

This works fine in my environment. Just don't mess with the permissions or 
ownership, leave it as mysql/mysql.

On Tuesday 27 November 2001 11:54 am, Mike(mickalo)Blezien wrote:
> Hello All,
>
> Hoping someone can point where I may have gone wrong on setting our
> client's databases within their own respective home directories. Here is
> one of the setups dir tree and settings:
>
> The database 'tracers' is symbolically linked from the datadir to the
> client's home directory. But for some reason, I keep getting the error
> message that the tables are 'read only'...!
>
> what did I go wrong here?? How can I get MySQL to read/write to the
> database in the client's home directory?? I thought I had all the owner/grp
> settings correct.
>
> Thanks
>
> mysql sql database.
>
> # client home dir /home/tracerta/tracers
> drwxrwxrwx2 tracerta mysql4096 Nov 25 22:57 ./
> drwx--x--x   13 tracerta tracerta 4096 Nov 27 12:45 ../
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 customers.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 customers.MYI
> -rw-rw-rw-1 tracerta mysql9010 Nov 25 22:57 customers.frm
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 log.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 log.MYI
> -rw-rw-rw-1 tracerta mysql8610 Nov 25 22:57 log.frm
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 membership.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 membership.MYI
> -rw-rw-rw-1 tracerta mysql8644 Nov 25 22:57 membership.frm
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 onlinetag.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 onlinetag.MYI
> -rw-rw-rw-1 tracerta mysql8592 Nov 25 22:57 onlinetag.frm
> -rw-rw-rw-1 tracerta mysql 340 Nov 25 22:57 product_id.MYD
> -rw-rw-rw-1 tracerta mysql3072 Nov 25 22:57 product_id.MYI
> -rw-rw-rw-1 tracerta mysql8700 Nov 25 22:57 product_id.frm
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 recovery.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 recovery.MYI
> -rw-rw-rw-1 tracerta mysql8990 Nov 25 22:57 recovery.frm
> -rw-rw-rw-1 tracerta mysql   14904 Nov 25 22:57 retailtag.MYD
> -rw-rw-rw-1 tracerta mysql   19456 Nov 25 22:57 retailtag.MYI
> -rw-rw-rw-1 tracerta mysql8616 Nov 25 22:57 retailtag.frm
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 tags.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 tags.MYI
> -rw-rw-rw-1 tracerta mysql8652 Nov 25 22:57 tags.frm
> -rw-rw-rw-1 tracerta mysql   0 Nov 25 22:57 temptag.MYD
> -rw-rw-rw-1 tracerta mysql1024 Nov 25 22:57 temptag.MYI
> -rw-rw-rw-1 tracerta mysql8602 Nov 25 22:57 temptag.frm
>
> # dir /var/lib/mysql/var
> drwx--2 mysqlmysql1024 Jul 30 19:32 jytinter_db/
> -rw-r--r--1 mysqlmysql2276 Nov 14 09:56 my.cnf
> drwx--2 mysqlmysql1024 Jul 31 08:09 mysql/
> -rw-rw-r--1 mysqlmysql   65962 Nov 27 13:51 mysql.log
> -rw-rw1 mysqlmysql   4 Nov 26 22:51 mysql.pid
> -rw-rw-r--1 mysqlroot 6450 Nov 26 22:51 mysql_log.err
> -rw-rw1 mysqlmysql   54739 Nov 26 22:51 mysql_update.log
> drwx--2 mysqlmysql1024 Jul 30 19:31 referra1/
> lrwxrwxrwx1 mysqlmysql  22 Nov 25 23:00 tracers ->
> /home/tracerta/tracers/
> Mike(mickalo)Blezien
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Thunder Rain Internet Publishing
> Providing Internet Solutions that work!
> http://www.thunder-rain.com
> Tel: 1(225)686-2002
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: Subtracting Dates

2001-11-29 Thread Ken Kinder

Oh, well, I didn't really have a solution. I just took it all out in seconds, 
and did the math inside the application.

On Thursday 29 November 2001 01:12 pm, Mark Rissmann wrote:
> It would be beneficial to the group if everyone would post their solutions
> to the list if they solve it on their own.
>
> IMHO,
>
> Mark
>
> -Original Message-
> From: Ken Kinder [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 16, 2001 10:10 AM
> To: Walter D. Funk; [EMAIL PROTECTED]
> Subject: Re: Subtracting Dates
>
> Well, I really do need the exact timespan in human-readable format. What I
> did do was get the difference in seconds, then properly format that
> manually.
>
> :/
>
> Thanks anyway though.
>
> On Friday 16 November 2001 07:24 am, Walter D. Funk wrote:
> > Why don´t you try
> > select TO_DAYS(end_date)-TO_DAYS(start_date) as duration : this will
> > return the difference in days
> > if you need mor accuracy i.e. difference in hours, you should word on a
> > TIMESTAMP 14 instead of date ; this data type holds up to seconds and is
> > mathematically easy to operate ...
> > i hope it helps
> >
> > - Original Message -
> > From: "Ken Kinder" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, November 15, 2001 8:32 PM
> > Subject: Subtracting Dates
> >
> > > The date addition and subtraction functions in mysql don't seem to
> > > quiet
> >
> > do
> >
> > > this. I was wondering if anyone know a way I could do this in the
> > > query:
> > >
> > > Say you have two fields, start_time, and end_time, representing the
> > > start
> >
> > and
> >
> > > end of a period of time. Both are datetime datatypes. What I want is
> > > the logical equivalent of:
> > >
> > > select end_time - start_time as duration from 
> > >
> > > I want the difference between those two, such that it would say "0
> > > days, 4 hours" or something.
> > >
> > > -
> > > Before posting, please check:
> > >http://www.mysql.com/manual.php   (the manual)
> > >http://lists.mysql.com/   (the list archive)
> > >
> > > 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




Running queries while queries are still running

2001-11-30 Thread Ken Kinder

I have a query. It (should) return one row. It normally does, except when I 
do something like this:

(query)
(loop through results)
   (update table that was in the first query)

When I do this logic in Perl/DBI, it seems to restart the loop, returning the 
same row, over and over again. Can this be right?

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

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




Re: RedHat DB?!

2001-12-19 Thread Ken Kinder

If anyone wants PostgreSQL with support, but isn't interested in Red Hat's 
thing, PostgreSQL Inc sells commercial support. There are actually some other 
companies doing that too.

On Wednesday 19 December 2001 09:11 am, Christopher R. Jones wrote:
> And it comes with a nifty price tag: $2,300 USD!
>
> >"Deependra B. Tandukar" <[EMAIL PROTECTED]> writes:
> > > What is RedHat Database?
> >
> >Postgresql.
> >
> > >Is anybody using it? How is it? Better than MySQL?
> >
> >It's postgresql w/support, so the answer would be the same as regular
> >postgresql vs. MySQL.
> >
> >This means that it has things like foreign keys, stored procedures,
> >triggers, subqueries etc. which are missing in MySQL. MySQL is
> >probably a bit more optimized for doing simple queries/inserts,
> >though.
> >
> >--
> >Trond Eivind Glomsrød
> >Red Hat, Inc.
> >
> >-
> >Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> >To request this thread, e-mail <[EMAIL PROTECTED]>
> >To unsubscribe, e-mail <[EMAIL PROTECTED]>
> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> Christopher R. Jones, P.Eng.
> 14 Oneida Avenue
> Toronto, Ontario M5J 2E3
> Tel. 416 203-7465
> Fax. 416 203-8249
> Email [EMAIL PROTECTED]
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Left join?

2001-12-27 Thread Ken Kinder

I guess I'm just old fashion. I learned with the terms inner and outer joins, 
and I conceptually in struggling with this left/right join stuff -- I thought 
the order it joins the tables was simply a matter of optimizer logic.

Can someone give me a rule of thumb in understanding what this left/right 
join business is vs inner/outer joins?

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

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




Forcing Table Types

2001-12-28 Thread Ken Kinder

This is getting really annoying. No matter what type of table I create, it 
ends up being MyISAM. I _must_ have at least transactions and foreign key 
support would be nice. Also, does anyone know how I can have transactions on 
create table statements?

Here the interaction with MySQL that is driving me crazy. It's kind of messy, 
but you'll notice my foo table ends up being MyISAM. The same thing happens 
for Berkley tables.

mysql> create table foo (
-> foo_id int auto_increment not null,
-> whatever text,
-> primary key(foo_id)
-> ) type=InnoDB;
Query OK, 0 rows affected (0.00 sec)

mysql> show create table foo;
+---+-+
| Table | Create Table
|
+---+-+
| foo   | CREATE TABLE `foo` (
  `foo_id` int(11) NOT NULL auto_increment,
  `whatever` text,
  PRIMARY KEY  (`foo_id`)
) TYPE=MyISAM |

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

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




Re: Forcing Table Types

2001-12-28 Thread Ken Kinder

I am using the RPM's, but it didn't give an error so I'm assuming it is 
properly configured. The MySQL version is:

[ken@ken ken]$ mysql --version
mysql  Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686)

Sorry -- I should have included that.

I'm assuming there's something wrong with my syntax as I can't create Berkley 
tables either. Frankly I don't care what table type I use, I just want 
transactions -- and if I can get them, foreign keys w/ cascade deletes, etc...

On Friday 28 December 2001 01:25 pm, Weaver, Walt wrote:
> Ken,
>
> When you configured/compiled MySQL, did you use the --with-innodb option?
> What version of MySQL are you running?
>
> FWIW, I wasn't real impressed with the Berkeley tables, but the InnoDB
> tables work very well.
>
> --Walt Weaver
>   Bozeman, Montana
>
> -Original Message-
> From: Ken Kinder [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 28, 2001 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: Forcing Table Types
>
>
> This is getting really annoying. No matter what type of table I create, it
> ends up being MyISAM. I _must_ have at least transactions and foreign key
> support would be nice. Also, does anyone know how I can have transactions
> on
>
> create table statements?
>
> Here the interaction with MySQL that is driving me crazy. It's kind of
> messy,
> but you'll notice my foo table ends up being MyISAM. The same thing happens
> for Berkley tables.
>
> mysql> create table foo (
> -> foo_id int auto_increment not null,
> -> whatever text,
> -> primary key(foo_id)
> -> ) type=InnoDB;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> show create table foo;
> +---+--
>- --+
>
> | Table | Create Table
>
> +---+--
>- --+
>
> | foo   | CREATE TABLE `foo` (
>
>   `foo_id` int(11) NOT NULL auto_increment,
>   `whatever` text,
>   PRIMARY KEY  (`foo_id`)
> ) TYPE=MyISAM |
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Not in Another Table

2002-01-08 Thread Ken Kinder

Is there a way I can filter OUT records referenced in another table?

With Subselects it would be this, but I'm using 3.23:

select
  a.*
from
  a
where
  a.id not in (select id from b)

You get the idea.

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

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