Re: Padding date results

2005-11-06 Thread SGreen
Marcus Bointon [EMAIL PROTECTED] wrote on 11/06/2005 05:53:50 PM: I'm generating data to use for a php graph-drawing utility where I summarise data into daily counts of events relating to an 'issue' item from an 'event' table via a 'session' table. My queries are currently along these

Re: SQL help for qty Sold YTD...

2005-11-04 Thread SGreen
I would first try refactoring your SQL to use INNER JOIN statements instead of the comma separated lists you are currently using. I would also not use any subqueries. Test this and see if it works for you: SELECT SUM(li.quantity) as qtysoldytd FROM LineItem li INNER JOIN Sales sa on

Re: Edit MySQL through MS Access?

2005-11-04 Thread SGreen
In MS Access, linked tables (not imported tables) are live with the backend. If you change something in a linked table, that change automatically propogates to the origin of the link and changes the source of the data. Try setting up your tables as linked tables and see if it helps. Shawn

Re: PHP/MySQL vs ASP/MSSQL?

2005-11-04 Thread SGreen
Jigal van Hemert [EMAIL PROTECTED] wrote on 11/04/2005 03:09:58 AM: Marc Pidoux wrote: I've been using ASP for years but I have to work on a bigger project involving many users and data so of course, Access is not an option anymore. Since it's a project requiring thousand of files and

Re: Problems finding the MAX value

2005-11-04 Thread SGreen
KEVIN ZEMBOWER [EMAIL PROTECTED] wrote on 11/04/2005 11:05:05 AM: My organization runs an online auction on our intranet server for the United Way. I'm having a hard time printing out a list of the winning bidders (I'm under a lot of pressure; the baked goods are getting stale). In

Re: Problems finding the MAX value

2005-11-04 Thread SGreen
[EMAIL PROTECTED] wrote on 11/04/2005 11:22:35 AM: This is such a FAQ that they put the answer in the manual: http://dev.mysql.com/doc/refman/5.0/en/index.html OOPS! I copied the wrong link. It should have been: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html

Re: Problems finding the MAX value

2005-11-04 Thread SGreen
How it works... KEVIN ZEMBOWER [EMAIL PROTECTED] wrote on 11/04/2005 12:40:50 PM: Man, you're awesome. Only two typos in the whole procedure. However, for the life of me, I'm puzzled over how it works. If you have more patience can you explain? Correct query (table is singular, not

Re: Help optimize this simple find

2005-11-04 Thread SGreen
Brian Dunning [EMAIL PROTECTED] wrote on 11/04/2005 10:36:00 PM: This simple find is taking 4 to 7 seconds. Way too long!! (This is a geotargeting query using the database from IP2location.) select lat,lon from geocodes where ipFROM=1173020467 and ipTO=1173020467 The database looks

Re: Always Storing Upper Case Text in a Table

2005-11-03 Thread SGreen
Malik Kuldeep-LKM041 [EMAIL PROTECTED] wrote on 11/03/2005 10:48:21 AM: Hi, I have a requirement to always store the UPPER CASE text for the VAR and VARCHAR type columns in a table. Is there a way I can specify it during the CREATE TABLE statement? Kuldeep Malik No. That is something

Re: How to add a host so 'root' can connect to the server from it

2005-11-03 Thread SGreen
| | 192.168.% | sgreen | | % | slave | | localhost | ChartReader| | localhost | cpwapp2| | localhost | dataimporter | | localhost | datareader | | localhost | odbctest | | localhost | root | +---++ 8 rows in set

Re: How to add a host so 'root' can connect to the server from it

2005-11-03 Thread SGreen
Answers intermixed. See below Xiaobo Chen [EMAIL PROTECTED] wrote on 11/03/2005 04:28:08 PM: Thank so much for the detailed explaination. I do appreciate it. It's more clear now. But I still have a question: I do see 'root' after: select user,host from mysql.user; Then I did this

Re: RES: Delivery by Demand

2005-11-03 Thread SGreen
Yes, it is a client-side behavior to the extent that the MySQL server does not page through data. It gets the complete results unless you ask for a LIMIT, then it stops building results after it meets the criteria of your LIMIT. I really do not know much about Oracle administration and

Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-02 Thread SGreen
Jigal van Hemert [EMAIL PROTECTED] wrote on 11/02/2005 03:29:14 AM: Shankar Unni wrote: [EMAIL PROTECTED] wrote: If I understand the InnoDB engine correctly, I don't see how they could speed it up unless they start tracking how many records belong to each active version within a

Re: Delivery by Demand

2005-11-02 Thread SGreen
Fabricio Mota [EMAIL PROTECTED] wrote on 11/02/2005 10:23:46 AM: Hi all, In the past, I worked as a Oracle user. I've noted that in oracle (or maybe in that configuration), when we request a great amount of data, such like: select * from million_records_table It does not delivers the

Re: How does this work?

2005-11-02 Thread SGreen
Brian Dunning [EMAIL PROTECTED] wrote on 11/02/2005 09:12:39 PM: On Nov 2, 2005, at 6:03 PM, Matt Babineau wrote: It will do your whole table. Then give you 50 records. But there won't be any duplicates, right? It won't include the same records more than once. I know that sounds stupid,

Re: Folder recursion

2005-11-01 Thread SGreen
Brian e Boothe [EMAIL PROTECTED] wrote on 10/31/2005 10:21:35 PM: I.m needing assistance in get a problem Solved , What im attempting to do is have MySQL thru asp or PHP look thru Folders and add to a Mysql database the path and folder name and file located within that directory into

RE: Folder recursion explained

2005-11-01 Thread SGreen
This is an excellent example of WHY you need to always CC: the list on all responses. I cannot specifically answer your response because I do not use enough PHP to help. In extremely generic terms, what you need to do is: a) connect to the database server b) send to the database server an

