Re: getting type of field

2005-02-25 Thread Mohsen Pahlevanzadeh
Oh,No dearm.I wanna retrieve data type of my col. that's right? > Mohsen, > > The info you're looking for is in the 2nd col of the resultset returned by > MYSQL_RES * mysql_list_fields (MYSQL *conn, const char *tbl, const > char *wild).. > Issue a SHOW COLUMS FROM tbl to see all cols returned. >

Re: getting type of field

2005-02-25 Thread Peter Brawley
Mohsen, The info you're looking for is in the 2nd col of the resultset returned by MYSQL_RES * mysql_list_fields (MYSQL *conn, const char *tbl, const char *wild).. Issue a SHOW COLUMS FROM tbl to see all cols returned. Peter Brawley http://www.artfulsoftware.com -- Mohsen Pahlevanzadeh wrote

getting type of field

2005-02-25 Thread Mohsen Pahlevanzadeh
Dears, I need to get type of my field in C. I didn't find a func for it job. Please guide me Yours,Mohsen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Primary Keys, Multiple Index and Searching

2005-02-25 Thread Jonathan Wright
Gleb Paharenko wrote: Hello. If you have a separate indexes on section and status columns, MySQL will use only one of them. And as the column status has very small number of possible values the cardinality of separate index on it will be too low and optimizer won't use this index. I think, if slow

RE: GROUP BY Clause

2005-02-25 Thread Tom Crimmins
On Friday, February 25, 2005 15:05, Asad Habib wrote: > I am trying to use GROUP BY with a field of type text that is set to > NOT NULL by default. However, in practice this field does not always > contain a string for every record and defaults to the empty string in > this case. When I try to us

Professional Enterprise Storage

2005-02-25 Thread Enhance-Tech Inc.
Enterprise Storage Enhance | Technology February 2005 vol. 1 The Enhance Technology 3U 16-drive storage systems are the true enterprise class systems within the peer group. The UltraStor™ RS3160SA opens the door to the world of high performance computing by integrating emerging SATA disk

Query Profiler

2005-02-25 Thread Nesim Razon
Hi, I am looking for a tool for mysql. A query Profiler tool. If anybody used MSSQL they know that, there is a tool SQL Profiler. You can connect to a remote server and watch queries LIVE. I can't find a tool like this for mySQL. Is it impossible to write a software like this? How can i listen quer

GROUP BY Clause

2005-02-25 Thread Asad Habib
I am trying to use GROUP BY with a field of type text that is set to NOT NULL by default. However, in practice this field does not always contain a string for every record and defaults to the empty string in this case. When I try to use GROUP BY with this field in a SELECT statement, only 1 record

Re: MySQL 4.1.10 + DBD-MySQL 2.9003 Incompatibility

