Re: SELECT and LIMIT question

2004-10-14 Thread Jay K
Yes. I want to retrieve 5 of each. If I put LIMIT 5, the entire query retrieves only 5 for table1.col2 with value of 1 because 1 is the first in the IN (1,2,3) clause. If I put LIMIT 15, the query returns 15 rows same as above instead 5 for each 1, 2, and 3 values. This is because there are more

Re: IP address to searchable number

2004-10-14 Thread James Weisensee
Scott, This may not be your exact solution, but if your network address is 24 bit then you could just check against the last octet, i.e. x = 10 and x = 100. James --- Scott Haneda [EMAIL PROTECTED] wrote: Given a IP range such as: 12.8.197.10 - 12.8.197.100 I want to store those 2 values

Re: IP address to searchable number

2004-10-14 Thread Jigal van Hemert
From: Scott Haneda [EMAIL PROTECTED] Any idea what I should convert a IP address into in order to be able to operate on it with simple greater than, less than and equal to math? As a compromise between human readability and searchability you could store the IP-address as a series of zero-padded

Strange query performance problem

2004-10-14 Thread Leszek Gawron
Mysql 4.1.3 Windows XP SP1 All tables are InnoDB The query (1): select Product.id, LongAnswer.value, count(*) from LongAnswer inner join Answer on LongAnswer.answer=Answer.id inner join QuestionDefinition on Answer.question=QuestionDefinition.id inner join Survey on Answer.survey = Survey.id inner

Re: my_thread_init

2004-10-14 Thread Philippe Poelvoorde
John McCaskey wrote: I believe that what you described is perfectly acceptable. The thing to keep in mind is the thread_init allocates thread specific memory for mysql, and the thread_end clears it. As such you should never execute any other mysql commands unless you have executed an init, and

How do I override skip-networking in 2nd conf file?

2004-10-14 Thread Thomas Plümpe
My MySQL 4.0 server tells me it reads these configuration files in the given order: /etc/mysql/my.cnf /var/lib/mysql/my.cnf ~/.my.cnf The first contains the skip-networking option, which I would like to override in the second file. The documentation states that skip-networking is a

Access Denied

2004-10-14 Thread Michael J. Pawlowsky
Since I see this question every single day hereI will post this link. http://dev.mysql.com/doc/mysql/en/Access_denied.html It is a decent page on the MySQL site that gives you reasons why you get Access Denied. Mike -- MySQL General Mailing List For list archives:

Number of Rows in DB.

2004-10-14 Thread Michael J. Pawlowsky
Does anyone know of a quick way to get the number of rows in a database from the command prompt. I run a cron job that does a mysql dump nightly from a prod server piped to a standy server. It's a 2 line shell script including outputting the date at time. After the dump, I would like to

RE: Number of Rows in DB.

2004-10-14 Thread Sujay Koduri
hi.. you can use... select count(1) from table_name; (it will traverse only column 1) as count(*) will go through all the columns, it will take much time compared to this which generally will take less time. by the way, can you send the shell script which you are using, it might be

Re: Number of Rows in DB.

2004-10-14 Thread Michael J. Pawlowsky
I'm want ALL the rows from the WHOLE DATABASE not just one table. I could do a show tables and then loop through each one and perform the select count and add it up. But I'm hoping to find a better way. As for the script, simply read the mysqldump man page. It is in the examples near the

RE: Number of Rows in DB.

2004-10-14 Thread Sujay Koduri
hi all.. I think there is no way to count all the rows in a DB, using a single query. we can say.. desc table_name; (gives all the tables in the DB) and then get no of rows for each table.. Thanks sujay -Original Message- From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]

a puzzle (at least for me)

2004-10-14 Thread Ferhat BINGOL
Hi, I could not do this... TABLE1 ID NAME price - -- 1 1stname 34 2 2ndname 0 TABLE2 date 1stname 2ndname --- --- --- 20041023 23.5 12.3 As a result I want to get out raws something like this... 1 34 1stname 23.5 2 0 2ndname 12.3 What is the SQL syntax

where to download older versions?