Re: Questions on INSERT IGNORE

2005-11-01 Thread SGreen
Comments embedded. See below Hal Vaughan [EMAIL PROTECTED] wrote on 11/01/2005 02:50:13 PM: I want to be sure I understand INSERT IGNORE... correctly before I start depending on it. Up until now, I have not been using any kind of key or unique index, since many of my tables are created

Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-01 Thread SGreen
Kevin Burton [EMAIL PROTECTED] wrote on 11/01/2005 03:39:59 PM: MyISAM has a cool feature where it keeps track of the internal row count so that SELECT COUNT(*) FROM FOO executes in constant time. Usually 1ms or so. The same query on INNODB is O(logN) since it uses the btree to

Re: Migration problem

2005-11-01 Thread SGreen
ISC Edwin Cruz [EMAIL PROTECTED] wrote on 11/01/2005 04:33:39 PM: Hi All!! I recently have migrated a database from SQL Server 7.0 to Mysql 5.0.14 (I´ve used MySQL Migration tool), mi probem is that the queries where i use foreing keys are tooo sloowww Specialy in two tables; mysql

Re: run mysqld-nt.exe in background

2005-10-31 Thread SGreen
Jigal van Hemert [EMAIL PROTECTED] wrote on 10/31/2005 03:41:39 AM: [EMAIL PROTECTED] wrote: wang shuming [EMAIL PROTECTED] wrote on 10/31/2005 01:11:06 AM: How could run mysqld-nt.exe in background on win2000/XP, not as a would be useful in HIS operating system. AFAIK, there has never,

Re: FW: So when are we switching over to the...

2005-10-31 Thread SGreen
Table function: A function that return a value of the table data type (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ta-tz_7ysl.asp). This is similar but not the same as creating a temporary table to store the results of a query. Variables declared as type table

Re: 5.0.15 error 1054

2005-10-31 Thread SGreen
hcir [EMAIL PROTECTED] wrote on 10/31/2005 12:37:15 PM: iH i saw this report as a bug for previous mysql versions but not for 5.0.15 ERROR 1054 (42S22): Unknown column 'c.len' in 'on clause' the query that generated this works fine of mysql 5.0.11 others having this issue? using OS

Re: 5.0.1 vs 5.0.15: view performance

2005-10-30 Thread SGreen
YL [EMAIL PROTECTED] wrote on 10/30/2005 10:24:24 AM: Dear list, I need some inputs/help on my finding below: 5.0.15 make my view (below) almost useless compare with 5.0.1-alpha: with the same data set, 5.0.15 took 18min but 5.0.1 took 6.3sec to get the result: mysqlselect count(1) from

Re: 5.0.1 vs 5.0.15: view performance

2005-10-30 Thread SGreen
You just identified the reason this is SO slow. You seem to have no indexes. Can you post the results of SHOW CREATE TABLE address_association\G SHOW CREATE TABLE address\G SHOW CREATE TABLE enterprise_unit\G That will let me know exactly what is and isn't already indexed. Thanks! Shawn Green

