Re: A picture perfect problem

2005-04-15 Thread Dan Nelson
In the last episode (Apr 15), Dana Terrell said: > I thank one and all for your help with my last problem and now I come > to you with another that has crept up. My superiors have decided > that they also want to store photographs in the database as well. I > know that in MSSqlServer I can set a

Re: zip code search within x miles

2005-04-15 Thread Jeff Kolber
How are sites doing the search by zip and coming up with results within x miles? Is there some OSS zip code download that has been created for this? I have to do this on a high volume realestate website - we use the great circle concept to calculate the limits on longitudes and latitudes to be wi

RE: zip code search within x miles

2005-04-15 Thread gunmuse
I have a copy of the Zip Code db for MySql. Its a few years old but should be 99% accurate compared to new ones. Thanks Donny Lairson President 29 GunMuse Lane P.O. box 166 Lakewood NM 88254 http://www.gunmuse.com 469 228 2183 -Original Message- From: Scott Gifford [mailto:[EMAIL PROTE

Re: zip code search within x miles

2005-04-15 Thread Scott Gifford
Scott Haneda <[EMAIL PROTECTED]> writes: > How are sites doing the search by zip and coming up with results within x > miles? Is there some OSS zip code download that has been created for this? Zipdy does most of what you want; it needs to be modified to support MySQL instead of PostgreSQL, but

A picture perfect problem

2005-04-15 Thread Dana Terrell
I thank one and all for your help with my last problem and now I come to you with another that has crept up. My superiors have decided that they also want to store photographs in the database as well. I know that in MSSqlServer I can set a field to ole datatypes and it will store photos, but I do

Re: zip code search within x miles

2005-04-15 Thread Greg Donald
On 4/15/05, Scott Haneda <[EMAIL PROTECTED]> wrote: > How are sites doing the search by zip and coming up with results within x > miles? Is there some OSS zip code download that has been created for this? http://marc.theaimsgroup.com/?l=php-general&m=110547634827453&w=2 -- Greg Donald Zend Cer

Re: zip code search within x miles

2005-04-15 Thread Robert Dunlop
I haven't looked into this recently, but as long as 15 years ago there were zip -> mile libraries available; I assume similar libraries still exist. The ones I worked with all used only the first 3 digits. Full five digit and nine digit zips get to pretty specific geographic locations, a level of

auto-increment by a specific number

2005-04-15 Thread StinkyPup
How do I auto-increment by a specific number. For example by 100: IDData 100 blah blah blah 200 blah blah foo ALTER TABLE PRODUCT AUTO_INCREMENT = 100 doesn't do what I want to do. TIA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscrib

RE: zip code search within x miles

2005-04-15 Thread gunmuse
We convert the zip code into a Lat and long. Run the math looking for all other zips in that area, then convert that back to lat long for a mileage calculation of each. I know there's a better way to do this we just haven't seen the benefit in rewriting it now. Watch PHP a lot of this in coming

zip code search within x miles

2005-04-15 Thread Scott Haneda
How are sites doing the search by zip and coming up with results within x miles? Is there some OSS zip code download that has been created for this? -- - Scott HanedaTel: 415.898.2602

Re: How to retain "Key" order when Deleting a Row

2005-04-15 Thread B Wiley Snyder
Thanks, I don't know what I was thinking ?!? From: [EMAIL PROTECTED] To: "B Wiley Snyder" <[EMAIL PROTECTED]> CC: mysql@lists.mysql.com Subject: Re: How to retain "Key" order when Deleting a Row Date: Tue, 12 Apr 2005 14:48:54 -0400 "B Wiley Snyder" <[EMAIL PROTECTED]> wrote on 04/11/2005 10:38:12

Re: updating multi row after fetch...include my query script

2005-04-15 Thread Aji Andri
I'm sorry. the method that I use is post that each value is define by a variable, but the looping proses make it only there only one variable for each row and each column. so..still a dead and for me >>> please refer to the web page view _

RE: Computer reboots during long table join

