simple addition in a query?

2006-02-22 Thread Ronan
select servers.type,exim.hour,exim.count from exim,servers where exim.machine=servers.id and servers.type='MX' and exim.date='2006-02-22' this gives me +--+--+---+ | type | hour | count | +--+--+---+ | MX |0 | 1117 | | MX |0 | 366 | | MX |0 | 147

Re: simple addition in a query?

2006-02-22 Thread Adrian Bruce
I think the following should work, try taking a look on the net for help on MySQL queries that use aggragate functions, there is probably a lot of info on there. select exim.hour,sum(exim.count) from exim,servers where exim.machine=servers.id and servers.type='MX' and exim.date='2006-02-22'

Table parameters not transferring while using Migration toolkit

2006-02-22 Thread Dewald Troskie
Hi, When I use the MySQL Migration Toolkit to transfer a Database from one Mysql server to another, the table parameters configured do not seem to be transferred as well. Fields specified as Primary keys that autoincrement do not autoincrement in the transferred database and fields set as null

binary log missing in 5.1.6?

2006-02-22 Thread Ben Clewett
Dear MySQL, I have just upgraded 4.1.9 to 5.1.6, by compiling source code. I have lost my binary logs. http://dev.mysql.com/doc/refman/5.0/en/binary-log.html eg: my-bin.01 my-bin.02 The usual option is present: [mysqld] log-bin = /usr/local/mysql/logs/my-bin **or** [mysqld]

inquiry

2006-02-22 Thread Anago Chima
Q: What do the exams cost? A: Both exams are offered at the local equivalent of US$200 / EUR 170*. This question and answer was copied from certification FAQ. Please can somebody tell me 'both' means in the answer here. Does it mean that the price for both MySQL Developer Exam I II are US $200?

inquiry

2006-02-22 Thread Gabriel PREDA
Yes... count me in for this question also... I didn't figured that out... I just bought MySQL 5.0 Cerrt. Study Guide and I wanna know also... I also saw that the exams for the 5.0 branch are in BETA... when are we going to expect a final exam ? -- Gabriel PREDA Senior Web Developer On

selecting based on a max() condition

2006-02-22 Thread Octavian Rasnita
Hi, I have a table with 3 relevant columns: symbol varchar(10) not null price decimal not null and last_update datetime not null I want to select the list of unique symbols and the corresponding price and last_update fields for each line where the last_update is equal to the last_update field

Re: parameterized view ?

2006-02-22 Thread SGreen
[EMAIL PROTECTED] wrote on 02/21/2006 11:20:36 AM: Is there such a thing in mySQL ? I could not find anything anywhere. thanks, laszlo Short answer: No Long answer: MySQL has VIEWS but they are non-parameterized and non-persistent. MySQL also has FUNCTIONS and STORED PROCEDURES, both

Re: binary log missing in 5.1.6?

2006-02-22 Thread Ben Clewett
In answer to my own question: Why don't the binary logs write? The '%-bin.index' file left over from previous version (4.1.9) had to be deleted after the conversion to 5.1.6. By deleting this file, the binary logs started to recreate. I hope this is useful to somebody :) Ben Ben Clewett

Re: Inner join with left join

2006-02-22 Thread SGreen
Scott Haneda [EMAIL PROTECTED] wrote on 02/22/2006 01:47:38 AM: Got myself a little stumped here, 4.0.18-standard Three tables in this mess, orders, order_items and products. orders.prod_id = order_items.prod_id = products.prod_id is how I relate them all to each other. order_items

MySQL Queries within Oscommerce

2006-02-22 Thread AM COMS
Has anyone here had any experience with Oscommerce? I am having problems with the style of queries they have used or am I just seeing things the wrong way! andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: MySQL Queries within Oscommerce

2006-02-22 Thread SGreen
AM COMS [EMAIL PROTECTED] wrote on 02/22/2006 09:16:24 AM: Has anyone here had any experience with Oscommerce? I am having problems with the style of queries they have used or am I just seeing things the wrong way! andrew Sorry! I have never used it. Shawn Green Database

Re: Nested Set Model or modified preorder tree traversal mySQL/PHP code wanted

2006-02-22 Thread Peter Brawley
Daevid, I've been searching the web for the past few hours trying to find a simple drop-in class or functions to implement Nested Set Model or modified preorder tree traversal. The reason there's not a drop-in module may be that adding the layers implementing such generality would slow

RE: dropping a database to reclaim space

2006-02-22 Thread Robert DiFalco
If I am testing for performance, I make sure to have one schema for each database server. When I want to tear down the data and restart (possibly with new settings). I first DROP the database I am working on. Then I shutdown the server and in the my_sql/data directory, I delete all the files

Re: Inner join with left join

2006-02-22 Thread Peter Brawley
Scott, I need a report that shows me all the products with a sum() for each, but only if the status of the order is NOT IN ('cancelled', 'pending', 'ghost') Is this what you mean? SELECT p.prod_name, count(oi.product_id) AS mycount FROM ORDERS AS o INNER JOIN products ON o.id=p.id LEFT

Re: selecting based on a max() condition