2004-10-14 Thread robinbittner
Hi, please, where can I download older version (4.0.20) of mysql for Windows? I searched archives, documentation, no advice. In fact, I only need libmysql.dll file - can anybody send me? thanks, Roman -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

left join question

2004-10-14 Thread Richard Reina
Is it possible to do two left joins involving three tables in one query? select a.id, a.amount FROM t1 LEFT JOIN t2 ON (t1.id=t2.id) then LEFT JOIN t3 ON (t1.id=t3.id) Is this even possible? Any help would be greatly appreciated. Richard -- MySQL General Mailing List For list archives:

RE: a puzzle (at least for me)

2004-10-14 Thread Jay Blanchard
[snip] I could not do this... TABLE1 IDNAME price - -- 1 1stname 34 2 2ndname 0 TABLE2 date 1stname 2ndname --- --- --- 20041023 23.512.3 As a result I want to get out raws something like this... 1 34 1stname 23.5 2 0 2ndname 12.3 What

Re: Q: outer join w/restriction

2004-10-14 Thread Harald Fuchs
In article [EMAIL PROTECTED], Martin Gainty [EMAIL PROTECTED] writes: You should generally not have any conditions in the ON part that are used to restrict which rows you want in the result set, but rather specify these conditions in the WHERE clause Forgive me for following the

RE: left join question

2004-10-14 Thread Jay Blanchard
[snip] Is it possible to do two left joins involving three tables in one query? select a.id, a.amount FROM t1 LEFT JOIN t2 ON (t1.id=t2.id) then LEFT JOIN t3 ON (t1.id=t3.id) Is this even possible? [/snip] Yes, and the keys from table to table don't have to be the same, save for each JOIN..

User Defined functions

2004-10-14 Thread lakshmi.narasimharao
Hi, How to call a user defined function. I am using C as the programming language. I write a small function in C. Created .dll. Then how to run it from mysql pompt?. How to call or use it?. will any one of you help me in this. Thanks, Narasimha -Original Message-

Re: left join question