2005-04-15 Thread mos
At 10:30 AM 4/15/2005, Andrew Maynes wrote: My win98 is rebooting after a while which is very odd, I reckon someone from the list has hacked people from on this list Andrew When I had Win'98 it would reboot twice a day. Win'98 is a garbage OS that was as stable as a 3 legged card table. No one o

Re: order important in grant commands?

2005-04-15 Thread Gleb Paharenko
Yes, it is a weird behavior for MySQL. If you are able to make a reproducible test case, report a bug. If not, switch to the debug version of MySQL server. The clues could be in the trace files. "Mark M. Ito" <[EMAIL PROTECTED]> wrote: > Gleb et al., > > Gleb Paharenko wrote: > >

Re: MySQL Crash Diagnosis

2005-04-15 Thread Gleb Paharenko
Hello. Really, there is not enough information. I suggest you to upgrade to the latest release (4.1.11 now). If the problem remains, our next step will be finding a possible query which crashes the server. Jason Johnson <[EMAIL PROTECTED]> wrote: > [-- text/plain, encoding 7bit, chars

Re: Computer reboots during long table join

2005-04-15 Thread Gleb Paharenko
Hello. I think MySQL is able to join even lager tables. We don't have enough information to make a conclusion. Searching in bugs database with version 4.1.10 and OS windows returned several similar bugs. Upgrade to the latest release (4.1.11 now) and search in the bugs database as well:

Re: updating multi row after fetch...include my query script

2005-04-15 Thread SGreen
Aji Andri <[EMAIL PROTECTED]> wrote on 04/15/2005 03:49:52 PM: > this is my prosedure > 1st. I'm, selecting base on std_nis=111 in > STY_RANK_200501 > 2nd. looping and fetching echoing > looping and fetching echoing >while ($nline = mysql_fetch_array($result)) { >echo $nl

Re: updating multi row after fetch...include my query script

2005-04-15 Thread Aji Andri
this is my prosedure 1st. I'm, selecting base on std_nis=111 in STY_RANK_200501 2nd. looping and fetching echoing looping and fetching echoing while ($nline = mysql_fetch_array($result)) { echo $nline["std_value"] echo $nline["std_item"] } - end looping and fetch

LIMIT clause only works with hard-coded constants

2005-04-15 Thread Joshua Mendenhall
Is there any plans for this to be changed in a future release? I would like to use a parameterized LIMIT clause in my stored procedures, but this limitation of the LIMIT clause makes that impossible. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:ht

Re: Securing Mysql 4.1 on the mac.

2005-04-15 Thread Brent Baisley
Can you login using the mysql command line client from your Mac? mysql -u username -p That will make sure the password is set and working. What do you mean by failed? You get a message about incorrect password? I've never had a problem with installing and using mysql on a Mac. On Apr 15, 2005, at 1

Re: updating multi row after fetch...include my query script

2005-04-15 Thread Aji Andri
my looping in my first script, from table STY_REPORT_200501 I'm including the value -1st query (looping)- $query = "select a.*, b.sty_descr as styname from STY_REPORT_200501 a left join STY_ITEM b on a.std_item=b.sty_code where a.std_nis=111 -end looping the result is

Re: LEFT JOINS same data twice?

2005-04-15 Thread SGreen
Fixing my brain farts :-( > Run your "current status" queries against the "current" table while if you > want in-depth history of a particular flight, use the "history" table. > This will increase your responsiveness considerably as there should be > only 1 record per active flight in that t

Warning (reformulated)

2005-04-15 Thread Andy Pieters
Hi all Realizing maybe my first post wasn't clear enough... How can I determine the cause for a warning. The MySql version is 3.23.58 The query I used was: UPDATE `shop_products` SET `name`='TestProd' , `shopid`='20-302' , `sdesc`='This is a test product' ,    

Fw: updating multi row after fetch...include my query script

2005-04-15 Thread SGreen
(You always need to include the list on all responses. In this case, I do not work in PHP enough to be able to help with this particular problem but I know there are several PHP experts on the list.) -- SG - Forwarded by Shawn Green/Unimin on 04/15/2005 02:38 PM - Aji Andri <[EMAIL PROTE

Re: Computer reboots during long table join

2005-04-15 Thread Andy Pieters
On Friday 15 April 2005 17:52, mos wrote: > I found out what the problem was. The computer rebooted at 3AM. I > checked the event log and good old MS auto installed updates at 3AM every > day. I NEVER have this option turned on but somehow something turned it on. > Good old @#$!@ MS *hit h

Re: LEFT JOINS same data twice?

2005-04-15 Thread SGreen
"Chris Knipe" <[EMAIL PROTECTED]> wrote on 04/15/2005 01:20:33 PM: > > I eliminated your GROUP BY clause because you weren't actually GROUPing > > anything. You weren't looking for a MIN(), a MAX(), an AVG(), or anything > > else that GROUP BY was intended to be used for. That method of > > de-d

Re: updating multi row after fetch...include my query script

2005-04-15 Thread Aji Andri
I'm sorry if I didn't make it so clear, here is what I'm doing, ---script start here--- $query = "select a.*, b.sty_descr as styname from STY_REPORT_200501 a left join STY_ITEM b on a.std_item=b.sty_code where a.std_nis=" . $stid; $result = mysql_query($query)

Re: slave out of sync

2005-04-15 Thread Atle Veka
To answer the original poster of this thread, it would help if you could post more details about what happened such as error messages and mysqld versions. My hunch is that the binlog got corrupted and the slave choked on it. Did you try issuing 'SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1' (omit GLOBAL if

Re: Optimization; index on combined PK

2005-04-15 Thread Joerg Bruehe
Hi! Am Fr, den 15.04.2005 schrieb Fan, Wellington um 18:50: > Hello all, > > I have a link table that relates 'Profiles' with 'Categories': > > CREATE TABLE lnk_profile_category ( > profile_fk int(11) NOT NULL default '0', > category_fk int(11) NOT NULL default '0', > PRIMARY KEY (catego

Re: Optimization; index on combined PK

2005-04-15 Thread SGreen
"Fan, Wellington" <[EMAIL PROTECTED]> wrote on 04/15/2005 12:50:07 PM: > Hello all, > > I have a link table that relates 'Profiles' with 'Categories': > > CREATE TABLE lnk_profile_category ( > profile_fk int(11) NOT NULL default '0', > category_fk int(11) NOT NULL default '0', > PRIMARY KE

Re: LEFT JOINS same data twice?

2005-04-15 Thread Chris Knipe
I eliminated your GROUP BY clause because you weren't actually GROUPing anything. You weren't looking for a MIN(), a MAX(), an AVG(), or anything else that GROUP BY was intended to be used for. That method of de-duplicating results will return potentially misleading information as it will randomly

Re: remove newline hack?

2005-04-15 Thread Eamon Daly
Use REPLACE. This drops all carriage returns and line-feeds: SELECT REPLACE(REPLACE(log, '\r', ''), '\n', '') FROM test; Couple with UPDATE to actually change the existing data: UPDATE test SET log = REPLACE(REPLACE(log, '\r', ''), '\n', ''); If you only want to drop trailing carriage returns and

Optimization; index on combined PK

2005-04-15 Thread Fan, Wellington
Hello all, I have a link table that relates 'Profiles' with 'Categories': CREATE TABLE lnk_profile_category ( profile_fk int(11) NOT NULL default '0', category_fk int(11) NOT NULL default '0', PRIMARY KEY (category_fk,profile_fk) ) TYPE=MyISAM; If I expect that my most frequent queries ar

Re: updating multi row after fetch

2005-04-15 Thread SGreen
Aji Andri <[EMAIL PROTECTED]> wrote on 04/15/2005 12:34:23 PM: > STY REPORT > > std_nis std_class std_item std_value > 1111 1 8 > 111 1 2 7 > 111 1 5 6 > 111 1 4 9 > 222 3 1 6 > 222

remove newline hack?

2005-04-15 Thread Dan Bolser
How to remove newlines from a column? Data is given me in binary format. If I dump should I set some new record terminator, parse out newlines and reload? Any beter hack? Dan. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.

optimal number of connections?

2005-04-15 Thread Jeff Drew
Our Java application has several threads that use JDBC to write to several tables. Currently, we use one JDBC connection. Would performance improve if we used a connection per table? Is a single connection bad for some reason? Since connection pooling is a hot topic, I'm wondering if we're mis

Re: updating multi row after fetch

2005-04-15 Thread Aji Andri
STY REPORT std_nis std_class std_item std_value 111 1 1 8 111 1 2 7 111 1 5 6 111 1 4 9 222 3 1 6 222 3 2 5 222 3 3 6 my fet

Re: order important in grant commands?

2005-04-15 Thread Mark M. Ito
Gleb et al., I've tried something else. Fearing that the problem is due to some interaction with an already rather complicated set of privilege tables, I tried to reproduce the problem starting from a very simple mysql database. I was indeed able to reproduce the problem, but the order of "good

Re: Computer reboots during long table join

2005-04-15 Thread mos
At 10:21 AM 4/15/2005, Ian Gibbons wrote: On 15 Apr 2005 at 9:47, mos wrote: > I'm running MySQL 4.1.10 on XP and I was doing a 2 table equi join join on > a date field that was indexed. There are It was taking quite a long time so > I let it run overnight. There are 200 million rows in the first

Securing Mysql 4.1 on the mac.

2005-04-15 Thread Brett Harvey
Hello, I went through the install for mysql 4.1.11 on the mac. Two different macs. When I leave the password empty (don't make changes), I can connect with CocoaMysql and the Mysql Administrator without any problem. Obviously, I don't want to leave the root (or any user) without a password. So,

Re: Computer reboots during long table join

2005-04-15 Thread Frank Bax
At 11:21 AM 4/15/05, Ian Gibbons wrote: On 15 Apr 2005 at 9:47, mos wrote: > I'm running MySQL 4.1.10 on XP and I was doing a 2 table equi join join on > a date field that was indexed. There are It was taking quite a long time so > I let it run overnight. There are 200 million rows in the first t

Re: LEFT JOINS same data twice?

2005-04-15 Thread Peter Brawley
Shawn, >Even though the docs say that only 1 index is ever used per >query, I believe that each JOIN can also make use of an index if it exists >(this belief is based on the results of the EXPLAIN(s) of queries >containing JOINed tables. However, I could be completely wrong in this >belief

book

2005-04-15 Thread Cupofjava1961
Does anyone on the list have an opinion of Using and Managing Mysql by O'Reilly & Assoicates.

RE: Computer reboots during long table join

2005-04-15 Thread Andrew Maynes
My win98 is rebooting after a while which is very odd, I reckon someone from the list has hacked people from on this list Andrew >-Original Message- >From: Ian Gibbons [mailto:[EMAIL PROTECTED] >Sent: 15 April 2005 16:22 >To: mos; mysql@lists.mysql.com >Subject: Re: Computer reboots duri

Re: Temporal databases & MySQL

2005-04-15 Thread emierzwa
What you describe makes sense and would certainly work, I don't know that I would call it a temporal solution. The ENUM (I, U, D) seams a bit redundant with time. This model resembles a traditional application log or trace file, which is highly desirable for a records keeping system, like for a pho

Re: Computer reboots during long table join

2005-04-15 Thread Ian Gibbons
On 15 Apr 2005 at 9:47, mos wrote: > I'm running MySQL 4.1.10 on XP and I was doing a 2 table equi join join on > a date field that was indexed. There are It was taking quite a long time so > I let it run overnight. There are 200 million rows in the first table, but > a Where clause on the sec

Re: order important in grant commands?

2005-04-15 Thread Mark M. Ito
Gleb et al., Gleb Paharenko wrote: I think the grant statements flow order doesn't matter, because according to: http://dev.mysql.com/doc/mysql/en/connection-access.html server sorts the entries of the grant tables before reading them. That is what I thought. Because of the sorting I should not

Re: just dumping table definitions, not data

2005-04-15 Thread Peter Brawley
James, Is there a simple way to just get all the table definitions? Use the mysqldump -d, --no-data option. PB - James Black wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a simple way to just get all the table definitions? I have a bug in mysql connectorj and I want to send my s

re: just dumping table definitions, not data

2005-04-15 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a simple way to just get all the table definitions? I have a bug in mysql connectorj and I want to send my stored procedure with the table definitions, but there are several tables used in it. This is with mysql 5.0.3, btw. Thanx. - -- "Lo

Computer reboots during long table join

2005-04-15 Thread mos
I'm running MySQL 4.1.10 on XP and I was doing a 2 table equi join join on a date field that was indexed. There are It was taking quite a long time so I let it run overnight. There are 200 million rows in the first table, but a Where clause on the second table would have reduced this to around

Returned mail: see transcript for details

2005-04-15 Thread kameking
The original message was received at Thu, 14 Apr 2005 12:04:09 +0200 from [148.140.102.49] - The following addresses had permanent fatal errors - mysql@lists.mysql.com - Transcript of the session follows - ... while talking to 52.171.102.24: >>> MAIL FROM:[EMAIL PROTECTED] <<< 508

Re: which one is faster

2005-04-15 Thread Frank Bax
At 09:22 AM 4/15/05, DebugasRu wrote: taken from the manual 3.6.2 The Row Holding the Maximum of a Certain Column which of the two queries will in general be faster: 1) SELECT article, dealer, price FROM shop WHERE price=(SELECT MAX(price) FROM shop); 2) SELECT article, dealer, price FROM shop

Re: updating multi row after fetch

2005-04-15 Thread SGreen
Aji Andri <[EMAIL PROTECTED]> wrote on 04/15/2005 09:01:40 AM: > Yes, I want to update all row in one query > --- Michael Stassen <[EMAIL PROTECTED]> > wrote: > > Aji Andri wrote: > > > > > my table properties > > > > > > `STY_REPORT_200501` ( > > > `std_nis` int(10) NOT NULL default '0', > >

Re: LEFT JOINS same data twice?

2005-04-15 Thread SGreen
"Chris Knipe" <[EMAIL PROTECTED]> wrote on 04/15/2005 04:36:17 AM: > >> SELECT tlb1.DepartureLocation AS Departure, tbl1.DepartureLocation AS > >> Destination LEFT JOIN DepartureLocation ON > >> tlb2.DepartureID=tlb1.LocationID LEFT JOIN DepartureLocation ON > >> tbl2.ArrivalID=tbl1.LocationID

Warning but show warning not available (mysql version 3.21)

2005-04-15 Thread Andy Pieters
Hi all I use a script to build a query and while testing this script by copy'ing it into the mysql console, it shows me a warning. However, the SHOW WARNINGS; is not available on versions < 4. mysql> describe shop_products; ++---+--+-+-+

Re: Multiple sums in a single select?

2005-04-15 Thread SGreen
Kendall Bennett <[EMAIL PROTECTED]> wrote on 04/14/2005 06:55:02 PM: > Hi Guys, > > I am trying to work out if it is possible to create a select statement > that will sum table data into columns with different criteria and have > it all in one select statement. For instance I have the followin

which one is faster

2005-04-15 Thread DebugasRu
taken from the manual 3.6.2 The Row Holding the Maximum of a Certain Column which of the two queries will in general be faster: 1) SELECT article, dealer, price FROM shop WHERE price=(SELECT MAX(price) FROM shop); 2) SELECT article, dealer, price FROM shop ORDER BY price DESC LIMIT 1; or do

Re: MySQL Crash Diagnosis

2005-04-15 Thread Jason Johnson
Doesn't seem like this is going to be much help, but this is what I could pull together. The highlighted lines seem to be the only indication as to something going wrong. No real error. Any thoughts? 050414 8:30:24 InnoDB: Started; log sequence number 0 996013795 D:\MySQL Server 4.1\bin\mysqld

Re: updating multi row after fetch

2005-04-15 Thread Aji Andri
Yes, I want to update all row in one query --- Michael Stassen <[EMAIL PROTECTED]> wrote: > Aji Andri wrote: > > > my table properties > > > > `STY_REPORT_200501` ( > > `std_nis` int(10) NOT NULL default '0', > > `std_class` varchar(10) default NULL, > > `std_item` int(2) default NULL, > >

Re: updating multi row after fetch

2005-04-15 Thread Michael Stassen
Aji Andri wrote: my table properties `STY_REPORT_200501` ( `std_nis` int(10) NOT NULL default '0', `std_class` varchar(10) default NULL, `std_item` int(2) default NULL, `std_value` float default NULL, `std_letter` char(2) default NULL, `std_entusr` varchar(10) NOT NULL default '', KEY

updating multi row after fetch

2005-04-15 Thread Aji Andri
my table properties `STY_REPORT_200501` ( `std_nis` int(10) NOT NULL default '0', `std_class` varchar(10) default NULL, `std_item` int(2) default NULL, `std_value` float default NULL, `std_letter` char(2) default NULL, `std_entusr` varchar(10) NOT NULL default '', KEY `std_class` (`s

Re: Wise to update 4.1.10a to 4.1.11?

2005-04-15 Thread Joerg Bruehe
Hi Bas! Am Fr, den 15.04.2005 schrieb B.Brey um 11:27: > We were planning to upgrade to 4.1.10a until 4.1.11 came out. > Does 4.1.11 only contain bugfixes/security fixes? > > I'm trying to find out if it could be harmfull to our application if we > switch to 4.1.11 instead of 4.1.10a. That is h

Wise to update 4.1.10a to 4.1.11?

2005-04-15 Thread B.Brey
We were planning to upgrade to 4.1.10a until 4.1.11 came out. Does 4.1.11 only contain bugfixes/security fixes? I'm trying to find out if it could be harmfull to our application if we switch to 4.1.11 instead of 4.1.10a. anyone? with regards, Bas J. Brey Multimedia Developer Magenta MultiMedia

Re: LEFT JOINS same data twice?

2005-04-15 Thread Chris Knipe
SELECT tlb1.DepartureLocation AS Departure, tbl1.DepartureLocation AS Destination LEFT JOIN DepartureLocation ON tlb2.DepartureID=tlb1.LocationID LEFT JOIN DepartureLocation ON tbl2.ArrivalID=tbl1.LocationID ORDER BY tbl2.Time etc etc etc I get ERROR 1066 (42000): Not unique table/alias: 'tbl1'

Re: order important in grant commands?

2005-04-15 Thread Gleb Paharenko
Hello. I think the grant statements flow order doesn't matter, because according to: http://dev.mysql.com/doc/mysql/en/connection-access.html server sorts the entries of the grant tables before reading them. What output does the following statement produce: show grants for current

Re: Connector/J + Licensing

2005-04-15 Thread Gleb Paharenko
Hello. The complete answer could only be obtained from [EMAIL PROTECTED] >Hi Everyone, > >I've read the GPL and LGPL and all the crazy legalese that ensues >and it's still not >clear - I might be a bit dense. I would like to release a >commercial application that >

Re: No Priviliges and no snort DB in phpmyadmin

2005-04-15 Thread Gleb Paharenko
Hello. As of MySQL 4.0.2, you see only those databases for which you have some privileges if you don't have the global SHOW DATABASES privilege. Check the rights of user as which phpmyadmin connects. Mark Sargent <[EMAIL PROTECTED]> wrote: > Hi All, > > I've installed phpmyadmin

Re: MySQL connection with other database engines

2005-04-15 Thread Gleb Paharenko
Hello. It is not clear what do you mean. If you want to access remote tables use Federated storage engine, but it is not production ready yet. See: http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html sujata chaudhari <[EMAIL PROTECTED]> wrote: > hi, > can MySQL engin