Re: Moving Database from PC to Apple

2006-10-07 Thread Douglas Sims
the MySQL Administrator program, choose Backup. Good luck. I use a MacBook Pro for MySQL work also (mostly developing things that will run on a linux server) and I have been very pleased with it. Douglas Sims [EMAIL PROTECTED] On Oct 7, 2006, at 5:01 PM, David Blomstrom wrote: Thanks

Re: making varchar field to act like numeric field

2006-09-28 Thread Douglas Sims
sec) Douglas Sims [EMAIL PROTECTED] On Sep 27, 2006, at 10:24 PM, [EMAIL PROTECTED] wrote: I am looking for any suggestions to this problem. I have a table with a varchar field. This field can hold textual or numeric data, but it is stored in a varchar field so the database sees it all

Re: Need to find last price and date product was sold

2006-09-28 Thread Douglas Sims
.product_code AND (t1.date_sold t2.date_sold OR (t1.date_sold=t2.date_sold AND t1.idt2.id) WHERE t2.product_code IS NULL ORDER BY t1.product_code; Douglas Sims [EMAIL PROTECTED] On Sep 28, 2006, at 10:12 AM, Peter Brawley wrote: Mike, What I need to do is find the last price_sold

Re: Count of children

2006-09-27 Thread Douglas Sims
variable to a nonzero value. See Section 5.2.3, “System Variables”, for more information. There is also a very thorough article discussing stored procedures in MySQL which gives an example of tree traversal here: http://dev.mysql.com/tech-resources/articles/mysql-storedprocedures.html Douglas

Re: where url = 'x' with url a TEXT field

2006-09-27 Thread Douglas Sims
I think you have to specify a key length when you use an index on a text field... mysql alter table t2 add index i2(t1(3)); That would create an index (called i2) on the first 3 characters of field t1 of table t2. I think that's right? Douglas Sims [EMAIL PROTECTED] On Sep 27, 2006

Re: Need to find last price and date product was sold

2006-09-27 Thread Douglas Sims
| 2005-07-31 | 1191.00 | | 40 | 2006-05-29 | 65.00 | +-++---+ 53 rows in set (0.52 sec) Douglas Sims [EMAIL PROTECTED] On Sep 27, 2006, at 11:36 PM, mos wrote: This should be easy but I can't find a way of doing it in 1 step. I have a Trans table

Re: SUM in WHERE

2006-09-24 Thread Douglas Sims
this, of course, is as a subselect of another query but you could also do it in the perl/python/php/whatever layer which is sending this query to the database. Can you send a transcript of what you tried, including the SHOW CREATE TABLE statement? Douglas Sims [EMAIL PROTECTED] On Sep

Re: SUM in WHERE

2006-09-24 Thread Douglas Sims
is exactly 100. That would be the row with id=7. Here is a query which will give you that: SELECT * FROM tbl_name WHERE total=100 ORDER BY id LIMIT 1,1 Douglas Sims [EMAIL PROTECTED] On Sep 24, 2006, at 3:27 PM, Ahmad Al-Twaijiry wrote: Hi I need the result to be 100 not to more or less than

Re: Count Fields of a Table

2006-09-22 Thread Douglas Sims
='t'; +-+ | column_name | +-+ | TransactionDate | | amount | +-+ 2 rows in set (0.08 sec) Douglas Sims [EMAIL PROTECTED] On Sep 22, 2006, at 9:54 AM, davidvaz wrote: Hello, Is there any way to find out, using only plain SQL

Re: Mysql pushing data to client

2006-09-21 Thread Douglas Sims
if you put the triggering code in the part of your application (like the PHP page, whatever) that changes the data you want to be notified about, instead of in the database itself. Douglas Sims [EMAIL PROTECTED] On Sep 21, 2006, at 3:14 PM, Dave at Mysql wrote: I am looking for a way

Re: How to delete all rows....

2006-09-20 Thread Douglas Sims
You might also look at TRUNCATE table... http://dev.mysql.com/doc/refman/5.0/en/truncate.html I believe that DELETE will not reclaim the storage space while TRUNCATE does, although I didn't see that in the documentation when I looked just now... ? Douglas Sims [EMAIL PROTECTED] On Sep

Re: SUM in WHERE

2006-09-20 Thread Douglas Sims
| +-+--+ | 178 | 198 | | 32.43 | 230.43305176 | | 3 | 233.43305176 | +-+--+ 3 rows in set (0.00 sec) Good luck! Douglas Sims [EMAIL PROTECTED] On Sep 19, 2006, at 4:02 PM, Quentin Bennett wrote: No, I don't think it is. I

Re: make mysqldump to sort columns alphabetically

2006-09-08 Thread Douglas Sims
| | | | address | varchar(32) | YES | | | | +-+-+--+-+-+---+ 3 rows in set (0.00 sec) Here is the mysql documentation on ALTER TABLE: http://dev.mysql.com/ doc/refman/5.0/en/alter-table.html Douglas Sims [EMAIL PROTECTED] On Sep 8

Re: problem with InnoDB

2006-09-07 Thread Douglas Sims
going to Starbucks for coffee just before bedtime. Douglas Sims [EMAIL PROTECTED] On Sep 7, 2006, at 12:18 AM, Dan Nelson wrote: In the last episode (Sep 07), [EMAIL PROTECTED] said: Hi Dan, Thanks for yur response. Does it makes sense to create an index on a primary key ..as that is my

Re: problem with InnoDB

2006-09-06 Thread Douglas Sims
statement handle and did a SELECT FOUND_ROWS() on the same connection, perhaps that would give what you want. Douglas Sims [EMAIL PROTECTED] On Sep 6, 2006, at 11:29 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Dan, Thanks for yur response. Does it makes sense to create

Re: Conditional Insert

2006-08-29 Thread Douglas Sims
| | Susan| 4 | | Tom | 2 | | Jim | 8 | | Elaine | 5 | +--++ 8 rows in set (0.00 sec) Good luck! Douglas Sims [EMAIL PROTECTED] On Aug 29, 2006, at 1:01 AM, Ravi Kumar. wrote: Hi Douglas, Thanks for your prompt reply. I read through

Re: Conditional Insert

2006-08-29 Thread Douglas Sims
Much better. Good job. Douglas Sims [EMAIL PROTECTED] On Aug 29, 2006, at 1:26 AM, Johan Höök wrote: Hi Ravi, you can take a look at: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html which might take care of your problem. /Johan Douglas Sims skrev: Hi Ravi You

Re: select between date

2006-08-29 Thread Douglas Sims
| +++ | Keanu Reeves | 1964-09-02 | | Fred MacMurray | 1908-08-30 | +++ 2 rows in set (0.00 sec) Good luck! Douglas Sims [EMAIL PROTECTED] On Aug 29, 2006, at 10:13 PM, Penduga Arus wrote: On 8/3/06, Penduga Arus [EMAIL PROTECTED] wrote

Re: Conditional Insert

2006-08-28 Thread Douglas Sims
/refman/5.0/en/replace.html Good luck! Douglas Sims [EMAIL PROTECTED] On Aug 29, 2006, at 12:08 AM, Ravi Kumar. wrote: Dear Members, I wish to insert and update conditionally into a table using a single SQL statement. That is if a record already exists in a table, the statement should

Re: First View

2006-08-25 Thread Douglas Sims
I was lucky enough to have gotten a copy of MySQL 10 (aka MySQL X) from the source tree before it was pulled. The query optimizer used predictive algorithms with temporal displacement logic, which meant that it could and did frequently return results in negative time, before the query

Re: Help with query

2006-08-21 Thread Douglas Sims
read more about MySQL regular expressions here: http:// mysql.com/doc/refman/5.0/en/regexp.html Also, are you using spellcheck with Outlook Express? Because if so, Microsoft keeps trying to rename MySQL to be Myself. I think they want to take over everything. :-) Good luck. Douglas Sims

Re: Using Header to post data to another site

2006-08-16 Thread Douglas Sims
describe I would use HTTPS and put both the un/pw and data in the body of the request, rather than trying to send one request to get a cookie and then use that cookie to send the actual data. Douglas Sims [EMAIL PROTECTED] *er, did I state that correctly? On Aug 16, 2006, at 4:27 PM, mos

Re: Query Question

2006-08-14 Thread Douglas Sims
* FROM t WHERE id(SELECT MIN(id) FROM t WHERE id@id) ORDER BY id ASC LIMIT 1; But as to putting that in one statement... it might be better just to do it as three. Douglas Sims [EMAIL PROTECTED] On Aug 14, 2006, at 9:32 AM, Michael DePhillips wrote: Hi Dan, Thanks for the prompt reply

Re: Query Question

2006-08-14 Thread Douglas Sims
D'oh. Very good. I wish I'd thought of that. In response to Michael DePhillips' point about the UDF - I believe that in MySQL 5.x UDFs can't query tables. In Oracle, SQL Server, etc. they can and I'm sure they will in the future. Douglas Sims [EMAIL PROTECTED] On Aug 14, 2006, at 10

Re: mysql naming convention

2006-08-11 Thread Douglas Sims
clear. Douglas Sims [EMAIL PROTECTED] On Aug 11, 2006, at 4:08 AM, Barry wrote: Hello everyone! I am looking for a standard naming convention for databases. For example: is it good to use tablenames in column names like: table = tb_id,tb_text,tb_name and such. Probably there is some

Re: mysqld-nt 100% CPU Utilization?

2006-07-20 Thread Douglas Sims
Can you do a show processlist from the MySQL client? This might help you to figure out if it is a specific query that's gumming up the works. Douglas Sims [EMAIL PROTECTED] On Jul 19, 2006, at 6:35 PM, Robinson, Eric wrote: Our MySQL-based medical application has been running fine

Re: what are those MySQL files for?

2006-07-01 Thread Douglas Sims
Those are the files which contain the data in each table in your MySQL databases. I think the .myd files contain the data, the .myi files contain indexes, and the .frm files contain schema information. Douglas Sims [EMAIL PROTECTED] On Jun 30, 2006, at 11:47 PM, Octavian Rasnita wrote

Re: How to find matching tables that have specific field name.

2006-06-07 Thread Douglas Sims
) | YES | | | | | CREATE_OPTIONS | varchar(255) | YES | | | | | TABLE_COMMENT | varchar(80) | NO | | | | +-+--+--+-+-+---+ 21 rows in set (0.07 sec) Good luck! Douglas Sims [EMAIL PROTECTED

Re: MySQL (GPL License)

2006-06-07 Thread Douglas Sims
even if you don't need the commercial license, if your company depends upon MySQL, buying a commercial license, paying for training, attending conferences, or buying lots of t-shirts is nice. Douglas Sims [EMAIL PROTECTED] On Jun 7, 2006, at 7:58 PM, Logan, David (SST - Adelaide) wrote

Re: Copying tables sans data from one database to another

2006-06-07 Thread Douglas Sims
can do it by using the mysqldump program to dump the table (just the structure or the structure and data) from the original database and then load it into the new one: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html Good luck! Douglas Sims [EMAIL PROTECTED] On Jun 7, 2006, at 8:09

Re: MySQL (GPL License)

2006-06-07 Thread Douglas Sims
SQL had - I quickly agreed and said that MS SQL had the best support we could ever ask for... it's called Google. Randy still paid for the lunch :-) Douglas Sims [EMAIL PROTECTED] On Jun 7, 2006, at 10:20 PM, mos wrote: At 08:15 PM 6/7/2006, you wrote: I believe that if you are only

Re: MySQL (GPL License)

2006-06-07 Thread Douglas Sims
written in Mandarin Chinese for all I care) for less money than we will spend on software on one upgrade cycle? Does anyone else have similar experiences? Douglas Sims [EMAIL PROTECTED] On Jun 7, 2006, at 11:15 PM, Douglas Sims wrote: Ouch. Thanks for the clarification. Two additional