2005-02-25 Thread Bastian Balthazar Bux
Jason Johnson ha scritto: I am running MySQL 4.1.10 and ActivePerl 5.8.6.811 on Windows 2003. When I upgraded MySQL from an older version, everything using DBD-MySQL complained about not being compatible and MySQL is telling me to upgrade to a newer client (in this case, obviously, my client bei

Re: Reg Text field data

2005-02-25 Thread Gleb Paharenko
Hello. What client do you use? You may use -e option for mysql client program and store result in the file: mysql -e 'select * from test.table' > res.txt 'SELECT ... INTO OUTFILE' may be useful. [EMAIL PROTECTED] wrote: > > Hi, > How to read a text type field from the d

Re: how to add a new user, that can create new users itself

2005-02-25 Thread Gleb Paharenko
Hello. The new users created by your first new user would have the same, or subset of privileges which he has. He can revoke the same privileges he has from the other users. To remove users he should have GRANT OPTION privilege on mysql database (this allows him to execute DROP USER).

Re: FULLTEXT Exact phrase search including quotes

2005-02-25 Thread Gleb Paharenko
Hello. At first: from your phrase with default values for the FULLTEXT parameters there is the only one meaningful word - football. Because 'I', 'on', 'TV' has less than 3 characters. 'like' is in the stopword list. Quotes '"' - are skipped from the search. What query do you use to search? D

Re: copy DB data from FreeBSD to Redhat9.0

2005-02-25 Thread Gleb Paharenko
Hello. > I also want to copy the user accounts in MySQL5.0 db over to MySQL4.1 in > Redhat as well. All user accounts and rights are stored in the tables of mysql database. And fields of grant tables in 4.1.x version just a subset of fields in 5.0.x. You should set the values of fields in

Re: copy DB data from FreeBSD to Redhat9.0

2005-02-25 Thread Gleb Paharenko
Hello. > After finished copied the data over to Redhat, MySQL4.1 can't start. The What is in the error log? > I don't want to rebuild the entire database from scratch in Redhat Do you mean that you don't want to use mysqldump? But usually it is a preferred way. sam wun <[EMAIL PRO

Re: replication, table db already exists

2005-02-25 Thread Gleb Paharenko
Hello. Did you set the master_log_pos and master_log_file to the correct value? Did you use --master-data option for mysqldump as mentioned at: http://dev.mysql.com/doc/mysql/en/replication-howto.html [EMAIL PROTECTED] wrote: > > Hello All, > Here is a problem I have been tr

Re: Problem with empty string comparison

2005-02-25 Thread Gleb Paharenko
Hello. As of MySQL 4.1, values in CHAR and VARCHAR columns are sorted and compared according to the collation of the character set assigned to the column. The reason of that why comparing with an empty string gives you 0 layes in your collation. For cp1251_genral_cs it gives correct resu

Re: mysql vs postgresql

2005-02-25 Thread Gleb Paharenko
Hello. You should search in archives for such questions. For example see threads at: http://lists.mysql.com/mysql/160972 http://lists.mysql.com/mysql/170673 "shabanip" <[EMAIL PROTECTED]> wrote: > hi, > just want to know the main benefits of mysql over postgresql. > thanks,

Re: latest GPL version

2005-02-25 Thread Gleb Paharenko
Hello. Complete information about licensing policy you can receive from [EMAIL PROTECTED] "shabanip" <[EMAIL PROTECTED]> wrote: > what is the latest GPL licensed version of mysql? > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is spons

Re: php.ini file

2005-02-25 Thread Gleb Paharenko
Hello. >settings to my php.ini I think you should ask about settings in php.ini in some PHP related mailing list. >also for my.ini but no results. MySQL can run without a configuration file (options can be specified in the command line). But you can create your own file. See: h

Re: Primary Keys, Multiple Index and Searching

2005-02-25 Thread Gleb Paharenko
Hello. If you have a separate indexes on section and status columns, MySQL will use only one of them. And as the column status has very small number of possible values the cardinality of separate index on it will be too low and optimizer won't use this index. I think, if slow updates won't be

Re: replication, table db already exists

2005-02-25 Thread Jim Grill
[EMAIL PROTECTED] wrote: Hello All, Here is a problem I have been trying to debug for a few days. I had a mysql server running for about a month. I did a mysql dump of all the tables on the master and setup a second machine to be the slave, loading all the tables. I set the replication stuff

Loading data on startup

2005-02-25 Thread gunmuse
I need to copy data from TABLE A to TABLE B(Memory Table) on MySql startup or restart.   MySql --init-file on startup is obviously something I need to use could I get an example of what a sql would look like to start the memory table and completely copy data from table A. ThanksDonny Lairs

Re: aggregate count and group by

2005-02-25 Thread Jim Grill
Jim Grill <[EMAIL PROTECTED]> wrote on 02/18/2005 03:17:39 PM: Hi, I need some SQL guru help on this one. I'm trying to re factor an existing application where a number of clicks grouped by keyword for two different time periods are needed. For example, a user picks a date range and the applic

Re: mysql vs postgresql

2005-02-25 Thread Rich Lafferty
On Fri, Feb 25, 2005 at 06:43:50PM +0100, Jochem van Dieten <[EMAIL PROTECTED]> wrote: > > Don't you think it is childish to link to documentation from 2003? I've never seen a child do anything like you describe. -Rich -- Rich Lafferty --+

Re: Remote Connection via Toad for MySQL

2005-02-25 Thread Karam Chand
You can try SQLyog (www.webyog.com), it supports 3.23.x to 5.0. Lightweight and very fast! Karam --- [EMAIL PROTECTED] wrote: > Good good. > > On 24 Feb 2005, at 20:46, > [EMAIL PROTECTED] wrote: > > BINGO!!! > Thanks Dan! > Kelly > > > > Daniel Walker <[EMAIL PROTECTED]> > What vers

Re: mysql vs postgresql

2005-02-25 Thread Jochem van Dieten
On Fri, 25 Feb 2005 11:21:26 -0600, mos wrote: > > http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/MySQL-PostgreSQL_features.html There is a reason this page was removed from the MySQL site: some of it was never correct in the first place, and the rest was severly outdated. Don't you thi

Re: INSERT .. SELECT ... ON DUPLICATE KEY UPDATE

2005-02-25 Thread Sergei Golubchik
Hi! On Feb 24, Tom Cunningham wrote: > It appears you can't combine an insert-select with an on-duplicate-key-update. You can, since 4.1.10 (and there're some problems with name resolution there, so better wait for 4.1.11 - search bugdb for details) Regards, Sergei -- __ ___ ___

Re: mysql vs postgresql

2005-02-25 Thread mos
At 05:45 PM 2/24/2005, you wrote: hi, just want to know the main benefits of mysql over postgresql. thanks, Payam Shabanian Payam, The differences between the products are narrowing, especially with MySQL 5.0 which is still in beta. If I could sum it up in 1 sentence then MySQL is typical

