Re: PHP-MYSQL Question

2009-04-07 Thread Eugene Kosov
# perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed What does table1 look like? abdulazeez alugo wrote: Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009

Re: PHP-MYSQL Question

2009-04-07 Thread Eugene Kosov
Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone

Re: PHP-MYSQL Question

2009-04-07 Thread Eugene Kosov
I suppose the problem is that table1.table1_id and table2.table1_id are of different types. The first one is INT UNSIGNED and the second is just INT. abdulazeez alugo wrote: Table1 is as below: CREATE TABLE table1(table1_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY

Re: Include SQL files

2009-04-01 Thread Eugene Kosov
What about source? use foobar; source some/dir/file1.sql; source some/dir/file2.sql; ... Though, your solution is much simplier. Michael Dykman wrote: No include is possible, but this is done pretty routinely: cat *.sql | mysql ... - michael dykman On Wed, Apr 1, 2009 at 10:19 AM,

Re: rand()

2006-07-07 Thread Eugene Kosov
I think you meant ORDER BY `registers`.. Jay Blanchard пишет: [snip] I´ve got a page where a ought to get 20 registers in ramdom order but i want to display it in an alphabetical order. Someone knows if there is a way to get that 20 random registers in alphabetical order? [/snip] SORT BY

Index on MERGE table

2006-06-21 Thread Eugene Kosov
. Index cardinality is 81 while table contains over than 12 millions of different values. I've tried recreating indecies but this didn't help. I couldn't find anything relevant in documentation. How should I create index on MERGE table? Thanks in advance! -- Regards, Eugene Kosov. -- MySQL

Re: Index on MERGE table

2006-06-21 Thread Eugene Kosov
. HTH, Cor - Original Message - From: Eugene Kosov [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, June 21, 2006 2:58 PM Subject: Index on MERGE table Hi everyone! I have a bunch of MyISAM tables and one MERGE table. All have same structure. It seems to me indecies

Re: query slow

2006-06-21 Thread Eugene Kosov
Jay Pipes wrote: SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '2000-01-01' AND '2000-12-31' UNION ALL SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '1999-12-01' AND '1999-12-31' Why not: SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '1999-12-01' AND '2000-12-31' ?? ;)

Re: query slow

2006-06-21 Thread Eugene Kosov
`sav00_sava0400_dbf` WHERE `emissao` BETWEEN '1999-12-01 00:00:00' AND '2000-12-31 23:59:59'; -- BR, Eugene Kosov -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: How to backup and restore

2006-06-09 Thread Eugene Kosov
Ben Burford wrote: Hello, Do I need to delete the table 'Indian'?? Try --add_drop-table option man mysqldump -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: How to backup and restore

2006-06-09 Thread Eugene Kosov
mysqldump --verbose --add_drop-table --all-databases backup_06082006.sql or mysql --add_drop-table backup_06082006.sql or maybe mysql --add_drop-table backup_06082006.sql mysqldump --opt... This will add DROP TABLE .. IF EXISTS to a dump. -- MySQL General Mailing List For list

Hung up query.

2006-06-08 Thread Eugene Kosov
at bugs.mysql.com. Thanks in advance! -- BR, Eugene Kosov -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Query performance.

2006-06-07 Thread Eugene Kosov
Thanks a lot!! :D You were right. There was a bug. Upgrading to mysql 4.1.20 solved my problem. Daniel da Veiga wrote: Check http://bugs.mysql.com/bug.php?id=12915 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Query performance.

2006-06-06 Thread Eugene Kosov
-locking key_buffer = 384M max_allowed_packet = 1M table_cache = 512 sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size = 32M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 4 ... -- BR, Eugene

Re: Need guidance with perfomance improvement...

2006-05-24 Thread Eugene Kosov
an OPTIMIZE TABLE command every few hours, took a couple of seconds each time, and performance stayed good. Thanks for advice. I think I should I give this a try.. :) Eugene Kosov wrote: Hi, list! I have a little table (about 0.5 milloin records) which is kind of queue. My perl script takes records

Need guidance with perfomance improvement...

2006-05-22 Thread Eugene Kosov
Hi, list! I have a little table (about 0.5 milloin records) which is kind of queue. My perl script takes records from it one by one and does somes actions. Here's my table structure: mysql desc queue;

Re: totalizing of Rows please help!!

2006-04-24 Thread Eugene Kosov
Hi, Brian! First of all I think next time you should better attach your database structure. It'll be much easier to understand your problem if you will... Maybe you're asking for something like this: SELECT project_name, elecremain, controlremain, otherremain, elecremain + controlremain +

Re: totalizing of Rows please help!!SQL Dump

2006-04-24 Thread Eugene Kosov
) Eugene Kosov wrote: Hi, Brian! First of all I think next time you should better attach your database structure. It'll be much easier to understand your problem if you will... Maybe you're asking for something like this: SELECT project_name, elecremain

Re: mysql server

2006-03-28 Thread Eugene Kosov
Good day! Can you be more concrete? I believe nobody in this list can read your thoughts. What tells mysql? What do you see in logs? prathima rao wrote: i have a hp server . i have installed mysql 4 in that when ever i shut down the system and start again the mysql server does not start it

