Re: Is it True?

2003-12-31 Thread Hans van Harten
Dennis Strickland wrote: > Just started using MYSQL. And in doing some reading about MYSQL I > read that MYSQL does not support nested Selects.Is this true? Current documentation reveals nested selects aka subqueries aka derived tables aka anonimous views are available as of version 4.1, first alp

Re: LEFT JOIN help (or "come and slap the newbie")

2003-12-29 Thread Hans van Harten
Dan Hansen wrote: > is essentially giving me what I need: > > CREATE TEMPORARY TABLE temptable > SELECT state.name AS state , group.name AS group, > group.zip AS zip, city.name AS city > FROM city, group, zip > LEFT JOIN state ON city.state_id = state.id > WHERE group.zip = zip.zip > AND zip.city_

Re: Counting total files

2003-11-30 Thread Hans van Harten
Bruce Therrien wrote: > We have a database that has a quantity > of files listed for each client record. > We can count the number of clients, but how > do we count the total number of files for > all clients combined? Rather than _count_, calculate that SUM. SELECT COUNT(client), SUM(fpc) FROM tab

Re: Order by a number not leading in zero

2003-11-29 Thread Hans van Harten
Scott Haneda wrote: > I have the following... > > tSql = "SELECT l.team, l.link, lc.category, l.age, l.date > FROM league AS l > INNER JOIN league_category AS lc > ON l.category = lc.id > WHERE lc.id = " & prepSQL(tConn, id) & " AND l.status = '1' > ORDER BY

Re: Retrieving info from a Joined column

2003-11-28 Thread Hans van Harten
[EMAIL PROTECTED] wrote: >> From: Bruce Therrien <[EMAIL PROTECTED]> >> Date: 2003/11/28 Fri PM 01:42:14 CST >> To: [EMAIL PROTECTED] >> Subject: Retrieving info from a Joined column >> >> We have a column in our table that has >> new info added each time using a JOIN function. The data sample make

Re: ERROR 1115: Unknown character set: 'latin1_de'

2003-09-02 Thread Hans van Harten
Simon wrote: > So, you'd want: > CREATE TABLE foo ( blah ... ) CHARACTER SET latin1 COLLATE > latin1_german1_ci; You can enforce a different character set by configuration, but how to setup for a non-swedish(!) collation ?? HansH -- MySQL General Mailing List For list archives: http://lists.my

Re: PHP Search + MySQL Query

2003-08-30 Thread Hans van Harten
Brown, Chris wrote: > +---+-+ >> Field | Type| > +---+-+ >> id| int(6) | >> svc | varchar(20) | >> sev | tinyint(1) | >> dsc | varchar(60) | >> inits | varchar(20) | >> dst | date| >> tst | time| >> den | date| >>

Re: It is secure to access MySQL thru internet?

2003-08-29 Thread Hans van Harten
Flavio Tobias wrote: >>> I need to access a database thru internet. It is secure to do this >>> using MySql? >> Sure. If you use a secured connection. > What do you mean with secure connection, ssh? > How to configure this on MySql? I'ld think about SSL http://www.mysql.com/doc/en/Secure_ba

Re: replication (master/slave for different servers with different databases)

2003-08-27 Thread Hans van Harten
Matthias Blaser wrote: > It's possible a server could act as master for one database with slave > server A and as a slave for another database which runs on master > server B? As in A - database1 -> S - database2- > B AFAIK anything S logs will be red by B. Using 'replicate-do-db=database2' B

Re: Union and Order By give strange results in Mysql 4.0.13

2003-08-25 Thread Hans van Harten
Neculai Macarie wrote: >> To my observations constants in a column declaration limit the >> column width to just fit the initial constant. >> Your choice of values 'gallary' and 'gallery-categ' just masked that >> out ;-) > Yes, you are right. Based on your observation I was able to trick him > wit

Re: Union and Order By give strange results in Mysql 4.0.13