2004-10-14 Thread Rhino
- Original Message - From: Richard Reina [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 8:26 AM Subject: left join question Is it possible to do two left joins involving three tables in one query? select a.id, a.amount FROM t1 LEFT JOIN t2 ON

MySQL doesn't startup anymore

2004-10-14 Thread Marc
I'm using MySQL on Gentoo Linux and today it stopped starting up. It was working a few days ago, and I haven't played with anything in the system - no new installs, config changes, etc. It just decided to go on vacation. I run mysqld_safe and it quits right away with no error messages. I've got

Re: MySQL doesn't startup anymore

2004-10-14 Thread Victor Pendleton
What is written to ther error log? Marc wrote: I'm using MySQL on Gentoo Linux and today it stopped starting up. It was working a few days ago, and I haven't played with anything in the system - no new installs, config changes, etc. It just decided to go on vacation. I run mysqld_safe and it

Re: User Defined functions

2004-10-14 Thread Philippe Poelvoorde
[EMAIL PROTECTED] wrote: Hi, How to call a user defined function. I am using C as the programming language. I write a small function in C. Created .dll. Then how to run it from mysql pompt?. How to call or use it?. will any one of you help me in this. Thanks, Narasimha I don't clearly

Re: a puzzle (at least for me)

2004-10-14 Thread Rhino
- Original Message - From: Ferhat BINGOL [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 8:24 AM Subject: a puzzle (at least for me) Hi, I could not do this... TABLE1 ID NAME price - -- 1 1stname 34 2 2ndname 0 TABLE2

Select Binary Field when UTF8 and Collate

2004-10-14 Thread Kevin Cowley
We have a database that has one particular table, searchdata, that has the following columns BINARY key_low(5) BINARY key_high(5) VARCHAR searchss(255) The following query, when the SET QUERY UTF8 option is present, doesn't work because MySQL encodes the binary field. Any ideas how we get

Re: join syntax

2004-10-14 Thread Michael Stassen
Please reply to the list, rather than to me, personally. Keeping the thread on the list improves your odds of geting a solution, and allows others with similar questions to see the answers. Marco wrote: Michael Stassen wrote: What do you mean, it doesn't work? Michael Marco wrote: The query

multiple linked tables, fetch results

2004-10-14 Thread Guido Gloor
Hi there I have three linked tables, the_data (with the actual data I want), linked with an nn_link table to a category table. Then, that category table is linked n:1 to a display_category table. The other way around: Each display_category entry is linked to one category entry, which in turn is

Newbie HELP. Using SELECT in Query Browser to retrieve records

2004-10-14 Thread Janjs Jangori
Am new to mysql and have some difficulty in retrieveing data from 3 tables using the Query Browser(version 1.0.8). I have 3 tables (axkde, axuser,axdev). All 3 tables have 'id','sender','reply'fields. Id is unique in all 3 tables. Now I want a query to extract data from the 3 tables.

Re: Number of Rows in DB.

2004-10-14 Thread SGreen
try: SHOW TABLE STATUS Shawn Green Database Administrator Unimin Corporation - Spruce Pine Michael J. Pawlowsky [EMAIL PROTECTED] wrote on 10/14/2004 06:54:16 AM: Does anyone know of a quick way to get the number of rows in a database from the command prompt. I run a cron job that does a

Re: SELECT and LIMIT question

2004-10-14 Thread SGreen
I believe you need to combine the results of 3 separate queries (each with a limit of 5) into a temp table and respond with the contents of the table you built. If I read this correctly (http://dev.mysql.com/doc/mysql/en/UNION.html) you could do the same thing with a UNION query and skip the

Re: Date range with empty rows (Was: Intra-table join)

2004-10-14 Thread Harald Fuchs
In article [EMAIL PROTECTED], Partap Davis [EMAIL PROTECTED] writes: I'm graphing the data from this query using dates on the x axis. The input to my graph module (GD::Graph) requires a constant-length list. So if any days in my selection range have no data, I need to fill the space with an

Re: Date range with empty rows (Was: Intra-table join)

2004-10-14 Thread SGreen
I have the same issue (missing dates) with my graphing widget, too. I worked around my problem by using script to create a temp table that contains all of the dates that cover the range of dates I want to chart then left join the data tables to my temp table. Sure it's a small memory load, and

Re: Number of Rows in DB.

2004-10-14 Thread Michael Stassen
Sujay, The output of DESCRIBE table_name; does not include number of rows. Perhaps you meant SHOW TABLE STATUS LIKE 'table_name'; or simply SHOW TABLE STATUS; as Michael suggested, to get output for each and every table. If so, it is important to note that the row count for InnoDB tables

Re: SELECT and LIMIT question

2004-10-14 Thread Michael Stassen
Right. (SELECT col1, col2, col3, col4 FROM table1, table2 WHERE table1.col1 = table2.col1 and table1.col2 = 1 ORDER BY col3 DESC LIMIT 5) UNION (SELECT col1, col2, col3, col4 FROM table1, table2 WHERE table1.col1 = table2.col1 and table1.col2 = 2 ORDER BY col3 DESC LIMIT 5)

Re: Number of Rows in DB.

2004-10-14 Thread Gary Richardson
Note that SHOW TABLE STATUS counts for innodb are educated guesses -- innodb has to do a table scan to get the actual count. On Thu, 14 Oct 2004 10:19:19 -0400, Michael Stassen [EMAIL PROTECTED] wrote: Sujay, The output of DESCRIBE table_name; does not include number of rows.

Re: Q: outer join w/restriction

2004-10-14 Thread Martin Gainty
Harals: Any resultset which ANDs any/all condition(s) would further restrict that resultset to meet the criteria I guess I just dont understand your definition of 'complaining' Martin- - Original Message - From: Harald Fuchs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October

Re: Number of Rows in DB.

2004-10-14 Thread Michael J. Pawlowsky
Getting closer Thanks... This db had LOTS of tables... That's why I'm simply trying to get the total. Is there a way to only get one column of this. then I can do something like select SUM(show table status (rows)); [EMAIL PROTECTED] wrote: try: SHOW TABLE STATUS Shawn Green Database

Re: Number of Rows in DB.

2004-10-14 Thread Michael J. Pawlowsky
Well basically what I did was simply move a script that I've been using on other databases and tried it on this new LARGE db. And luckily the number or rows were off by something like 30,000 so it was easy to figure out something went wrong (got total from phpMyAdmin) I then tweak my dumps so

Re: MySQL doesn't startup anymore

2004-10-14 Thread Marc
I'm getting: 041014 08:55:53 mysqld started Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line 041014 8:55:53 Can't start server: Bind on TCP/IP port: Address already in use 041014 8:55:53 Do you already have another mysqld

Re: MySQL doesn't startup anymore

2004-10-14 Thread Jay Blanchard
[snip] How do I check on what is binding port 3306? I don't see mysqld running and running mysql gets a Can't connect failure. [/snip] ps -aux from the command line -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: MySQL doesn't startup anymore

2004-10-14 Thread Michael J. Pawlowsky
On unix? netstat -l(as root -- that's lower case L) Marc wrote: == How do I check on what is binding port 3306? I don't see mysqld running and running mysql gets a Can't connect failure. --Marc -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: Number of Rows in DB.

2004-10-14 Thread Alec . Cawley
Michael J. Pawlowsky [EMAIL PROTECTED] wrote on 14/10/2004 17:01:34: Getting closer Thanks... This db had LOTS of tables... That's why I'm simply trying to get the total. Is there a way to only get one column of this. then I can do something like select SUM(show table status

Re: MySQL doesn't startup anymore

2004-10-14 Thread Michael J. Pawlowsky
actually use netstat -l -p That way you get the process id then you can ps -eaf | grep (PID) to see what is listening. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Number of Rows in DB.

2004-10-14 Thread Michael J. Pawlowsky
They do not... But I think I will just re-write my script in php command line and loop through it. It was just that I loved the simplicity of the bash script. [EMAIL PROTECTED] wrote: Michael J. Pawlowsky [EMAIL PROTECTED] wrote on 14/10/2004 17:01:34: Getting closer Thanks... This

Hi, a problem about selecting...

2004-10-14 Thread Gokce Hazaroglu
I've a table and many fields. I want to search something in all fields. - select * from table where table.* like '%something%' did not work.. Is there a wayto dothis? Gokce AKKAYA HAZAROGLU OptikNet Bilgisayar [EMAIL PROTECTED] http://www.optiknet.com.tr

Re: SELECT and LIMIT question

2004-10-14 Thread Jay K
Works great. Is the a limit on the size of the query. There are currently 50 queries (may go upto 300 in future) and each has 15 cols (250b each query) which makes the entire query 12kb (250 x 50). Thanks, Jay --- Michael Stassen [EMAIL PROTECTED] wrote: Right. (SELECT col1, col2,

Re: MySQL doesn't startup anymore

2004-10-14 Thread Marc
Thanks to all for the help. I did find a mysqld running using ps -aux and killed that. Looks like I'm all set. --Marc On Thu, 2004-10-14 at 11:33, Melanie wrote: I had this problem too: I identified the pid with ps -aux and then kill them manually. (kill -9 pid) hope it will help you.

Re: MySQL doesn't startup anymore

2004-10-14 Thread Melanie
I had this problem too: I identified the pid with ps -aux and then kill them manually. (kill -9 pid) hope it will help you. Marc wrote: I'm getting: 041014 08:55:53 mysqld started Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command

Transactions question

2004-10-14 Thread Stuart Felenstein
I'm in the midst of writing out some code that will take data from a huge form and write it to the database. All the tables for insertions are innodb so i'm going (or trying too) with the one stop shop approach - transactions. Question: The first table I write too has as it's first column an

Re: Number of Rows in DB.

2004-10-14 Thread Eamon Daly
Well, here's a quick and dirty way to do it: #!/bin/sh mkdir /tmp/count chmod a+rwx /tmp/count cd /tmp/count mysqldump -T . production wc -l *.txt production rm *.sql *.txt mysqldump -T . standby wc -l *.txt standby diff production standby rm -rf /tmp/count

Re: Hi, a problem about selecting...

2004-10-14 Thread Rhino
Have a look at fulltext searches. This is described in the MySQL manual at http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html. If you put all of your columns in the column list following the FULLTEXT keyword, you will be able to use MATCH AGAINST expressions to find what you want. I'm

How can I turn this into an update query?

2004-10-14 Thread Ed Lazor
Is there a way for me to change this select query into an update query? select t1.ID, t1.Title, t2.Title from products t1, systems t2 where t1.Title like CONCAT(t2.Title, %) A lot of products have the system title as the first part of the product title. I'm trying to update the product SystemID

Re: Number of Rows in DB.

2004-10-14 Thread Michael J. Pawlowsky
Thanks Eamon... I will think about it... But I'm looking at almost 1,000,000 rows. Not sure this is the most effecient way. But I do appreciate the effort! I think the idea of a php script that loops through show tables to get the table names and then does a Select COUNT(*) on each one and

RE: Number of Rows in DB.

2004-10-14 Thread Ed Lazor
Would UNION help? Something like this: select count(ID) as Total from categories where ID 5 UNION select count(ID) as Total from products where ID 5 UNION select count(ID) as Total from systems where ID 5 Then you could just sum Total? -Original Message- They do not... But I

Re: keep field names unique across database?

2004-10-14 Thread Shankar Unni
[EMAIL PROTECTED] wrote: The second camp, as is described in the article, are more data-oriented. This practice was created in the original days of databases and programming design where ALL variables, including table names and field names, were global and needed to be absolutely unique. It's

Re: Transactions question

2004-10-14 Thread Stuart Felenstein
Sorry I found out about Last Insert_ID right after writing this. I guess the correct sequence is check manual then post to list ? Stuart --- Stuart Felenstein [EMAIL PROTECTED] wrote: I'm in the midst of writing out some code that will take data from a huge form and write it to the

Re: Number of Rows in DB.

2004-10-14 Thread Eamon Daly
Pfft. Efficiency, schmefficiency. Here's a version in perl: #!/usr/bin/perl use strict; use warnings; use DBI; use MySQL::Config qw(parse_defaults); die $0: specify exactly 2 arguments ($0 table_1 table_2)\n if @ARGV != 2; my %mysql_cfg = parse_defaults my, ['client']; my $user =

simple but frustrating query

2004-10-14 Thread Jeff Mathis
hello query gurus. we have a table TD with the following columns: close_date symbol name close_date is just a date field there is a unique constraint on the combination of close_date and symbol. what we want is the value for the name field corresponding to the row with the most recent close_date.

Re: SELECT and LIMIT question

2004-10-14 Thread SGreen
There is a HUGE limit on the size of the results of a query but I don't know exactly what yours will be. I do know it should be more than 2GB so I don't think your 4500 fields of data (300X15) will meet that limit. However, there is a practical limit on how many queries can be UNIONed into

RE: simple but frustrating query

2004-10-14 Thread Ed Lazor
-Original Message- what we want is the value for the name field corresponding to the row with the most recent close_date. Based on that comment, I'd select name from TD order by close_date DESC limit 1 something like this: select max(close_date), symbol, name from TD where

Re: simple but frustrating query

2004-10-14 Thread Jeff Mathis
Ed Lazor wrote: -Original Message- what we want is the value for the name field corresponding to the row with the most recent close_date. Based on that comment, I'd select name from TD order by close_date DESC limit 1 except, we run into problems when there is a list of values for symbol

Adding DSN into Coldfusion Admin?

2004-10-14 Thread Steve Grosz
I am new to using MySql. I installed it on a seperate server on Win2003. That server has a 192.168.x.x address on my network. I am trying to add a DSN connection from Coldfusion to the database, but every time I try using the MySql driver/connection type, it says there doesn't seem to be a

Re: simple but frustrating query

2004-10-14 Thread Joe Audette
How about select close_date, symbol, name from TD where symbol in (list of characters) limit 1 ORDER BY close_date desc Jeff Mathis [EMAIL PROTECTED] wrote: hello query gurus. we have a table TD with the following columns: close_date symbol name close_date is just a date field there

Re: simple but frustrating query

2004-10-14 Thread Jeff Mathis
I'll be more explicit: select max(close_date), symbol, name from TD where symbol in ('aa','bb','cc') group by symbol, name order by symbol; returns +-++-+ | max(close_date) | symbol | name| +-++-+ | 2004-10-05 |

Re: simple but frustrating query

2004-10-14 Thread SGreen
It takes two steps: first determine the max(closedate) for each symbol, then use those results to get the name field. You could do this with a subquery (both steps in the one statement) because you are using a version of MySQL 4.0.0 but here is a temp table implementation that will work with

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Eric Bergen
telnet to it. MySQL will return a 'hello' packet. -Eric On Thu, 14 Oct 2004 12:37:08 -0600, Steve Grosz [EMAIL PROTECTED] wrote: I am new to using MySql. I installed it on a seperate server on Win2003. That server has a 192.168.x.x address on my network. I am trying to add a DSN

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Steve Grosz
So what, a telnet 192.168.x.x:3306 ? Eric Bergen wrote: telnet to it. MySQL will return a 'hello' packet. -Eric On Thu, 14 Oct 2004 12:37:08 -0600, Steve Grosz [EMAIL PROTECTED] wrote: I am new to using MySql. I installed it on a seperate server on Win2003. That server has a 192.168.x.x address

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Steve Grosz
If that's the case, its not working, I type a telnet 192.168.x.x:3306 and get a could not open a connection to the host even though Mysql-nt shows as running on the Win2003 server. Steve Eric Bergen wrote: telnet to it. MySQL will return a 'hello' packet. -Eric On Thu, 14 Oct 2004 12:37:08

Re: simple but frustrating query

2004-10-14 Thread Joe Audette
+-++-+ | max(close_date) | symbol | name| +-++-+ | 2004-10-05 | aa | cmptrhw | | 2004-10-05 | bb | biotech | | 2004-10-05 | cc | biotech |

Re: Number of Rows in DB.

2004-10-14 Thread Santino
SQL: create TEMPORARY table A select count(1) as C from TABLE1; insert into A select count(1) as C from TABLE2; . select sum(C) from a; drop table A; Or create TEMPORARY table A (C integer); insert into A select count(1) from TABLE1 union all select count(1) from TABLE2 ... union all

Converting date in MySQL

2004-10-14 Thread Stuart Felenstein
Hi, I am taking user input via a calendar widget (guess it's js) Apparently, mysql does not like the format MM/DD/ Then again I tried it around , still no dice. It's intended to go into a Date column. Is there a way I can correct it right within my query ? Stuart -- MySQL General

Re: Converting date in MySQL

2004-10-14 Thread Jeff Smelser
On Thursday 14 October 2004 02:45 pm, Stuart Felenstein wrote: Apparently, mysql does not like the format MM/DD/ Then again I tried it around , still no dice. It's intended to go into a Date column. http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html All, you every need to

Re: Converting date in MySQL

2004-10-14 Thread Stuart Felenstein
Thanks , I know the page and have the links bookmarked! Stuart --- Jeff Smelser [EMAIL PROTECTED] wrote: On Thursday 14 October 2004 02:45 pm, Stuart Felenstein wrote: Apparently, mysql does not like the format MM/DD/ Then again I tried it around , still no dice. It's intended

Re: Converting date in MySQL

2004-10-14 Thread Jeff Smelser
On Thursday 14 October 2004 03:12 pm, Stuart Felenstein wrote: Thanks , I know the page and have the links bookmarked! So you got the answer from it right? Jeff pgpSsmcBOJscM.pgp Description: PGP signature

Re: simple but frustrating query

2004-10-14 Thread Jeff Mathis
we really don't want to issue two queries. this should be able to be done in one, and without using temp tables, but maybe not. thanks for the help though jeff [EMAIL PROTECTED] wrote: It takes two steps: first determine the max(closedate) for each symbol, then use those results to get the name

Re: Converting date in MySQL

2004-10-14 Thread Stuart Felenstein
No :),. cause it seems that those formats are for outbound, db -. I was looking for the other direction. Stuart --- Jeff Smelser [EMAIL PROTECTED] wrote: On Thursday 14 October 2004 03:12 pm, Stuart Felenstein wrote: Thanks , I know the page and have the links bookmarked! So you got the

Re: Converting date in MySQL

2004-10-14 Thread Jeff Smelser
On Thursday 14 October 2004 03:35 pm, Stuart Felenstein wrote: No :),. cause it seems that those formats are for outbound, db -. I was looking for the other direction. Huh? It really doesnt matter does it? They work either way.. I use those functions all the time for inbound.. Jeff

Re: Converting date in MySQL

2004-10-14 Thread SGreen
For values headed into a SQL statement, use whatever functions are available to you in the language (PHP, PERL, Python, Java, VB Script,...) you are using to accept the user's input in order to make the commands you send MySQL correct. You just need to convert the date into -MM-DD

Re: Converting date in MySQL

2004-10-14 Thread Jeff Smelser
On Thursday 14 October 2004 03:46 pm, [EMAIL PROTECTED] wrote: For values headed into a SQL statement, use whatever functions are available to you in the language (PHP, PERL, Python, Java, VB Script,...) you are using to accept the user's input in order to make the commands you send MySQL

RE: Converting date in MySQL

2004-10-14 Thread Mike Johnson
From: Jeff Smelser [mailto:[EMAIL PROTECTED] On Thursday 14 October 2004 03:35 pm, Stuart Felenstein wrote: No :),. cause it seems that those formats are for outbound, db -. I was looking for the other direction. Huh? It really doesnt matter does it? They work either way.. I use

Re: Converting date in MySQL

2004-10-14 Thread Jeff Smelser
On Thursday 14 October 2004 04:00 pm, Mike Johnson wrote: It does matter, though. You can't use DATE_FORMAT() to translate '10/14/2004' into '2004-10-14.' No, your right, that would be wrong. It looks like what the poster wants is STR_TO_DATE() (a la STR_TO_DATE('10/14/2004', '%m/%d/%Y'),

Delete data from more than one table

2004-10-14 Thread Jerry Swanson
I can delete data for one table with no problem: delete from table; I need to delete data for more than one table. I tried to run this query: delete from account, survey; //But the query crashes. Any ideas how to delete data for more than one query. TH -- MySQL General Mailing List For list

Re: Delete data from more than one table

2004-10-14 Thread Jeff Mathis
if your schema can be set up to use pk/fk constraints, you can add an on delete cascade statement. if not, then its maybe safer to delete table by table anyway. Jerry Swanson wrote: I can delete data for one table with no problem: delete from table; I need to delete data for more than one

Re: simple but frustrating query

2004-10-14 Thread Brad Eacker
Jeff Mathis writes: now, leaving off name from the group by clause (select max(close_date), symbol, name from TD where symbol in ('aa','bb','cc') group by symbol;) gives +-++-+ | max(close_date) | symbol | name|

Re: simple but frustrating query

2004-10-14 Thread Michael Stassen
No, Shawn's answer is correct. You are starting from a false assumption. You are expecting that MAX(closedate) corresponds to a row. It does not. Consider the table Table=stuff: sym val note --- --- AAA 2 one AAA 2 two AAA 4 three AAA 6 four AAA 12 five

Re: simple but frustrating query

2004-10-14 Thread Jeff Mathis
4.1.3 and the innodb engine on solaris 5.8 Brad Eacker wrote: Jeff Mathis writes: now, leaving off name from the group by clause (select max(close_date), symbol, name from TD where symbol in ('aa','bb','cc') group by symbol;) gives +-++-+ | max(close_date) |

Unique key violations

2004-10-14 Thread Matt Parlane
Hi all... I am having a problem with unique key violations in one of my tables. This is the table structure: CREATE TABLE `optionaldata` ( `ForeignID` int(10) unsigned NOT NULL default '0', `FieldID` int(10) unsigned NOT NULL default '0', `Value` char(200) default NULL, UNIQUE KEY

Re: simple but frustrating query

2004-10-14 Thread Jeff Mathis
well, obviously some, if not all, of what you are saying is true. your table example below though is not the same as mine. My table stores time series data. for every symbol, there are a series of rows all with different dates. there is a unique constraint on the combination of symbol and

MySQL 4.1.5 upgrade going badly--mysqld won't start

2004-10-14 Thread Christopher J. Mackie
I'm on a Win32 server, but I'm hoping from the error log contents that the question isn't Windows-specific. I'm having a Very Bad Day trying to upgrade a MySQL server from 4.0.18 to 4.1.5. After several problems resolved, I'm almost there--got the new engine to recognize the old dbs, etc.

RE: MySQL 4.1.5 upgrade going badly--mysqld won't start

2004-10-14 Thread Logan, David (SST - Adelaide)
Hi Chris, The appropriate sections of the my.cnf (or my.ini on windows) file to edit are # # Set the innodb engine parameters # innodb_data_home_dir = /u01/app/dmc/db/dmcpdb innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /u01/app/dmc/db/dmcpdb innodb_log_arch_dir =

RE: MySQL 4.1.5 upgrade going badly--mysqld won't start

2004-10-14 Thread Christopher J. Mackie
David; Thanks, it did work. I thought it might--just wanted to be sure that deleting the logfile or editing the .cnf file wouldn't make things worse somehow. And thanks too for the gentle direction to the manual; I have been digging around for the last several hours, but mostly under the

Unable to Start MySQL on FreeBSD4.10 box

2004-10-14 Thread Lynette Tillner
Hi! I'm setting up a development box with FreeBSD 4.10 and installed MySQL 4.0.12 on it. Everything in the install appeared to work smoothly. However, when I go to start MySQL I get an error that says: database list could not be retrieved So, how do I fix this? I've been unable to find

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Steve Grosz
I have tried telnet web-server2:3306 Didn't work Dwalu Z. Khasu wrote: On Thu, 14 Oct 2004, Steve Grosz wrote: =If that's the case, its not working, I type a telnet 192.168.x.x:3306 =and get a could not open a connection to the host even though =Mysql-nt shows as running on the Win2003 server.

RE: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Logan, David (SST - Adelaide)
Hi Steve, You haven't got a firewall running have you? Is the MS Internet Connection firewall switched on? Sounds like some sort of firewall issue though. Generally you won't get a response from the server if it is protected. Just a thought, I'm more of a unix bod but have seen this on my own

SP with PHP

2004-10-14 Thread -------- -------
HyaFirst of all, sorry for my EnglishI have the latest version of PHP, MySQL and Apache. I tried to look for how to call a stored procedure from a PHP script.?php mysql_connect(HOST,USER,PASS); mysql_select_db(DB); $result = mysql_query( ? );...Is it works like this? Just call the SP

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Bernard Clement
Did you tried without the : between web-server2 and 3306? i.e. put a space insted of : B On Thursday 14 October 2004 19:58, Steve Grosz wrote: I have tried telnet web-server2:3306 Didn't work Dwalu Z. Khasu wrote: On Thu, 14 Oct 2004, Steve Grosz wrote: =If that's the case, its not

Tables and performance

2004-10-14 Thread Yves Arsenault
Hello, I have 2 questions. Is there a maximum number of tables that can be created in a database? Does a very large number of tables in a database affect MySQL's performance? Thanks, -- Yves Arsenault -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Dwalu Z. Khasu
On Thu, 14 Oct 2004, Steve Grosz wrote: =I have tried telnet web-server2:3306 = =Didn't work = Neither the DOS nor Unix man pages for telnet mention a colon--Why do you think you need one? Let me try again, how about 'telnet web-server 3306'? ... ... =Dwalu Z. Khasu wrote: [snip] = = = Try

Modify type

2004-10-14 Thread Jerry Swanson
I have field date type of datetime. I need to modify to timestamp. If I alter the table and mofiy the field will this crash the data in the field. TH -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Adding DSN into Coldfusion Admin?

2004-10-14 Thread Dwalu Z. Khasu
On Thu, 14 Oct 2004, Dwalu Z. Khasu wrote: =Neither the DOS nor Unix man pages for telnet mention a colon--Why do you =think you need one? Let me try again, how about 'telnet web-server 3306'? = Sorry for the typo. For your example, that should've been: telnet web-server2 3306 Are you sure

is 'start' a keyword?

2004-10-14 Thread Brian Reichert
I tried to create a table with a column named 'start'. This word does not appear here: http://dev.mysql.com/doc/mysql/en/Reserved_words.html But, my effort to create such a column yeilded a syntax error, and I did subsequently learn of a 'start' directive, such as in: START TRANSACTION,

  1   2   >