Re: 5.0.1 vs 5.0.15: view performance

2005-10-30 Thread SGreen
As I suspected, you have no indexes. You didn't even define a primary key (PK). For each table, decide which column or combination of columns you can use to uniquely identify each row. Make that your PRIMARY KEY for each table. For other columns or combinations of columns you frequently use in

Re: run mysqld-nt.exe in background

2005-10-30 Thread SGreen
wang shuming [EMAIL PROTECTED] wrote on 10/31/2005 01:11:06 AM: Hi, How could run mysqld-nt.exe in background on win2000/XP, not as a service of windows. mysqld-nt.exe --console alway show a dos/ text window . Regards! Shuming Wang Xtech Company limited Room 17G,17/F,Plaza 2, Tiancheng

Re: MySQL and dates puzzle

2005-10-28 Thread SGreen
Mike, you did a wonderful job at analysis (identifying the 6 cases) but I think a series of visual clues would have made a simpler query more obvious. Here's how I understand the issue (I am a more visual thinker) Start with the case of needing to see if a new record (NR) overlaps with an

Re: Does MySQL 3.23.58 Support UNION

2005-10-28 Thread SGreen
Simon Longstaff [EMAIL PROTECTED] wrote on 10/28/2005 10:50:24 AM: I'm trying to run this : SELECT DISTINCT A.B_IP FROM w3t_Posts A , w3t_Users B WHERE A.B_PosterID = B.U_Number and B.U_Username = 'user1' UNION SELECT DISTINCT C.B_IP FROM w3t_Posts C , w3t_Users D WHERE C.B_PosterID =

Re: UNIQUE and INDEX using same field.

2005-10-28 Thread SGreen
Michael J. Pawlowsky [EMAIL PROTECTED] wrote on 10/28/2005 11:28:42 AM: When creating an index in phpMySQL I get a warning message about having 2 indexes using the same field. The table is simply a product comment table. The first index is simply an INDEX on the product_id to speed up

Re: GROUP BY Destroys 2nd Function

2005-10-28 Thread SGreen
Everything snipped David, is it at all intuitive to organize your geography into a tree-type structure? Here is an example: Western Hemisphere (hemisphere) C. America (continent) Guatemala (country) N. America (continent) Canada (country)

Re: 'GROUP BY' behavior

2005-10-28 Thread SGreen
Bill Adams [EMAIL PROTECTED] wrote on 10/28/2005 01:49:28 PM: All, In the following query, some of the values are averaged over several rows, but some are not: SELECT hostname, volname, qtreename, round(avg(used/allocated*100),0), round(avg(used)), allocated, available FROM

Re: Sum of Sales

2005-10-26 Thread SGreen
news [EMAIL PROTECTED] wrote on 10/26/2005 09:46:49 AM: I am unsure how to write this query, can someone help? I have two tables. One has a list of retailers (tbl_retailer): retailerid name postcode e.g. 1 Sprocket Supplies CH23 4PY The other has the sales by month for

Re: Sum of Sales

2005-10-26 Thread SGreen
news [EMAIL PROTECTED] wrote on 10/26/2005 04:02:33 PM: Michael Stassen wrote: Daniel Bowett wrote: Peter Brawley wrote: Dan, /...Total sales for ever would be a simple GROUP BY query with a sum on the sales - but I cant see how I am going to get this info. Do I need to use

Re: Map of MySQL Users

2005-10-25 Thread SGreen
Claire McLister [EMAIL PROTECTED] wrote on 10/24/2005 05:19:18 PM: Hi, We've developed an automatic email mapping capability from Google Maps API. To try it out, we mapped origins of emails to this group from October 3 through October 14th. The result of this map is at:

Re: Help on nested categories query

2005-10-25 Thread SGreen
pedro mpa [EMAIL PROTECTED] wrote on 10/24/2005 06:32:48 PM: Hi! I need help on implementing a query that performs a search for items under nested categories. An example is on ebay search where you can restrict your search by selecting a subcategory and you only get items under that

Re: Setup for MythTV

2005-10-25 Thread SGreen
Jim C. [EMAIL PROTECTED] wrote on 10/25/2005 11:10:50 AM: Where can I get tips on how to manually set up MySQL for MythTV? MythTV's site was not very helpful in this regards. Jim C. [attachment signature.asc deleted by Shawn Green/Unimin] I think they (MythTV) probably know more about

Re: Setup for MythTV