2003-08-24 Thread Hans van Harten
Neculai Macarie wrote: [] > select 'gallery' as table_name, d_image_small, d_image_big > from gallery > UNION > select 'gallery_categ' as table_name, d_image, NULL > from gallery_categ > order by table_name; [] > select 'gallery' as table_name, d_image_small, d_image_big > from gallery > union > se

Re: linked db

2003-08-24 Thread Hans van Harten
Roger Baklund wrote: > * Robert Morgan >> Hi, is it possible to link databases within mysql? > I'm not sure what it means to "link databases"... Given "I have a access database ..." the OP probebly wants to (±symbolic) link a table to an external data-source, being an Acces-file. That's the mecha

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Fred van Engen wrote: > SELECT 2147483648*2147483648*4 returns 0. > SELECT 2147483648*2147483648*2 returns -9223372036854775808. > SELECT 2147483648*2147483648*2-1 returns 9223372036854775807. > > The same problem in most programming languages. What do other DBMS do > and what do the SQL stand

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Fred van Engen wrote: > On Sat, Aug 23, 2003 at 10:54:32AM +0200, Hans van Harten wrote: >> My checks might not match those of (the next version of) MySQL and >> at that time the difference in thoughts will pass unnoticed ! > I agree that MySQL should complain but I'm

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Fred van Engen wrote: > On Fri, Aug 22, 2003 at 01:16:48AM -0500, Hans van Harten wrote: >> that comes with neither warnings nor errors reported ... > Error reports would have been nice, but why does your application > supply these incorrect dates anyway? Probably because some us

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Rajesh Kumar wrote: > Hans van Harten unknowingly asked us: > >> create database data_test ; >> use data_test; >> create table test3 (a date); >> insert into test3 values ( >> from_unixtime(unix_timestamp('2002-102-31'),

Re: MySQL running out of date

2003-08-21 Thread Hans van Harten
Rajesh Kumar wrote: > Peter Brawley unknowingly asked us: >>> Interestingly, use of date_add() and date_sub() on 'odd' dates such >>> as "Feb 31" does produce sane results. >>> Subtract one from "2000 Feb 31", and you'll get 2000-03-01. >> This is sane!!?? > This is where Unix Timestamps come into

Re: MySQL running out of date

2003-08-21 Thread Hans van Harten
Kevin Fries wrote: > I agree it's unfortunate that the dates get stored. But some do seem > to prefer it this way. > > To quote the manual at the bottom of: > http://www.mysql.com/doc/en/Using_DATE.html > > If the date cannot be converted to any reasonable value, a 0 is > stored in the DATE field,

Re: MySQL running out of date

2003-08-21 Thread Hans van Harten
Adam Clauss and Rajesh Kumar wrote: >> Hans van Harten unknowingly asked us: LOL >>> Some make the laughing stock of MySQL with this code: >>> create database data_test ; >>> use data_test; >>> create table test3 (a date); >>>

MySQL running out of date

2003-08-21 Thread Hans van Harten
Some make the laughing stock of MySQL with this code: create database data_test ; use data_test; create table test3 (a date); insert into test3 values (-1); insert into test3 values ('1996-02-31'); insert into test3 values ('1996-67-31'); select * from test3; I ran it o

Re: Slow results with simple, well-indexed query

2003-08-21 Thread Hans van Harten
Cybot wrote: > Jesse Sheidlower wrote: >> An example of a query is to get all the words (the cg.cw >> field) in a particular alphabetical range that have been >> added in some timespan (the sref.cd field). The cg table >> has about 3M rows, and the sref table about 70,000; the >> intervening tables

Re: [users@httpd] apache/mysql errors....

2003-08-21 Thread Hans van Harten
bruce wrote: > We have the following setup in our httpd.conf file. We've tried to > give what's related to the issue. We're trying to set up a virtual > host for a test project. The behavior that we're seeing is that we > can type: > http://foo.com but the url that gets displayed is > http://12.x.x

Re: Mast-Master Replication

2003-08-21 Thread Hans van Harten
Jeremy Zawodny wrote: > On Tue, Aug 19, 2003 at 01:52:26PM -0700, Sanya Shaik wrote: >> I am unable to find any information about master-master replication. >> I need to replicate 1 mysql server over to other as a standby master >> server. It's named circular master-slave ... http://www.mysql.com/d

Re: Mast-Master Replication

2003-08-21 Thread Hans van Harten
Jeremy Zawodny wrote: > On Tue, Aug 19, 2003 at 01:52:26PM -0700, Sanya Shaik wrote: >> I am unable to find any information about master-master replication. >> I need to replicate 1 mysql server over to other as a standby master >> server. It's named circular master-slave ... http://www.mysql.com/d

Re: Optimizing imports

2003-08-17 Thread Hans van Harten
Jackson Miller wrote: > On Saturday 16 August 2003 4:41, Hans van Harten wrote: >> Depending on your exact needs, consider brutal overwrites: >> LOAD DATA CONCURRENT INFILE '...' REPLACE INTO TABLE >> Replaces 1 rows within 3.5 s into Innodb running MySQL-m

Re: Optimizing imports

2003-08-16 Thread Hans van Harten
Jackson Miller wrote: > I need to have a web application be able to import large amounts of > data (400,000 rows of 10 columns). I know how to script it and have > it running in the background. However I want to know how I can > optimize my insert statements to try to speed things up. For extreme

Re: Problem with data import from text file solved, I think.

2003-08-14 Thread Hans van Harten
FYI After digging out some documentation ( RFM indeed ) it is all so simple in DBD::mysql ... As of version 3.23.49 LOCAL within LOAD DATA _may_ be disabled in the _client_ library. By adding an option to the DSN-string within the connect statement the function is re-enabled at the client side too

Re: Advanced text search

2003-08-14 Thread Hans van Harten
[EMAIL PROTECTED] wrote: > select compid,company,phone from companies where MATCH (phone) AGAINST > ('+27-21-*', IN BOOLEAN MODE); something like that 'something like that' triggered me ... try select compid,company,phone from companies where phone LIKE '+27-21-%'; IIRC LIKE will, as a bonus, us

Re: Joins and Unions

2003-08-14 Thread Hans van Harten
Kim Kohen wrote: Comparing > PageAd_num status stories > 14312-T1308 Ad Complete 1-marchingband-A33Placed > 14312-T1308 Ad Complete 1-jobs-T33 > Placed 14312-T1308 Ad Complete 1-illegalbuild-A32 > Plac

Re: mysql LOAD DATA INFILE

2003-08-14 Thread Hans van Harten
Mike, There's another thread in this group 'Probleem with data import from text file'. In one of the messages you'll find 'There was a bug in v4.0.12 for Windows: binary packages were compiled without --enable-local-infile.' Might apply to you too. HansH P.S.: Running on W-XP I cann't get it to

Re: Searching on Two Keys with OR?

2003-08-14 Thread Hans van Harten
Steven Roussey wrote: >> "ORing on two different fields" is what I have been asking about :). > This is not optimized, and I don't think it is set to be optimized > until 5.1 (as per someone else's comment). >> Using a composite index was suggested > This is bad information. It works for AND, not

Re: select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51

2003-08-14 Thread Hans van Harten
Fatt Shin wrote: > Yes, found the problem, you are right. Thanks. > But this is something caused by powerbuilder, in my code I never put > any space between count(*), but when it goes to odbc, an space is > added. Any idea how to solve this? Wouldn't sum(1) return the same count -theoratically fast

Re: Problem with data import from text file (part two)

2003-08-10 Thread Hans van Harten
adrian GREEMAN wrote: > I have also read the manual section on this {as I should have > done] to try and understand it > and how to enable reading a local file - the discussion section > seems confusing and confused. > > I tried following what others have done and > modified the ini file with set-v

Re: IP Addresses MySQL Listens On

2003-08-09 Thread Hans van Harten
Jim McAtee wrote: > Quick question or two regarding the IP addresses MySQL listens on: > Does MySQL automatically listen on all IP addresses bound to the > machine on which it runs? (MySQL 3.23.xx on Windows 2000). > I've got a multi-homed server with dual NICs. To date I've always > connected fr