2006-02-22 Thread Peter Brawley
Octavian, I want to select the list of unique symbols and the corresponding price and last_update fields for each line where the last_update is equal to the last_update field for each symbol. You're close! See the example at http://www.artfulsoftware.com/queries.php#18. PB - Octavian

Re: Permissions for /var/run/mysqld

2006-02-22 Thread Norman Walsh
/ sheeri kritzer [EMAIL PROTECTED] was heard to say: | That's odd. My mysql.sock is chmod 777, which happened automatically. Yes, the mysql.sock file is 777. But the directory that contains it /var/run/mysqld is 770 on boot. | Check the startup script. Is it calling mysqld_safe? Are you using

Re: inquiry

2006-02-22 Thread Pat Adams
On Wed, 2006-02-22 at 03:47 -0800, Anago Chima wrote: Q: What do the exams cost? A: Both exams are offered at the local equivalent of US$200 / EUR 170*. This question and answer was copied from certification FAQ. Please can somebody tell me 'both' means in the answer here. Does it mean

Re: dropping a database to reclaim space

2006-02-22 Thread sheeri kritzer
Luke, I believe the 'mysql' database (system) does NOT use InnoDB. The best thing to do would be to change your database to skip-innodb, check that the server is working, and then delete the innodb data and log files. -Sheeri On 2/21/06, Luke Vanderfluit [EMAIL PROTECTED] wrote: Hi. I have

Re: mysqlimport, \r\n and \n

2006-02-22 Thread sheeri kritzer
A batch script or shell script can easily be written to do this. -Sheeri On 2/20/06, Daniel Kasak [EMAIL PROTECTED] wrote: I've got some import scripts that are giving me trouble. Some MOFOs keep changing the format of the data they give us, and sometimes I loose half the records. When this

Re: mysqlimport, \r\n and \n

2006-02-22 Thread Daniel da Veiga
On 2/22/06, sheeri kritzer [EMAIL PROTECTED] wrote: A batch script or shell script can easily be written to do this. -Sheeri On 2/20/06, Daniel Kasak [EMAIL PROTECTED] wrote: I've got some import scripts that are giving me trouble. Some MOFOs keep changing the format of the data they

sql-bench and results

2006-02-22 Thread Sam Tran
Hi All, I installed MySQL 5.0.18 on a Debian Sarge box. I ran the benchmark suite in the subfolder sql-bench. Now I'd like to compare my results with other results. According to http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html some results are included in sql-bench/Results. But

Re: Inner join with left join

2006-02-22 Thread Scott Haneda
Is this what you mean? SELECT p.prod_name, count(oi.product_id) AS mycount FROM ORDERS AS o INNER JOIN products ON o.id=p.id LEFT JOIN order_items AS oi ON (p.id = oi.product_id) WHERE o.status NOT IN ('cancelled', 'pending', 'ghost') GROUP BY oi.product_id ORDER BY mycount; Well,

Re: next, prev, records in MySql. Handler Function

2006-02-22 Thread sheeri kritzer
Hi Alvaro, I have no experience using these in PHP scripts. Couldn't hurt to try putting it in mysql_query statements and see if it works. If you can turn on the general query log for a bit then you can see exactly if it's working; if you can't turn it on, then you'll have to guess from output.

RE: [SPAM] - Re: Inner join with left join - Bayesian Filter detected spam