mysql index cardinality

2005-02-25 Thread mel list_php
Hi, A strange thing with index, I thought the cardinality was automatically updated (like for a primary key for exemple). When I use a primary key in a table, insert a row, the cardinality is increased of 1 as well. I just tried to do that with an INDEX, and the cardinality is none unless I up

Re: modulo operation

2005-02-25 Thread Thomas Lenherr
Hi Jigal, Hi Peter, first of all: it's true, the wikipedia-site is not contradicting the mysql-implementation, it seems i didn't read it too carefully... The guy who "invented" the modulo-operation was G.F. Gauss in his book "Disquisitiones Arithmeticae" which was published in 1801. His definiti

MySQL 4.1.10 + DBD-MySQL 2.9003 Incompatibility

2005-02-25 Thread Jason Johnson
I am running MySQL 4.1.10 and ActivePerl 5.8.6.811 on Windows 2003. When I upgraded MySQL from an older version, everything using DBD-MySQL complained about not being compatible and MySQL is telling me to upgrade to a newer client (in this case, obviously, my client being DBD-MySQL). Does anyo

Re: modulo operation

2005-02-25 Thread Jigal van Hemert
From: "Peter Brawley" > There are various interpretations of modulo. It's not simply > "remainder", eg see the discussion at > http://mathforum.org/library/drmath/view/52343.html including this chart > from the 1983 Ada manual: The article at wikipedia already mentioned multiple interpretations.

Re: SLOW Mysql Subquery

2005-02-25 Thread Dale Roddy
Shawn- Works like a champ! Thanks so much. If your ever in the Silicon Valley area drop me a line, and I will be happy to pick up lunch or cocktails. It's great that you are so active on this list and are helping so many folks on here (myself included). -Dale On Fri, 25 Feb 2005 10:06:36 -050

Re: modulo operation

2005-02-25 Thread Peter Brawley
There are various interpretations of modulo. It's not simply "remainder", eg see the discussion at http://mathforum.org/library/drmath/view/52343.html including this chart from the 1983 Ada manual: The relations between integer division, remainder, and modulus are illustrated by the follo

Re: SLOW Mysql Subquery

2005-02-25 Thread SGreen
(response NOT top-posted. see below...) Dale Roddy <[EMAIL PROTECTED]> wrote on 02/24/2005 05:40:22 PM: > I am new to MySql. I have a query with a subselect that is running > very slow (28 seconds). > > SELECT *,MATCH(title, descr_part) AGAINST ("Project Manager" IN > BOOLEAN MODE) AS score > F

php.ini file

2005-02-25 Thread H. Postel
I am setting up a database for the first time. I have to change some settings to my php.ini file, but I can not find it. I work with MySQL 3.23.49 Can somebody help me? The software is running on a server of my ISP. I searched almost everywhere, also for my.ini but no results. I need to solve this

Re: Subquery speed : IN (SELECT ...) versus IN (X, Y, Z, ...)

2005-02-25 Thread HMax
Hi there, thank you for your reply. I off course indexed all the required field. The problem is that, whatever you do, if you have more than one value in the IN or = ANY clause, index won't be used, just like when you do a "OR". At least this is what I noticed already in the past. Concerning the

Problem with empty string comparison

2005-02-25 Thread Dušan Pavlica
Hello, I have upgraded MySQL from 4.0.7 to 4.1.9 (OS Win XP SP2) and now I have a problem with empty string comparison. Test case: CREATE TABLE tb_test ( t1 char(5) NOT NULL default '', t2 char(5) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=cp1250 COLLATE=cp1250_czech_cs; INSERT IN

Re: feature reach mysql

2005-02-25 Thread Gleb Paharenko
Hello. 5.0.2 has more features, but now it is not yet production ready. "shabanip" <[EMAIL PROTECTED]> wrote: > which version of mysql has more features? > > Payam Shabanian > [EMAIL PROTECTED] > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita

Re: BIGINT UNSIGNED issue?

2005-02-25 Thread Gleb Paharenko
Hello. The behaviour of UNSIGNED BIGINT was correct on my Win2k Professional. Do you use a mysql command line client or other client software? mysql> create table bu(a bigint unsigned); Query OK, 0 rows affected (0.20 sec) mysql> insert into bu values('18446744073709551615'); Query OK

Re: modulo operation

2005-02-25 Thread Jigal van Hemert
From: "Thomas Lenherr" Hi Thomas, > I just wanted to know if there is a special reason for the > mathematically incorrect implementation of the modulo-operation in mysql. > Using a correct modulo operation on a negative number would still result > in a positive number: > -1 % 2 == 1 (mysql: -1)

feature reach mysql

2005-02-25 Thread shabanip
which version of mysql has more features? Payam Shabanian [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]