Re: How to use Like Clause in Perl? Works fine in MySQL control center!

2005-07-22 Thread Frank Bax
At 07:03 PM 7/22/05, Siegfried Heintze wrote: I'm having trouble getting the like clause to work. It seems to work fine in the MySQL Control Center 9.4.beta. I'm using MySQL 4.0.23-debug. use DBH; my $sth = DBH->prepare("SELECT 'David!' LIKE '%D%v%'"); $sth->execute(); my $row; print join(@$row

Re: Which Engine to use...

2005-07-21 Thread Frank Bax
At 09:39 AM 7/21/05, Scott Hamm wrote: M$ SQL executed and brought up result in 2 seconds where MySQL took 801 seconds and where Batch datalength is around 18.5 MB, QAErrors is around 464KB and QA is around 3.5MB Did you create an index? -- MySQL General Mailing List For list archives: http

Re: offer a solution ?

2005-07-02 Thread Frank Bax
Actually, there should actually be two tables. One for columns that are static information about the monitor; the other with information that changes. should be in a separate table. OnlAt 12:30 PM 7/2/05, Jim McAtee wrote: No, you don't want a table for each monitor. One table for the data

Re: offer a solution ?

2005-07-02 Thread Frank Bax
At 01:49 PM 7/2/05, nephish wrote: i am writing a database to track what a bunch of electric monitors are doing. the status of the monitor changes almost daily. i need access to each monitor, when it changed, and i also need to track its history. Easy enough. but if i update a row in a table,

Re: Need help

2005-06-18 Thread Frank Bax
At 09:01 AM 6/18/05, madderla sreedhar wrote: > Isn't MySql supports large amounts of data to be stored in > databases. What is the maximum number of records that > can be handled or stored in Mysql. Is there any limit. If i > want to store large amounts of data then is it necessary > to migrate

Re: Need help with a query..

2005-06-16 Thread Frank Bax
At 03:09 AM 6/16/05, Cory Robin wrote: I need to speed up a search, big time. I have an application that searches for records on a date field. If it doesn't find an exact date match, it keeps searching adjacent days until it finds a certain amount of records. The problem now is, I'm using my

Re: How to load a remote db with lots of data?

2005-06-13 Thread Frank Bax
At 10:36 AM 6/13/05, Brian Dunning wrote: On Jun 13, 2005, at 7:18 AM, Berman, Mikhail wrote: How about an FTP service on your remote server? No - I actually don't have any remote access directly to the MySQL server. My ISP has separate machines for the database servers and the web servers -

Re: How to load a remote db with lots of data?

2005-06-13 Thread Frank Bax
At 10:00 AM 6/13/05, Brian Dunning wrote: I have to load my remote MySQL db's with about a gig of data - phpMyAdmin only allows me to upload a 15MB CSV file, so I have to painstakingly separate my data into 15MB chunks and upload them one at a time. It's a huge pain and takes about two entire da

Re: LOAD DATA INFILE - still confused

2005-06-08 Thread Frank Bax
e.txt' (Errcode: 2) Also, using a php pre-defined variable such as $_SERVER['DOCUMENT_ROOT'] creates the same error. Oh, yes I do know about file permissions in the entire path. If I only knew how to find the path, life would be much easier. "Frank Bax" <[EMAIL PROTECTED

Re: LOAD DATA INFILE - still confused

2005-06-07 Thread Frank Bax
At 03:59 PM 6/7/05, Chris wrote: I have a simple php script which runs the following query: LOAD DATA INFILE 'datafile.txt' INTO TABLE LocationTEMPSR12 FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' which generates the error: File './mydabasename/datafile.txt' not found (E

Re: problem loading dates from txt file

2005-05-31 Thread Frank Bax
At 05:23 AM 5/31/05, James M. Gonzalez wrote: Im loading rows from a txt tab separated fields file into a MySQL table. It mostly works, but the date format in one field is not the type that MySQL likes. So right now Im loading it as a char field. Yes, it is ugly and a pain to work with. I would l

Re: Using MySQL to store/archive code/html etc?

2005-05-27 Thread Frank Bax
At 02:46 PM 5/27/05, zzapper wrote: Today I designed a fairly cute error404.php page, which I'd like to reuse in future. Currently I rely on remembering that I created such a page for say ACME Carpets. Now and again my memory fails to remember which site I developed a piece of HTML,PHP,Perl,J

Re: Efficiently finding a random record

2005-05-13 Thread Frank Bax
At 12:54 PM 5/13/05, Brian Dunning wrote: I have a db of about 300,000 records and when I try to find one random record like this: select * from table order by rand() limit 1; it can take several minutes. My Sherlock Holmes instincts tell me that what I'm doing is somehow inefficient. What is the p

Re: Solution to slow queries

2005-05-10 Thread Frank Bax
At 02:22 PM 5/10/05, Paul Halliday wrote: Now, as time progresses the queires are getting slower and slower. I know this is expected, I don't think so. I thought that if the number of rows returned does not change and an index is properly used, then query time should not change significantly as

Re: Hardware requirements

2005-05-06 Thread Frank Bax
At 10:17 AM 5/6/05, Berta Alcala Larramendi wrote: I'm doing an University project and I need to "buy" a server for a business. I have to simulate an enterprise that sells by Internet. There are many clients and products in the Data Base and we use MySQL in a Linux OS. I need to find as much info

Re: why NOT NULL in PRIMARY key??

2005-04-27 Thread Frank Bax
At 11:07 AM 4/27/05, Jigal van Hemert wrote: So, if we would define that the key entry "0-NULL-Whatever" equals "0-NULL-Whatever" (which MySQL is capable of if you look at the definition of UNIQUE indexes with BDB tables) then allowing NULLs as part of a key entry would not permit duplicate entries

RE: why NOT NULL in PRIMARY key??

2005-04-26 Thread Frank Bax
At 08:49 AM 4/26/05, Jay Blanchard wrote: [snip] http://dev.mysql.com/doc/mysql/en/silent-column-changes.html mentions that "Columns that are part of a PRIMARY KEY are made NOT NULL even if not declared that way. " And http://dev.mysql.com/doc/mysql/en/create-table.html tells me that "A PRIMARY KEY

Re: question about chunking sql uploads

2005-04-25 Thread Frank Bax
At 02:07 PM 4/25/05, Scott Gifford wrote: [EMAIL PROTECTED] writes: > Frank Bax <[EMAIL PROTECTED]> wrote on 04/25/2005 11:47:12 AM: >> Or simply use "split", default is 1000 lines, but can be changed via >> command line. That's a start, but the files each

Re: question about chunking sql uploads

2005-04-25 Thread Frank Bax
At 10:44 AM 4/25/05, Art.M (Wikki) wrote: I have a large .sql file to upload which is about 9 mb and I was wondering if anyone knew of a program that could break it up into chunks of 2 mb or under? So I can upload it to a shared web server. You can't upload a 9M file to webserver? But you can upl

RE: Write to a mysql table from Excel

2005-04-22 Thread Frank Bax
At 03:12 PM 4/22/05, Jay Blanchard wrote: [snip] Thank you for your reply. Can you provide more details on how to write to a MySQL table from Excel? I am a newbie to MySQL. Thanks. [/snip] You must be new to mailing lists too... http://catb.org/~esr/faqs/smart-questions.html You can save the excel

Re: Newbie trying the impossible?

2005-04-21 Thread Frank Bax
At 03:20 PM 4/21/05, Scott Hamm wrote: However when I used left join (trying to learn it) I issued this command: SELECT QA.OperatorID, QA.QAID, QA.BrandID, QA.Batch, QA.KeyDate, Batch.[Order], Batch.Errors, Batch.Comments FROM

Re: SQL to list table names

2005-04-21 Thread Frank Bax
At 11:22 AM 4/21/05, Darryl Hoar wrote: I am running Mysql 3.23. Is there an sql statment that will allow me programmatically to retrieve the names of the tables in a database ? show tables; Yes, this is an SQL statement! -- MySQL General Mailing List For list archives: http://lists.mysql.com/m

Re: Computer reboots during long table join

2005-04-15 Thread Frank Bax
At 11:21 AM 4/15/05, Ian Gibbons wrote: On 15 Apr 2005 at 9:47, mos wrote: > I'm running MySQL 4.1.10 on XP and I was doing a 2 table equi join join on > a date field that was indexed. There are It was taking quite a long time so > I let it run overnight. There are 200 million rows in the first t

Re: which one is faster

2005-04-15 Thread Frank Bax
At 09:22 AM 4/15/05, DebugasRu wrote: taken from the manual 3.6.2 The Row Holding the Maximum of a Certain Column which of the two queries will in general be faster: 1) SELECT article, dealer, price FROM shop WHERE price=(SELECT MAX(price) FROM shop); 2) SELECT article, dealer, price FROM shop