Re: Automatically add +1 every 30mins

2006-06-02 Thread Douglas Sims
| +-+ 1 row in set (0.00 sec) Here is a reference to the MySQL documentation on date and time functions, which is really good: http://dev.mysql.com/doc/refman/5.0/ en/date-and-time-functions.html Good luck! Douglas Sims [EMAIL PROTECTED

Re: auto_increment Question

2006-06-01 Thread Douglas Sims
| || NULL | NULL| NULL| NULL | +--++---++--- +---++--+-+- ++ 3 rows in set (0.01 sec) Douglas Sims [EMAIL PROTECTED] On Jun 1, 2006

Effective-dating

2006-04-09 Thread Douglas Sims
and not immediately relevant to the system I'm working on. Douglas Sims [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: database compatibility

2006-03-22 Thread Douglas Sims
functinality, nothing complicated. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Douglas Sims [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: ~BCP for mysql~

2006-03-21 Thread Douglas Sims
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Douglas Sims [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: what is the sql command to export the whole database ?

2006-03-19 Thread Douglas Sims
around http://mail.yahoo.com Douglas Sims [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Using Wildcards in Query

2004-01-27 Thread Douglas Sims
It sounds as if you need to use a regular expression. For very simple string comparisons, use =, as in _wbs='Fish'_ For more complex string comparisions with simple wildcards, use LIKE as in _wbs LIKE %fish% _For most complex comparisions, use a regular expression, as in _wbs REGEXP .\d_ In

Re: can't install DBI on panther

2004-01-26 Thread Douglas Sims
I installed DBI and dbd:mysql on 10.3.2 a few months ago and had all sort of problems but I finally got it to work. I don't exactly remember what finally did it, though. I think it might have been running the install with sudo, as in: sudo perl -MCPAN ... etc. but I'm not sure. If you

Re: MYSQL Database

2004-01-20 Thread Douglas Sims
Hi You should check out: http://onlamp.com/ L.A.M.P. (Linux/Apache/MySQL/Perl(or PHP) are becoming the de facto standards for web-based applications, I think far eclipsing Java (JSP/Servlets) and Microsoft ASP/VB. Unlike Java (which is driven to a large degree by Sun's promotion) and ASP

Re: Question about IF statements...

2004-01-14 Thread Douglas Sims
Would something like this do what you want? SELECT project_id, SUM(time_worked) AS total FROM time_daily WHERE user_id='clh' AND period_id='27' GROUP BY project_id HAVING total0; Cory Hicks wrote: Hello, I must be having a goober moment.I am running the following sql query with no

Re: Question about IF statements...

2004-01-14 Thread Douglas Sims
FROM time_daily WHERE user_id='clh' AND period_id='27' GROUP BY project_id HAVING total0 - ; ++---+ | project_id | total | ++---+ | 1 | 3 | | 3 | 5 | ++---+ 2 rows in set (0.18 sec) Douglas Sims wrote: Would something

Re: Importing a dumpfile

2004-01-13 Thread Douglas Sims
Hi Mat mysqldump produces files containing SQL statements. mysqlimport allows you to load data from comma-delimited (or other) text files. For example, the following line will dump the contents of the table 'goat_painters' in the database 'the_goat_database' into a file called

Re: Optimization help

2004-01-12 Thread Douglas Sims
I think... you don't have an index on the Incident field itself, just on (Date, Incident, Type, Task) which means that it concatenates those fields and orders the result - thus this may be virtually useless if you're looking for a specific incident within a large date range. Since your query

Re: MySQL certification

2004-01-05 Thread Douglas Sims
Thanks, Stefan. Mike's article was interesting. The test was a bit harder than I anticipated. I should have paid more attention to column types and database name, among other things. But I did pass - at least, the preliminary report said pass, but also said that the exam will be reviewed

Re: Join sintax question

2004-01-04 Thread Douglas Sims
Hi Giulio I think you could do this by repeatedly left-joining the categories table as in this: SELECT AudioTrack.* FROM AudioTrack A LEFT JOIN AudioTracks_Categories C1 ON A.AudioTrack_id=C1.AudioTrack_id LEFT JOIN AudioTracks_Categories C2 ON A.AudioTrack_id=C2.AudioTrack_id LEFT JOIN

MySQL certification

2004-01-04 Thread Douglas Sims
I'm scheduled to take the MySQL certification exam tomorrow morning, thus currently intently cramming with the MySQL reference manual and writing out study notes etc. I'm not too worried as I've been using MySQL for years (although preping for this has been a good exercise and I've learned a

Re: BUG IN MYSQL

2004-01-03 Thread Douglas Sims
I also ran the test, using MySQL 4.0.16, for apple-darwin6.6 (powerpc) on a Mac iBook G4 w/Panther and got no errors from mysqlcheck. You might try using mysqlbug to compose the bug report: http://www.mysql.com/doc/en/Bug_reports.html Hassan Schroeder wrote: Richard S. Huntrods wrote: I've

Re: Change from loop to single query

2004-01-02 Thread Douglas Sims
You probably want the IN comparison operator (http://www.mysql.com/doc/en/Comparison_Operators.html) For example: UPDATE users SET status=no WHERE name IN ('Joe', 'Wally', 'Bob', 'Cynthia'); Of course, you can create this statement from the list of names by joining all of the names with