2005-10-25 Thread SGreen
Erich Beyrent [EMAIL PROTECTED] wrote on 10/25/2005 12:06:28 PM: [EMAIL PROTECTED] wrote: Jim C. [EMAIL PROTECTED] wrote on 10/25/2005 11:10:50 AM: Where can I get tips on how to manually set up MySQL for MythTV? MythTV's site was not very helpful in this regards. Jim C.

Re: Making mysql tables

2005-10-25 Thread SGreen
I won't translate all of it but I can show you the patterns. See comments interspersed Ed [EMAIL PROTECTED] wrote on 10/25/2005 11:57:21 AM: Hi all, I am doing a tutorial to make a shopping cart. I need to make a mysql db or convert an sql db to mysql. Can anyone give me any pointers

Re: MySQL for a single user

2005-10-25 Thread SGreen
Since you want the setup with the least headache and because you are thinking of writing a book about how to use MySQL, I recommend the Without Installer version. It's basically 4 steps: 1) unzip 2) edit config file 3) install as service 4) start the service It can actually take you more time

Re: Scheme for Displaying Either/And/Or

2005-10-25 Thread SGreen
David Blomstrom [EMAIL PROTECTED] wrote on 10/25/2005 06:23:52 PM: I hope this isn't too long-winded. It's kind of hard to explain. I'm trying to figure out a scheme that will display animal distribution information. First, I want to divide animal species by continents. Next, I want to

Re: sum of time?

2005-10-24 Thread SGreen
[EMAIL PROTECTED] wrote on 10/24/2005 12:48:32 AM: I have a table doing time tracking. I don't use timestamps, I use datetime fields to record punch in times and punch out times. I have this query that computes the amount of time between a punch in and punch out: select

Re: Selecting more than one property (req help)

2005-10-24 Thread SGreen
mem bob [EMAIL PROTECTED] wrote on 10/24/2005 09:45:30 AM: Hi all, Can anyone throw some suggestions at me for this problem? | id | model | service_id | ||---|| | 1 | 500 | 1 | | 2 | 500 | 3 | | 3 | 500 | 10 | | 4 | 600 | 1 | From this table i want to extract

Re: sum of time?

2005-10-24 Thread SGreen
Martijn Tonies [EMAIL PROTECTED] wrote on 10/24/2005 10:16:21 AM: Michael Stassen wrote: snip Second, no, it won't overflow: mysql SELECT SEC_TO_TIME(60*60*24*5); +-+ | SEC_TO_TIME(60*60*24*5) | +-+ | 120:00:00

Re: Temp table doesn't seem to work