Re: Cannot execute query - Can't find file: (error: 9)

2005-04-07 Thread Frank Bax
http://dev.mysql.com/doc/mysql/en/table-maintenance.html Cheers, --V Frank Bax wrote: At 10:07 AM 4/5/05, Frank Bax wrote: At 04:27 PM 4/4/05, Frank Bax wrote: Cannot execute query. Can't find file: './donor/list_lst.frm' (errno: 9) - - I got the same error last week on a dif

Re: Cannot execute query - Can't find file: (error: 9)

2005-04-06 Thread Frank Bax
At 10:07 AM 4/5/05, Frank Bax wrote: At 04:27 PM 4/4/05, Frank Bax wrote: Cannot execute query. Can't find file: './donor/list_lst.frm' (errno: 9) - - I got the same error last week on a different table. Today I notice that there is a table in another database

Re: Cannot execute query - Can't find file: (error: 9)

2005-04-05 Thread Frank Bax
At 04:27 PM 4/4/05, Frank Bax wrote: Cannot execute query. Can't find file: './donor/list_lst.frm' (errno: 9) - - I got the same error last week on a different table. Today I notice that there is a table in another database on same system producing the same error.

Cannot execute query - Can't find file: (error: 9)

2005-04-04 Thread Frank Bax
Cannot execute query. Can't find file: './donor/list_lst.frm' (errno: 9) - - I got the same error last week on a different table. Today I notice that there is a table in another database on same system producing the same error. I attempted to access mysql cli, but it just locked up

