OT: Strategy for large resultsets

2005-05-16 Thread Thomas Sundberg
Hi! Does anybody have any thoughts regarding large result sets that should be sent to a client using http or similar stateless protocol. I have a situation where I need to be able to return a large result set and where I know that either the client or possible the server may fail due to resource

Re: Single vs Multiple primary keys

2005-05-16 Thread Daniel Walker
On Sunday 15 May 2005 20:31, Dan Bolser wrote: You must mean a multipart primary key with three parts :) or multiple-column indexes That is what I would do (use a multiple-column index (primary key) - its kinda based on opinion, but I think you should let the real data be the primary key

Php/Mysql problem - undiefined method mysql_connect()

2005-05-16 Thread CIKALA Frédéric ROSI/SIPROD
Hello everyone, I've installed mysql server on my fedora box and it works great when i use the console =) But, i want my php sources to work with these bases but it doesn't work =( In fact it seems that the function mysql_connect() cannot be called, here is the error on the web page : Fatal

Need help in running MySql in PHP script

2005-05-16 Thread madderla sreedhar
Hi, Iam using mysql 5.04 , php 5.0 with IIS 5.0 webserver and written some scripts and executed on IE webbrowser but getting an fatal error undefined function mysql_connect() in the code kindly tell me where iam going wrong and also tell the mysql username how to find it out becoz when Iam

RE: Need help in running MySql in PHP script

2005-05-16 Thread CIKALA Frédéric ROSI/SIPROD
It seems like you got the same problem' as me : Php (? ) do not have the librairies include, and you need to run a kink of daemon in order to make t works. Under linux, it is just a question of the good rpm to install (for me it was php-mysql-4.3.9-3.i386.rpm). Under windows, you'll need to

Re: Problem connecting to 4.1 server

2005-05-16 Thread Nicholas Watmough
Yes, the mysql.exe is the same version - I installed version 4.1.10 of the server (and binaries) from the Windows executable myself, about two months ago. I've tried setting MYSQL_SECURE_AUTH to both true and false, to see if it solves the problem, but it doesn't. Not sure what else I can try.

RE: difficulty with UCASE and UPPER

2005-05-16 Thread Jay Blanchard
[snip] I want to convert the whole thing to upper case so I can do a case insensitive compare against it. [/snip] If you want to do a case insensitive comparison against the data then there is no need to convert to upper case. -- MySQL General Mailing List For list archives:

Re: problems starting MySQL with InnoDB tables

2005-05-16 Thread kevin korngut
In the process I noticed somehow someone had managed to install a slightly different version of mysql vs. mysql-max, so I uninstalled everything msyql related and started over, came right up with InnoDB support! - Kevin Korngut Mr. Magoo JANIMATION INC. www.janimation.com

Index Question in MyISAM

2005-05-16 Thread Dan Salzer
I have the following table: CREATE TABLE `Article_Search` ( `ArticleID` int(11) NOT NULL default '0', `Content` text NOT NULL, PRIMARY KEY (`ArticleID`), FULLTEXT KEY `Content` (`Content`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 This table has several million rows, but I only want to

Re: Index Question in MyISAM

2005-05-16 Thread Alec . Cawley
Dan Salzer [EMAIL PROTECTED] wrote on 16/05/2005 14:36:41: I have the following table: CREATE TABLE `Article_Search` ( `ArticleID` int(11) NOT NULL default '0', `Content` text NOT NULL, PRIMARY KEY (`ArticleID`), FULLTEXT KEY `Content` (`Content`) ) ENGINE=MyISAM DEFAULT

Re: QUERY (TOP)

2005-05-16 Thread Seena Blace
Any suggestion pl? Seena Blace [EMAIL PROTECTED] wrote:hi, here is table description report1 +-+--+--+-+-++ | Field | Type | Null | Key | Default | Extra |

output in text file /migration

2005-05-16 Thread Seena Blace
Hi, I want to migrate 1 table from MYSQL to oracle ? how to do that ? How to get output of table into text file? thanks . - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone.

Re: QUERY (TOP)

2005-05-16 Thread SGreen
Seena Blace [EMAIL PROTECTED] wrote on 05/16/2005 10:08:15 AM: Any suggestion pl? Seena Blace [EMAIL PROTECTED] wrote:hi, here is table description report1 +-+--+--+- +-++ | Field | Type | Null | Key |

Re: output in text file /migration

2005-05-16 Thread Daniel Walker
As for your second question, SELECT INTO OUTFILE (making sure mysql user has write privileges in the directory/file you want to write to). MySQL give the example: SELECT a,b,a+b INTO OUTFILE '/tmp/result.text' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' FROM

Re: OT: Strategy for large resultsets

2005-05-16 Thread Brent Baisley
I think usually large data sets like yours are returned via ftp or http file download. You would create the file on the server and do something like a redirect to initiate the download. If it's really big and will take a while to create the file, you could email a download link to the client.

Re: QUERY (TOP)

2005-05-16 Thread Seena Blace
shawn I think 2nd query will return only 10 rows. I want out like followings date domain spam 05/05/05 hotmail.com120 05/05/05 yahoo.com 110 05/05/05 abc.com 99 05/05/05 def.com

Default or existing value if JOIN ON clause fail?

2005-05-16 Thread anagorn
I am trying to get default value for every ID of JOIN if ON clause were unsucessfull. In my example, I am trying to get english rows, but if they are not available, I would like to get default - estonian. I have two tables ie. table1: id 1 2 3 table2: id - lang - desc 1 - english - EN_A 1 -

Re: Default or existing value if JOIN ON clause fail?

2005-05-16 Thread Michael Stassen
anagorn wrote: I am trying to get default value for every ID of JOIN if ON clause were unsucessfull. In my example, I am trying to get english rows, but if they are not available, I would like to get default - estonian. I have two tables ie. table1: id 1 2 3 table2: id - lang - desc 1 - english

Performance of UNION vs alternative

2005-05-16 Thread James
I have four tables. These four tables save information from 4 different user activities...so they save 4 very different data sets. (for example, one activity could be choosing different tracks to make a song, and another activity could be choosing different clipart to make a collage)

Re: QUERY (TOP)

2005-05-16 Thread SGreen
Seena Blace [EMAIL PROTECTED] wrote on 05/16/2005 11:13:48 AM: shawn I think 2nd query will return only 10 rows. I want out like followings date domain spam 05/05/05 hotmail.com120 05/05/05 yahoo.com 110 05/05/05

Re: Need help in running MySql in PHP script

2005-05-16 Thread Kristen G. Thorson
The folks at http://us4.php.net/mailing-lists.php can help you. In PHP 5, MySQL is no longer enabled by default, nor is the MySQL library bundled with PHP. http://us4.php.net/manual/en/faq.databases.php#faq.databases.mysql.php5 kgt CIKALA Frédéric ROSI/SIPROD wrote: It seems like you got the

Re: select count(*) table

2005-05-16 Thread Eric Bergen
select count(*) table; gives me a syntax error in 4.0 and 4.1 so I'm not sure how that worked. Something similar would be select count(*) t; which uses the shortcut alias syntax. It's the same as doing select count(*) as t; Simon Garner wrote: [EMAIL PROTECTED] wrote: I have a curious

Re: select count(*) table

2005-05-16 Thread Seena Blace
just give a it try select count(columnname) from table; Eric Bergen [EMAIL PROTECTED] wrote:select count(*) table; gives me a syntax error in 4.0 and 4.1 so I'm not sure how that worked. Something similar would be select count(*) t; which uses the shortcut alias syntax. It's the same as doing

Re: Efficiently finding a random record

2005-05-16 Thread Keith Ivey
Michael Stassen wrote: For example, if the selected random id is missing, we take the next id we find, like this: SELECT @rand_id:= CAST( 1 + MAX(id)*RAND() AS UNSIGNED) FROM history; SELECT * FROM history WHERE id = @rand_id LIMIT 1; That will have a possibly undesired effect. Records that

Re: Efficiently finding a random record

2005-05-16 Thread Philip Hallstrom
Michael Stassen wrote: For example, if the selected random id is missing, we take the next id we find, like this: SELECT @rand_id:= CAST( 1 + MAX(id)*RAND() AS UNSIGNED) FROM history; SELECT * FROM history WHERE id = @rand_id LIMIT 1; That will have a possibly undesired effect. Records that

Re: mysqlxml

2005-05-16 Thread Alexander Barkov
Hello! The patch which can be found at http://mysql.r18.ru/~bar/myxml/ adds XPATH support into MySQL. It is not an UDF. It is a patch for main MySQL sources. In order to build MySQL with XPATH please do the following: 1. Unpack MySQL source tar ball, say mysql-5.0.4.tar.gz: tar -zxf

repair table/close table ?????

2005-05-16 Thread Seena Blace
Hi, Here is what I see. mysql check table report_1; +---+---+--++ | Table | Op| Msg_type | Msg_text |

Re: MySQL 4.1.12 has been released

2005-05-16 Thread Dan Bolser
On Sun, 15 May 2005, Matt Wagner wrote: Hi, A new version of MySQL Community Edition 4.1.12 Open Source database management system has been released. It is now available in source and binary form for a number of platforms from our download pages at http://dev.mysql.com/downloads/ and mirror

Re: MySQL 4.1.12 has been released

2005-05-16 Thread Jan Pieter Kunst
2005/5/16, Matt Wagner [EMAIL PROTECTED]: Hi, A new version of MySQL Community Edition 4.1.12 Open Source database management system has been released. It is now available in source and binary form for a number of platforms from our download pages at http://dev.mysql.com/downloads/ and

innodb buffer pool size question

2005-05-16 Thread Sergei Skarupo
Hi all, I set the innodb_buffer_pool_size=1024M in my.cnf show variables returns . innodb_buffer_pool_size | 1073741824 show innodb status returns -- BUFFER POOL AND MEMORY -- Total memory allocated 1169691576; in additional

mysql - Client does not support authentication protocol requested by server

2005-05-16 Thread ymarkiv
Dear all, I'm mysql newbie. When I try to connect to mysql using php script, it answers: Warning: mysql_connect(): Client does not support authentication protocol requested by server. Consider upgrading MySQL client in /usr/local/www/data-dist/grad-web/email.php on line 18 It talks about

RE: innodb buffer pool size question

2005-05-16 Thread Partha Dutta
The buffer pool size value is in 16K pages (from SHOW INNODB STATUS output) -- Partha Dutta, Senior Consultant MySQL Inc, NY, USA, www.mysql.com Are you MySQL certified? www.mysql.com/certification -Original Message- From: Sergei Skarupo [mailto:[EMAIL PROTECTED] Sent: Monday,

Re: MySQL 4.1.12 has been released

2005-05-16 Thread Matt Wagner
On 5/16/05 12:57 PM, Dan Bolser [EMAIL PROTECTED] wrote: A new version of MySQL Community Edition 4.1.12 Open Source database management system has been released. It is now available in source and binary form for a number of platforms from our download pages at http://dev.mysql.com/downloads/

Re: MySQL 4.1.12 has been released

2005-05-16 Thread Matt Wagner
On 5/16/05 1:04 PM, Jan Pieter Kunst [EMAIL PROTECTED] wrote: A new version of MySQL Community Edition 4.1.12 Open Source database management system has been released. It is now available in source and binary form for a number of platforms from our download pages at

RE: innodb buffer pool size question

2005-05-16 Thread Sergei Skarupo
thanks -Original Message- From: Partha Dutta [mailto:[EMAIL PROTECTED] Sent: Monday, May 16, 2005 11:30 AM To: Sergei Skarupo; 'Mysql List (E-mail)' Subject: RE: innodb buffer pool size question The buffer pool size value is in 16K pages (from SHOW INNODB STATUS output) -- Partha

Help with query

2005-05-16 Thread Ronan Lucio
Hello, I have a table where is saved all site´s access: access id year month day weekday hour minute ip Any column has multiple lines, and I have the follow query that returns the amount of access per day of month: SELECT year, month, day, COUNT(*) AS access FROM access WHERE year = 2005

Re: Help with query

2005-05-16 Thread mfatene
Hi, look at group by ... with rollup at : http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html Mathias Selon Ronan Lucio [EMAIL PROTECTED]: Hello, I have a table where is saved all site´s access: access id year month day weekday hour minute ip Any column has multiple

Re: Help with query

2005-05-16 Thread Ronan Lucio
Mathias, Hi, look at group by ... with rollup at : http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html Thank you very much for your help. My needs aren´t this, exactly. GROUP BY WITH ROLLUP, returns me several lines of the same day (one per IP), plus the total. I need that every

Re: Help with query

2005-05-16 Thread SGreen
Ronan Lucio [EMAIL PROTECTED] wrote on 05/16/2005 04:21:17 PM: Mathias, Hi, look at group by ... with rollup at : http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html Thank you very much for your help. My needs aren´t this, exactly. GROUP BY WITH ROLLUP, returns me several

Re: Help with query

2005-05-16 Thread mfatene
Hi Ronan, I don't know if i understand your need, but your query gives something like that : mysql SELECT year, month, day, ip, COUNT(*) AS access - FROM access - WHERE year = 2005 - AND month = 5 - GROUP BY year, month, day, ip - ORDER BY year, month, day;

Re: QUERY (TOP)

2005-05-16 Thread Seena Blace
Shawn, query SELECT * FROM spam_stats WHERE rank = 10; will return all rows which I don't want. I need datewise top 10 spam domain. means condition would be serach those rows which are having top 10 spam (means highest) on each day and show the output like which I send earlier. thanks

Re: Help with query

2005-05-16 Thread Ronan Lucio
Mathias, To drop multiple IP, you can use distinct : mysql SELECT year, month, day, group_concat(distinct ip),count(*) AS access - FROM access - WHERE year = 2005 - AND month = 5 - GROUP BY year, month,day - ORDER BY year, month, day;

auto_increment trouble (not the usual check || alter table solution, though)

2005-05-16 Thread Ricardo Oliveira
Hi everyone, First time on the list, although I've been (quietly) a (not-so)long-time quiet observer. This isn't a FAQ and I can assure you I've tried every procedure out there (both on and off-list) to solve it. A couple weeks ago, I started having problems with a MyISAM table which holds

Re: QUERY (TOP)

2005-05-16 Thread SGreen
Please try my solution before you tell me it's broken, OK? I know you want to see the top 10 spammers for EACH day. That's what I wrote for you. Please try my solution with your data and get back to me with the results and explain to me what's wrong so I can fix it. Thank you for your

RE: auto_increment trouble (not the usual check || alter table solution, though)

2005-05-16 Thread Partha Dutta
This may not be a very elegant solution, but you can do this just to get the inserts going again: ALTER TABLE users MODIFY COLUMN uid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT; If you don't have any negative uids, then you will be able to store 2 billion more uids. Just out of curiosity, have

Re: auto_increment trouble (not the usual check || alter table solution, though)

2005-05-16 Thread Ricardo Oliveira
Partha, On 5/16/05, Partha Dutta [EMAIL PROTECTED] wrote: This may not be a very elegant solution, but you can do this just to get the inserts going again: ALTER TABLE users MODIFY COLUMN uid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT; If you don't have any negative uids, then you will be

Re: auto_increment trouble (not the usual check || alter table solution, though)

2005-05-16 Thread mfatene
Hi, with a similar structure, you can have : mysql select * from users where uid =262140; ++--+ | uid| nickname | ++--+ | 262140 | text | | 262141 | text | | 262142 | text | | 262143 | text | | 262144 | text | ++--+ 5 rows in

Re: auto_increment trouble (not the usual check || alter table solution, though)

2005-05-16 Thread Ricardo Oliveira
Partha, Partha Dutta wrote: This may not be a very elegant solution, but you can do this just to get the inserts going again: ALTER TABLE users MODIFY COLUMN uid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT; If you don't have any negative uids, then you will be able to store 2 billion more uids. Just

Improving the performance of joins

2005-05-16 Thread Rod Heyd
I have a question about joins. My situation is as follows: I have 5 tables identical in structure. Each table represents essentially the same data, however, the data in each table represents a different version. The processing involved in generating the values stored in each table may have

mysql decrypt

2005-05-16 Thread Alejandro Alekhine
Hi, I´m developing a database with the aes_encrypt and aes_decrypt functions, with integrity constraints and varbinary types. My problem is that when I insert a row into a table, I encrypt with aes_encrypt, but when I desencrypt with aes_decrypt, it returns null with some values. The only way

Installing MySQL 4.1.12 on Mandrake 10.1

2005-05-16 Thread Eric Lommatsch
Hello List, I have a new test Linux server with Mandrake 10.1 installed that I was trying to install MySQL version 4.1.12 on today. Once I had installed the software, whenever I tried to start MySQL on this server I was getting the error message [ERROR] Fatal error: Can't open privilege

Re: mysql decrypt

2005-05-16 Thread mfatene
Hi, You may have invalid data or incorrect padding when null is retuned : http://dev.mysql.com/doc/mysql/en/encryption-functions.html Mathias Selon Alejandro Alekhine [EMAIL PROTECTED]: Hi, I´m developing a database with the aes_encrypt and aes_decrypt functions, with integrity constraints

Help with join in query

2005-05-16 Thread Scott Pippin
I have the following query. select sum(a.attendhours), s.attendhours from attendance a, attsum s where a.siteid = s.siteid and a.assignmentid = s.assignmentid and a.attenddate = s.attenddate and a.siteid = 'XXX' and a.attenddate = '-XX-XX' group by a.assignmentid,

Re: Help with join in query

2005-05-16 Thread mfatene
hi, you can add ... ... group by a.assignmentid, a.attenddate; having sum(a.attendhours) != s.attendhours Mathias Selon Scott Pippin [EMAIL PROTECTED]: I have the following query. select sum(a.attendhours), s.attendhours from attendance a, attsum s where a.siteid =

Re: Help with join in query

2005-05-16 Thread mfatene
with no comma (sorry): select sum(a.attendhours), s.attendhours from attendance a, attsum s where a.siteid = s.siteid and a.assignmentid = s.assignmentid and a.attenddate = s.attenddate and a.siteid = 'XXX' and a.attenddate = '-XX-XX' group by a.assignmentid,

mysql database problems

2005-05-16 Thread Dwayne Hottinger
Greetings all, Im new to mysql and have inherited several mysql databases and everything has been going well until lately. Most of my webpages come from mysql databases with php scripts. Now I am getting the message Unable to load database indicated by configuration file or something similiar