2006-02-22 Thread Gordon Bruce
If you want to see all of the products {even those that have never been ordered} then you need to SELECT ... FROM products ... LEFT JOIN orders I think you also have to do a LEFT JOIN on order_items And pull prod_name from products {don't know what the column name in products is}. SELECT o.id,

Re: Inner join with left join

2006-02-22 Thread SGreen
Scott Haneda [EMAIL PROTECTED] wrote on 02/22/2006 03:58:10 PM: Is this what you mean? SELECT p.prod_name, count(oi.product_id) AS mycount FROM ORDERS AS o INNER JOIN products ON o.id=p.id LEFT JOIN order_items AS oi ON (p.id = oi.product_id) WHERE o.status NOT IN

Fulltext IN BOOLEAN wildcard subexpression

2006-02-22 Thread Harry Hege
Please help me understand the functionality of the wildcard character with Fulltext searching IN BOOLEAN MODE. For the following searches, I get tangible query results as expected, except for the last search which returns no records from the query. Why is this? 1. +jones +mag* 2. +smith +book*

Number Searches

2006-02-22 Thread CodeHeads
Hello all, I have searched but cannot find what I am looking for. I have a full index index on a table and on of the fields is a number field (IP Address). Can MySQL search for numbers?? Thanks, Will -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Number Searches

2006-02-22 Thread Rhino
- Original Message - From: CodeHeads [EMAIL PROTECTED] To: MySQL-List mysql@lists.mysql.com Sent: Wednesday, February 22, 2006 4:52 PM Subject: Number Searches Hello all, I have searched but cannot find what I am looking for. I have a full index index on a table and on of the fields

Re: Number Searches

2006-02-22 Thread David T. Ashley
On Wed, February 22, 2006 4:52 pm, CodeHeads wrote: I have a full index index on a table and on of the fields is a number field (IP Address). Can MySQL search for numbers?? I'm potentially introducing confusion here, because I've never actually _used_ MySQL, but can't you do one of the

Re: dropping a database to reclaim space

2006-02-22 Thread Heikki Tuuri
Luke, if you do not have ANY valuable InnoDB tables in the installation, you can simply delete the ibdata files and ib_logfiles. Be very careful if you have several MySQL instances in the same computer. As Sheeri wrote, MySQL's system tables 'user.MYD' etc. are MyISAM tables in the 'mysql'

RE: Number Searches

2006-02-22 Thread Ariel Sánchez Mora
So far i've been able to store ip addresses as strings like you would type them in DOS, for ex, '192.168.0.1'. This serves me great since my application uses IP addresses as strings in all cases. I've done queries with the IP column , for example, select office_name from table_1 where

RE: Number Searches

2006-02-22 Thread CodeHeads
On Wed, 2006-02-22 at 16:49 -0600, Ariel Sánchez Mora wrote: So far i've been able to store ip addresses as strings like you would type them in DOS, for ex, '192.168.0.1'. This serves me great since my application uses IP addresses as strings in all cases. I've done queries with the IP column

Re: Inner join with left join

2006-02-22 Thread Scott Haneda
You just need to invert a couple of things... SELECT p.id, p.prod_name, sum(oi.quantity) as qty FROM Products p LEFT JOIN orders as o ON (p.id = oi.product_id) AND o.created BETWEEN 2005-01-01 00:00:00 AND 2006-02-22 23:59:59 AND o.status not IN ('cancelled',

Re: Inner join with left join

2006-02-22 Thread James Harvard
At 5:08 pm -0800 22/2/06, Scott Haneda wrote: I think we are close, thanks ERROR 1120: Cross dependency found in OUTER JOIN. Examine your ON conditions SELECT p.id, p.prod_name, sum(oi.quantity) as qty FROM Products p LEFT JOIN orders as o ON (p.id = oi.product_id) Maybe this is

re:mysql client gets segmentation fault

2006-02-22 Thread Barton L. Phillips
Update. I downloaded the mysql-standard-4.1.18-pc-linux-gnu-i686.tar.gz and extracted mysql. The 4.1 mysql client does not get a segmentation fault when I do an up-arrow or anything else. It works just fine. The plot thickens. -- Barton L. Phillips Applied Technology

Re: Inner join with left join

2006-02-22 Thread Scott Haneda
At 5:08 pm -0800 22/2/06, Scott Haneda wrote: I think we are close, thanks ERROR 1120: Cross dependency found in OUTER JOIN. Examine your ON conditions SELECT p.id, p.prod_name, sum(oi.quantity) as qty FROM Products p LEFT JOIN orders as o ON (p.id = oi.product_id) Maybe this

bind-address by name under 5.0.18

2006-02-22 Thread James Long
I would like to be able to bind to a host name, rather than an IP number. IP numbers come and go, and are beyond the control of anyone who doesn't have their own direct allocation. But since I own my domain, a host name is more permanent. When the time comes to change IP numbers, I want to

error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Rithish Saralaya
Hello. I get the following error when I try to query a table in a particular database (test). The error is generated for all tables within that database. However, 'mysql' database works fine. ERROR 1016 (HY000): Can't open file: 'TBL_FORUM_MSG_BODY.ibd' (errno: 1) However, I have noticed that

RE: error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Logan, David (SST - Adelaide)
Hi Rithish, Please check your ownership/permissions hambone ~ $ perror 1 OS error code 1: Not owner hambone ~ $ Regards --- ** _/ ** David Logan *** _/ *** ITO Delivery Specialist -

Help with a join query

2006-02-22 Thread Yoed Anis
Hi all, I'm trying to do the following. I have three table: Table a has address information: address_id | City | State | Zip 1Austin TX 78758 2 Dallas TX 77000 3 Galveston TX 77550 Table b has information about the location: address_id | Location_id | Location_name 11The

error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Rithish Saralaya
Hello. I get the following error when I try to query a table in a particular database (test). The error is generated for all tables within that database. However, 'mysql' database works fine. ERROR 1016 (HY000): Can't open file: 'TBL_FORUM_MSG_BODY.ibd' (errno: 1) However, I have noticed that

RE: error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Rithish Saralaya
Hello David. Thanks for the prompt response. The permissions were the first thing that I checked when I got the error. In fact, I even tried giving 777 permissions on the .ibd files. No results. Regards, Rithish. -Original Message- From: Logan, David (SST - Adelaide) [mailto:[EMAIL

Statement release

2006-02-22 Thread Filip Rachunek
Hello, I would like to solve this problem. I get a Connection instance from a connection pool, create some statements and prepared statements, do some database operations, close all statements and return the connection to the pool. My question is, are the statements released (garbage collected)

need white papers on performace tuning of full text indexing

2006-02-22 Thread Anand Sachdev
anyone know where i can get these, will highly appreciate, this is a feature of mysql 5.0 and my platform is linux.