2005-10-24 Thread SGreen
Brian Dunning [EMAIL PROTECTED] wrote on 10/24/2005 01:32:43 PM: I got it to work - turns out it was a stupid typo on my part (hate it when that happens - and hate wasting the list's time even more!). How long does this temporary table persist for - just the execution of the one page, or

Re: mysql command line error

2005-10-24 Thread SGreen
Dustin Krysak [EMAIL PROTECTED] wrote on 10/24/2005 03:14:02 PM: Sorry - but to add to this, the command is actually in a bash script. I suspect it is the single quotes and or the () characters Dustin On 24-Oct-05, at 11:57 AM, Dustin Krysak wrote: Hi there - I am trying to

Re: Temp table doesn't seem to work

2005-10-23 Thread SGreen
Brian Dunning [EMAIL PROTECTED] wrote on 10/23/2005 03:00:26 PM: If I say this, I get all my data: ?php $sql = select * from myTable;; $result = mysql_query($sql); ? But if I say this, I get no results at all: ?php $sql = create temporary table xxx select * from myTable;; $result1

Re: help with query

2005-10-22 Thread SGreen
[EMAIL PROTECTED] wrote on 10/22/2005 06:24:07 PM: I have a table of votes with four fields, a primary key, and userID, that are just there for tracking purposes. But then I have questionID and vote fields. For each question, a user could pick a number of it's importance from 1 to 5.

Re: one product in more categories

2005-10-21 Thread SGreen
Response intermixed: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote on 10/21/2005 09:19:41 AM: Thanks Shawn. See comments: [EMAIL PROTECTED] wrote: Sorry I didn't get back to you earlier today. I have had a busy day. Comments embedded... [EMAIL PROTECTED] [EMAIL PROTECTED] wrote on

Re: one product in more categories

2005-10-20 Thread SGreen
Sorry I didn't get back to you earlier today. I have had a busy day. Comments embedded... [EMAIL PROTECTED] [EMAIL PROTECTED] wrote on 10/20/2005 04:35:30 PM: Could you please tell me should this work? CREATE TABLE categories ( cat_id INTEGER(8) UNSIGNED NOT NULL AUTO_INCREMENT,

Re: Dropped a field, need fix emergency

2005-10-20 Thread SGreen
Scott Haneda [EMAIL PROTECTED] wrote on 10/20/2005 08:11:27 PM: I dropped a field in a table, I have a backup, so is what I have done is imported the backup of the table to a new table, so I have table sessions which has a empty field for session_key I now have sessions_backup which has

Re: Input on Materialized Views

2005-10-19 Thread SGreen
Just like Jigal, I also had to lookup the term materialized view. For the sake of others on the list trying to follow along: a materialized view is basically a self-updating snapshot of a table (or tables) usually containing some sort of intermediate statistical computations involving GROUP

Re: Input on Materialized Views

2005-10-19 Thread SGreen
How you redefined your project definitely makes your goal much easier to reach. As I see it, most of what you need to do is related to figuring out how to create disk-cached VIEWs and how to invalidate the cache whenever any of the VIEW's underlying data has changed. This does not

Re: one product in more categories

2005-10-19 Thread SGreen
I don't think you have a clear enough mental picture of what your different pricing structures are. You describe: a) fundamental unit price b) price breaks due to volume discounts c) price breaks due to coupons d) price increases based on options. Options include: embroidered logo, screened

Re: Strange error in query with joins and subquery

2005-10-18 Thread SGreen
(response interspersed) Jasper Bryant-Greene [EMAIL PROTECTED] wrote on 10/17/2005 07:49:36 PM: Just recently (possibly since upgrading to MySQL 5.0.13 RC), I've been getting the following error with queries like the one below. Unknown column 'photos.id' in 'on clause' (1054) SELECT

Re: query help

2005-10-18 Thread SGreen
[EMAIL PROTECTED] wrote on 10/18/2005 06:28:03 AM: Hello, CREATE TABLE t ( dt datetime ) Please assume this is the table structure and contains thousands of records. And I want to list them only last 12 months (that mean last 1 year) records exactly. For that I tried using the

Re: Creating a table on MySQL from Access

2005-10-18 Thread SGreen
Scott Hamm [EMAIL PROTECTED] wrote on 10/18/2005 09:46:20 AM: Is there a way I can create a table on MySQL using Access and establish a link remotely? -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html You can write some

Fw: Access 2002 hangs with MyODBC 3.51.11

2005-10-18 Thread SGreen
The attachment was stripped by the list manager: forwarded to list for general information Shawn - Forwarded by Shawn Green/Unimin on 10/18/2005 12:07 PM - Shawn Green/Unimin 10/18/2005 11:48 AM To nikos [EMAIL PROTECTED] cc mysql@lists.mysql.com Subject Re: Access 2002 hangs with

Re: Fw: query help

2005-10-18 Thread SGreen
[EMAIL PROTECTED] wrote on 10/18/2005 12:01:50 PM: - Original Message - From: grKumaran [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, October 18, 2005 16:08 Subject: query help : Hello, : : CREATE TABLE t ( : dt datetime : ) : : Please assume this is the table

Re: one product in more categories

2005-10-18 Thread SGreen
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote on 10/18/2005 01:50:20 PM: Hi to all! I have tables products and categories CREATE TABLE categories ( cat_id INT(6) NOT NULL AUTO_INCREMENT, cat_name VARCHAR(45) NULL, cat_description TEXT NULL, cat_parent INTEGER(4) UNSIGNED NULL,

Re: renaming the database

2005-10-17 Thread SGreen
Robert L Cochran [EMAIL PROTECTED] wrote on 10/17/2005 07:37:26 AM: I think you can just rename the directory that that database lives in. If you read the documentation for CREATE DATABASE in dev.mysql.com, you'll see they discuss renaming the directory (although it does not directly say

Re: Datatype conversion

2005-10-17 Thread SGreen
Sujay Koduri [EMAIL PROTECTED] wrote on 10/17/2005 06:25:58 AM: hi all, i have a strange problem here. I have around 600 tables in Oracle DB(On 8i, so i am not able to use mysql migration tool kit!!). Now i want move all of these to mysql. I am initially trying to convert the schema from

Re: renaming the database

2005-10-17 Thread SGreen
Robert L Cochran [EMAIL PROTECTED] wrote on 10/17/2005 11:00:33 AM: And, of course, you need to grant permissions for the new database name. Bob [EMAIL PROTECTED] wrote: Robert L Cochran [EMAIL PROTECTED] wrote on 10/17/2005 07:37:26 AM: I think you can just rename the

Re: move log files to a different disk.

2005-10-17 Thread SGreen
Ananda Kumar [EMAIL PROTECTED] wrote on 10/17/2005 09:16:25 AM: Hi Friends, Any help on this would be of great help. regards anandkl On 10/17/05, Ananda Kumar [EMAIL PROTECTED] wrote: Hi All, I am using version 5 of mysql on lunix. I have place my log files in the same disk of

Re: SQL statement help

2005-10-17 Thread SGreen
C.F. Scheidecker Antunes [EMAIL PROTECTED] wrote on 10/16/2005 01:58:56 PM: I actually forgot something. I need a two statements into one. The reason is that table_two has multiple values, so I need the minimal ID from table 2.Thanks. Maybe I am working too much here and tired to see the

Re: How to test the MySQL Server (windows version) ?

2005-10-14 Thread SGreen
lu ming [EMAIL PROTECTED] wrote on 10/14/2005 12:20:19 AM: Hi, joerg Thank you very much! But i want to know more about this problem. I find a perl script about mysql server's test in the mysql-test subdirectory(/mysql-test/mysql-test-run.pl). Is this the test script written

Re: Importing a database error

2005-10-14 Thread SGreen
(response interspersed) Boris Villazon [EMAIL PROTECTED] wrote on 10/14/2005 08:30:13 AM: Hi I am working with MySql 4.1.14 under Windows XP. I am trying to do a database import from a file. I have the following table definiton CREATE TABLE attribute_instance ( name varchar(200)

Re: Convert Subquery - need to find max of a set

2005-10-14 Thread SGreen
Kristen G. Thorson [EMAIL PROTECTED] wrote on 10/14/2005 09:15:21 AM: I need to convert this query into one without a subquery: SELECT r.selector_forms_results_max_points AS points, r.selector_forms_results_description AS description, FROM selector_forms_results AS r WHERE

Re: How to get a count from this query

2005-10-14 Thread SGreen
Gerald Taylor [EMAIL PROTECTED] wrote on 10/14/2005 10:42:33 AM: Thank you for your answer. What I'm trying to do is return the scores of the diff values of datapoints between a particular user and all the other users in the system. (hence the mypmd.uid != pmd.uid) Some datapoints

Re: Innodb?

2005-10-14 Thread SGreen
Joe Herman [EMAIL PROTECTED] wrote on 10/14/2005 01:42:41 PM: Hello, I am just starting with MySQL and PHP, but this discussion about innodb has rather piqued my interest. Can someone please give a brief explanation as to what it is. Cheers, Joe. In a nutshell, InnoDB is one of the data

Re: possible bug in mysql 5.0.13

2005-10-13 Thread SGreen
Peter Brawley [EMAIL PROTECTED] wrote on 10/12/2005 04:27:18 PM: James, Both ... SELECT ... FROM a, b LEFT JOIN c ON a.x=c.y and SELECT ... FROM a LEFT JOIN B USING (x ) LEFT JOIN c ON a.x=c.y work up to and including version 5.0.10, not in 5.0.11, 12 or 13.

Re: upload images / mp3 more Than 1 MB capacity ---- please help

2005-10-13 Thread SGreen
AS JIGAL SAID : make sure you are not creating an INSERT statement bigger than the max_allowed_packet setting for both your destination server and your client library (whichever ones you are using). If you attempt to create a packet that is too large, the server will _ignore_ it. Because the

Re: MySQL 4.1.13 lint?

2005-10-13 Thread SGreen
Hugh Sasse [EMAIL PROTECTED] wrote on 10/13/2005 11:27:44 AM: I'm fairly new to MySQL and am getting an error messages like: ERROR 1064 (42000) at line 5: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

Re: Easy or not so easy GROUP BY

2005-10-13 Thread SGreen
(response bottom-posted) Ed Reed [EMAIL PROTECTED] wrote on 10/13/2005 12:36:24 PM: Can anyone please help me with this? I'm just not getting it. - Thanks Ed Reed [EMAIL PROTECTED] 10/6/05 2:50:46 PM Thanks for the reply, Sorry; I'm using 4.1.11 Thanks again. Pooly [EMAIL

Re: How to get a count from this query

2005-10-13 Thread SGreen
Gerald Taylor [EMAIL PROTECTED] wrote on 10/13/2005 12:20:53 PM: SELECT avg(abs(pmd.value) - (mypmd.value))) as diff, pm.mname, pmd.uid FROM pmdata pmd, mnames pm, pmdata mypmd WHERE mypmd.uid= ? AND pmd.pmid=pm.pmid AND mypmd.pmid=pm.pmid AND pmd.uid != mypmd.uid GROUP BY pmd.pmid,

Re: Optimizing GROUP BY

2005-10-13 Thread SGreen
Kishore Jalleda [EMAIL PROTECTED] wrote on 10/13/2005 02:25:52 PM: Hi All, I have a query which takes approximately 0.5 seconds to execute , it is as follows SELECT gamename, MAX(score) AS score, COUNT(valid=1) AS played FROM gamesessions AS gamesessions WHERE valid=1 AND sessiontype IN

Re: Restore using mysqldump (MySQL 4.1.12)

2005-10-12 Thread SGreen
John Doneker [EMAIL PROTECTED] wrote on 10/11/2005 04:43:40 PM: Hi, I am trying to restore from an .sql file created by mysqldump. To restore I am using mysqldump as well. I deleted all of the rows in a table. When I restore it is still empty. I noticed on my screen that the dump does

Re: Database user Permissions

2005-10-12 Thread SGreen
Jeff [EMAIL PROTECTED] wrote on 10/12/2005 08:43:16 AM: Just rebuilt one of my servers and when setting up MySQL again an old problem I'd had and worked around came up again. Why is it that if I grant a user@'%' permissions, that user can access the database from any other machine on the

re: possible bug in mysql 5.0.13

2005-10-12 Thread SGreen
James Black [EMAIL PROTECTED] wrote on 10/12/2005 09:57:51 AM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Due to the complexity of my query I don't know how to get this down to a simple test case to demonstrate the error. This works under mysql 4.1.8 btw, so it is failing due to a

Re: Help with query

2005-10-12 Thread SGreen
Dušan Pavlica [EMAIL PROTECTED] wrote on 10/12/2005 10:00:53 AM: Thanks, Michal, for your help. Your query works as I need. I tried to use same syntax as in MS Access, but results are for some reason different for this query. I'm working on application which should be able to connect to

Re: Downgrade privileges on connect

2005-10-12 Thread SGreen
[EMAIL PROTECTED] wrote on 10/12/2005 10:56:43 AM: Hello, Is it possible for a MySQL connection to request a downgrade in privileges? What I'd like to be able to do is create one database user account for a database application with read and write privileges to the tables, but if

Re: Downgrade privileges on connect

2005-10-12 Thread SGreen
You are correct in that each mysql user account only has one set of permissions. Your application talks to the database and it may only need one login. One login = one set of permissions. When I am designing a web-based application, I always create at least two accounts. One will be read-only,

Re: Problems with creating of foreign key

2005-10-12 Thread SGreen
Tatjana Cukic [EMAIL PROTECTED] wrote on 10/12/2005 12:28:47 PM: hello, does anybody knows the error: can't create table '.\Cherry\#sql-288_5d.frm' (errno:150) it happens when i try to create foreign keys in Table1, and that foreign key is actually primary key in Table2 (to which i

Re: possible bug in mysql 5.0.13

2005-10-12 Thread SGreen
James Black [EMAIL PROTECTED] wrote on 10/12/2005 02:06:26 PM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Brawley wrote: James, You can reproduce that error by writing ... SELECT ... FROM a, b INNER JOIN c ON a.x=c.y The error goes away if you instead write

Re: Help on writing a sql statement

2005-10-11 Thread SGreen
(my response bottom-posted. See below - SG) Imran [EMAIL PROTECTED] wrote on 10/10/2005 09:16:13 PM: Hi Shawn .. Thanks for the offer. I am attaching the info that you requested. mysql SHOW CREATE TABLE salesmaster\G; *** 1. row ***

Re: How thread-safe is mysql_real_connect()?

2005-10-11 Thread SGreen
Jeremiah Gowdy [EMAIL PROTECTED] wrote on 10/11/2005 03:08:40 AM: The Windows DLL is thread safe. You do not have to call my_init() and my_thread_init() because Windows DLLs receive events when they are attached to a new process and when they are attached to a new thread in a process.

RE: SOCKET directory

2005-10-11 Thread SGreen
The sock file is not a permanent file. It is a socket descriptor that should only exist if the MySQL server is running and if the server is configured to supports socket-type connections. Most of the default installations DO NOT start the server as part of the installation process. That way

Re: Help on writing a sql statement

2005-10-11 Thread SGreen
Will you have name collisions with the same temporary table names used from different connections? Nope. Temporary tables and user-defined (@-variables) are connection-specific. Even if the same username/password combination is used to create several connections, each connection will have its

Re: Help on writing a sql statement

2005-10-11 Thread SGreen
The CREATE TABLE ... SELECT ... command is all one command. You weren't supposed to break it up. Sorry if I didn't make that very clear (my fault!!). You should probably be on a SCRIPT tab not a QUERY tab if you are running this through QueryBrowser in order to execute more than one statement

Re: query help

2005-10-11 Thread SGreen
[EMAIL PROTECTED] wrote on 10/11/2005 01:27:12 PM: lets say i have two tables: module - VARCHAR module_name INTEGER module_id module_config INTEGER module_id VARCHAR config_name VARCHAR config_value config item names and values are rather arbitrary

Re: Select values based on array containment?

2005-10-10 Thread SGreen
T.J. Mahaffey [EMAIL PROTECTED] wrote on 10/08/2005 07:09:35 PM: I'm working on a PHP script which will already have gathered a large array of string values from a text file. These values will correspond to item numbers in a MySQL table. What I need to do is select rows in the table based

Re: selecting from 2 tables

2005-10-10 Thread SGreen
Nurullah Akkaya [EMAIL PROTECTED] wrote on 10/08/2005 08:43:27 PM: i have two tables one of them is a que of urls and the other is list of urls that have been processed now i want to select a url from Que that is not in the processed urls table how can i do this in one select i do not want

Re: Distance between Zip codes

2005-10-10 Thread SGreen
You might try doing exactly what you ask to speed things up. Create a temporary table to hold the results of an intermediate query from locations then use the temp table as the source data for the greater circle calculation. By limiting the distance combinations that need to be calculated by

Re: deleting rows in 2 tables

2005-10-10 Thread SGreen
Merlin [EMAIL PROTECTED] wrote on 10/09/2005 01:31:17 PM: Hi there, I am wondering if there is a possiblity to delete rows in more than one table with one query. At the moment I am doing this: I do have at the moment 3 querys!: # get table1_id SELECT table1_id from ...

Re: Triggers

2005-10-10 Thread SGreen
You could re-write your query so that you get the lat and lon for each location as you run the query. Since each location has a zip code, this just means only one extra join per query. That also means you won't need the triggers as you are looking up each locations lat and lon on the fly. The

Re: UPDATE statement optimization

2005-10-10 Thread SGreen
Jeffrey Santos [EMAIL PROTECTED] wrote on 10/10/2005 01:07:03 PM: Hey all! I'm a very novice MYSQL user of the mentality of get it working, then get it working the right way, feeling the best way to learn is to just do it. I got things working but now I'm looking back and trying to

Re: Oracle buys InnoDb! Arghhh!

2005-10-10 Thread SGreen
mos [EMAIL PROTECTED] wrote on 10/10/2005 01:26:04 PM: http://www.crmbuyer.com/story/Kp6sQkF1sF59LB/Oracle-Puts-Squeeze-on- MySQL-With-Latest-Buy.xhtml How is this going to affect MySQL users? Mike So far (check today's archives) not at all. We will have to wait to see what develops.

RE: UPDATE statement optimization

2005-10-10 Thread SGreen
Unless you are on a severely underpowered machine, MySQL will handle 3 million rows without any problems. If you are on such an underpowered machine, then your current process must absolutely CRAWL!!! Don't worry numbers in the millionsl when you are working with enterprise-quality database

Re: Select values based on array containment?

2005-10-10 Thread SGreen
Gleb Paharenko [EMAIL PROTECTED] wrote on 10/09/2005 05:17:20 PM: Hello. In my opinion you have two choices (hope someone has better :). First - you can generate dynamically your query (the IN part of your query). See definition of the IN operator at:

Re: Help on writing a sql statement

2005-10-10 Thread SGreen
Imran [EMAIL PROTECTED] wrote on 10/10/2005 03:52:21 PM: Hi all: I need some help in writing a sql statement. I have three tables (Sales, Cust and Product). The sales table contains a large volume of data and I want to create a sql to group the sales table then join the resultant to both

<    1   2   3   4   5   6   7   8   9   10   >