Re: Converting password to old format.

2006-03-24 Thread Eugene Kosov
have a problem with new password format? Eugene Kosov wrote: Hi, everyone! I have transfer user's database and grants from one mysql server (4.1.15) to an older one (4.0.26). I don't know user's password and have only it's hash. How can I convert hashed password stored in mysql.user.password

Converting password to old format.

2006-03-23 Thread Eugene Kosov
to OLD_PASSWORD(), but with 4.1's hashed password as a parameter? Any links, man references, etc. are welcome! Thanks in advance! -- Regards, Eugene Kosov. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Count two kinds of related records?

2005-08-05 Thread Eugene Kosov
. SELECT accounts.name, COUNT(properties.property_id) AS totalcount, SUM(IF(status='Active' AND 'approval='Active', 1, 0)) FROM accounts LEFT JOIN properties USING(account_id) GROUP BY accounts.account_id; Regards, Eugene Kosov -- MySQL General Mailing List For list

Re: Creating new username password

2005-08-04 Thread Eugene Kosov
'; Replace USAGE in query above with priveleges set you want for your new account. See http://dev.mysql.com/doc/mysql/en/grant.html for more info. Regards, Eugene Kosov -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Field size error

2005-08-03 Thread Eugene Kosov
Dwi Putra L wrote: But not two days ago, suddenly the software can not work properly. Everytime the software run, there is message which mentioning something about field size error. The same messages, about field size error, still occured, although I have set

Re: Query - question

2005-08-01 Thread Eugene Kosov
) Refer to http://dev.mysql.com/doc/mysql/en/union.html for more details. Regards, Eugene Kosov -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysql command line execution

2005-08-01 Thread Eugene Kosov
Ehrwin Mina wrote: That isn't true. If you make a ps, you will see something like mysql -p x . As I said before, you can use something like: mysql -uUser --password=`cat password_file` db FYI, Nuno is correct you cannot see the password in the 'ps' and my scripts

Re: storing php pages with sql queries in a mysql database

2005-07-25 Thread Eugene Kosov
Gregory Machin wrote: Hi all. I'm writing a php script to store the contents of html and php pages in a data base, it works well until there are mysql queries in the pages source then give errors such as this one. Query failed: You have an error in your SQL syntax near 'temp' how do stop

Re: How to sort results with german umlauts in a UTF8 MySQL Database

2005-07-25 Thread Eugene Kosov
Christian Wollmann wrote: By the way: Perhaps you could tell me how I can determine/change the encoding of the database? SHOW CREATE DATABASE db_name; ALTER DATABASE db_name [[DEFAULT] CHARACTER SET charset_name] [[DEFAULT] COLLATE collation_name];

Re: use of indexes

2005-07-22 Thread Eugene Kosov
Chris Faulkner wrote: HI I have a query like this select * from table where ( ( field1 = 'VALUE1' and field2 like 'VALUE2%' ) OR ( field3 = 'VALUE1' and field2 like 'VALUE2%' ) ) I have created two composite indexes - one on field1 + field2 and one on field3 + field2. Explain on the SQL

Re: use of indexes

2005-07-22 Thread Eugene Kosov
Eugene Kosov wrote: Chris Faulkner wrote: HI I have a query like this select * from table where ( ( field1 = 'VALUE1' and field2 like 'VALUE2%' ) OR ( field3 = 'VALUE1' and field2 like 'VALUE2%' ) ) I have created two composite indexes - one on field1 + field2 and one on field3 + field2

Re: MySQL charset

2005-07-22 Thread Eugene Kosov
Privet! Yogesh wrote: HI, I have a client that runs php+mysql application and it has a problem with ORDER BY some_varchar_field sql expression. The DB is in russian cp1251 encoding and order by doesnt produce an alphabetically ordered result. our mysql server default charset is latin1 and

Re: mysql prob.

2005-07-20 Thread Eugene Kosov
Manish wrote: Hi, Platform is red hat linux-9.. my hardware is 2.8GHz pentium-4 with 512 GB ram.. softwares are Bugzilla 2.18 ,mysql-standard-4.0.15-pc-linu­x-i686, httpd-2.0.40-21 now problem is when i m trying to take back up of mysql by passing the command..

Re: Socket Problem

2005-07-20 Thread Eugene Kosov
[EMAIL PROTECTED] wrote: Hi, i try to use mysql with stunnel (http://stunnel.org) in order to encrypt my mysql connections. I know that mysql-4.x supports SSL but i can't compile it on my windows box. When i try to use stunnel on my windows box, it works, i just have to use this command :

Re: VARCHAR changes to INT - UNION

2005-07-15 Thread Eugene Kosov
Dennis Duggen wrote: Hi list Im new to the list so i hope it's the right place for my post. For a projekt i am combining different tables. Everything seems to work, but in some rows the Kode field VARCHAR(10) ends up as INT. I will try to explain with an example. Table1 46 47 48 67 Table2