RE: create sequence

2005-01-13 Thread Frank Bax
You obviously do not understand auto-increment capability. You wouldn't "get that value" of the sequence, because you would always retrieve the same value. You would have to add a row to the 'extra' table for the auto-increment field to work as designed, then use the highest value of auto-inc

RE: Why DATETIME takes 8 bytes?

2005-01-08 Thread Frank Bax
At 12:15 PM 1/8/05, Tom Crimmins wrote: [snip] datetime is "displayed" as -MM-DD HH:MM:SS - it is *not* stored that way. It is stored as a *nix timestamp - an integer number of seconds since 1970-01-01 00:00:00. [/snip] Actually datetime is not stored as epoch time. It has a range from 1000-01

Re: Why DATETIME takes 8 bytes?

2005-01-08 Thread Frank Bax
At 06:00 AM 1/8/05, Ehud Shapira wrote: I don't understand why DATETIME takes 8 bytes. It's just a waste, since DATE+TIME take 6 bytes. And in fact, while DATE and TIME are each rounded up to bytes on its own, a combined DATETIME should only take 5 bytes: 14 bits for year 04 bits for month 05

select datetime older than X weeks

2005-01-06 Thread Frank Bax
I'm using OpenBSD 3.6 (latest version) which comes with binary packages for MySQL 4.0.20 - More recent binary packages are not yet available for this platform and installation from source is not an option. I have a table with datetime field and I would like to select all data older than "X" wee

Re: Populating a from a database

2004-06-26 Thread Frank Bax
Might I suggest separating the mysql calls and html code into separate functions by storing selections in an array first. Then you can more easily manipulate the array for 'none' between the two function calls. The function generating html code could then be called with data not originating f

Re: Using SQL query to populate a html form select field

2004-06-26 Thread Frank Bax
At 07:52 PM 6/25/04, Kyle Texan wrote: I want to take 1 field in a mysql table and use that information to populate an html form select field instead of writing the html code, that way when data changes in that mysql field the form will always be in sync with the table? You need to use a programmi

Re: JOIN or UNION or both?

2004-06-24 Thread Frank Bax
At 10:56 AM 6/24/04, Matthias Kritz wrote: I have the following table structure: tbl_speakers sid fname lname tbl_presentations pid name desc tbl_speakers_presentations sid pid I would like to display all presentations, (but each only

Re: Fetching 12 columns or 1 TEXT field?

2004-06-23 Thread Frank Bax
At 03:29 PM 6/23/04, Eamon Daly wrote: Which do you folks think is faster: randomly accessing a table with a primary key and a dozen CHAR columns or a table with a primary key and a single merged TEXT column? The data in the 11 extra columns will always be fetched as a single request. Both the same

Re: Concatenating tables

2004-06-15 Thread Frank Bax
At 03:14 PM 6/15/04, Tim Johnson wrote: We are importing data from 3 CSV files. Documentation regarding the originating database is for the most part, not available to us. Translating directly from CSV to .sql files, we can see that the three files are really the first, second and third parts of on

Re: root password problem

2004-06-08 Thread Frank Bax
At 08:25 PM 6/8/04, Frank Bax wrote: According to the docs, one of the first things I'm supposed to do is give root a password: shell> mysql -u root mysql mysql> SET PASSWORD FOR [EMAIL PROTECTED]('new_password'); I did that and now I get: # mysql --user=root --password=ne

root password problem

2004-06-08 Thread Frank Bax
According to the docs, one of the first things I'm supposed to do is give root a password: shell> mysql -u root mysql mysql> SET PASSWORD FOR [EMAIL PROTECTED]('new_password'); I did that and now I get: # mysql --user=root --password=new_password ERROR 1045: Access denied for user: '[EMAIL PROTEC