Runing MySQL on boot

2005-11-18 Thread Andrew Kuebler
I'm running FreeBSD and MySQL version 4.1. How do I get FreeBSD to load MySQL on boot? I don't see a script file that came with the installation. Thank you. Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PRO

How do I know if I am within a transaction?

2005-09-23 Thread Andrew Kuebler
If I BEGIN a transaction and a piece of PHP code containing another transaction is run, the second BEGIN commits the first transaction for me. How can I tell if I am in an existing transaction so that I do not issue the second BEGIN? Thanks.. Andrew -- MySQL General Mailing List For list archi

Re: Unique index on two fields

2004-11-18 Thread Andrew Kuebler
ALTER TABLE tablename ADD UNIQUE (Column1, Column2); Best Regards, Andrew > Can someone explain how I can make a combination of two fields be a > unique index. > > For example, in my table I have an OrderID field and a LineItems field. > Individually the fields are not unique but when combined t

RE: SELECT SUM + 2 JOINS

2004-10-13 Thread Andrew Kuebler
rderID in 1 Query... I'm using MySQL 4.1.4 Best Regards, Andrew Kuebler AK Communications, Inc. Phone: (866) 925-2666 x123 / Fax: 866-925-3296 (Toll-free) <http://www.akcomm.com> http://www.akcomm.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: W

SELECT SUM + 2 JOINS

2004-10-13 Thread Andrew Kuebler
I have a MySQL table with Order#'s (Primary Key). I want to total the number of items per order which I do through an inner join to the order contents, but then I want to also get a total on the amounts a customer has been billed to make sure there isn't a customer that has been shipped somethi

Backing Up Innodb table with individual tablespaces

2004-08-04 Thread Andrew Kuebler
If I use "innodb_file_per_table", how do I properly back-up that table so it could be imported to another server should something happen to my main server if I do not have the hot-back-up utility? If I lock & then copy the table, can I simply use "ALTER TABLE tbl_name IMPORT TABLESPACE" for it

Mailing Address Deduplication

2004-07-21 Thread Andrew Kuebler
I know this is not necessarily a MySQL question, but everyone on this listserv is always so helpful and I was wondering if anyone had any pointers on how to deduplicate a list of mailing address since there can be so many inconsistencies on how an address can be written (road vs rd vs rd., etc). I

RE: Odd Rounding?

2004-01-23 Thread Andrew Kuebler
Actually, no, it rounds to .01233. > -Original Message- > From: Andrew Kuebler [mailto:[EMAIL PROTECTED] > Can anyone explain why: > > SELECT ROUND(.012345, 5) > -> .01234 > > Why doesn't mysql round the 5 up to .01235? How do I get it > to round u

Odd Rounding?

2004-01-23 Thread Andrew Kuebler
Can anyone explain why: SELECT ROUND(.012345, 5) -> .01234 Why doesn't mysql round the 5 up to .01235? How do I get it to round up? I've tried manipulating ceil, floor, round and truncate and I can't seam to find an easy way to do this. I read in the manual that this behavior depends on the C li

Writing a NULL in a CHAR field

2003-09-11 Thread Andrew Kuebler
Are BLOB column types the only columns that will let you write a NULL (Hexidecimal 0) and still write beyond that? CHAR, CHAR BINARY, VARCHAR, and VARCHAR BINARY all seem to truncate the string and stop at the first null even if I escape the string being updated. I don't want to use a BLOB column

INDEXes on BLOB Columns

2003-09-10 Thread Andrew Kuebler
If I: ADD COLUMN Text (BLOB) And then INDEX (Text(10)) Will that index be beneficial if I am search for 10 characters only or anything 10 characters or less? Thanks in advance! Best Regards, Andrew Sql, query -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To u

Storing Unprintable Characters

2003-09-09 Thread Andrew Kuebler
I need to store strings encrypted with TripleDES that sometimes contain unprintable characters (Hexidecimal values under 20). The values do not seem to properly store in CHAR columns and I don't see any other column types that might work. Anyone have any other suggestions? Thank you in advance!

Foreign Keys

2003-07-15 Thread Andrew Kuebler
When I type: Show keys from [tablename]; I do not see foreign keys listed there and I cannot seem to find any command that will list foreign keys. Can anyone help? Also, I notice Innodb tables only store one file unlike MyISAM which stores 3. Are Innodb tables any slower than MyISAM since they s

AUTO_INCREMENT Columns reacting differently to MyODBC

2003-03-19 Thread Andrew Kuebler
In one of my tables, I have an AUTO_INCREMENT column that changes to "#Deleted" in each column in Access when I add a new record. To read the data, I just entered, I must close the table and then reopen it. In another table when I do the same thing, I see the new AUTO_INCREMENT number come up in th

Maintaining a UNIQUE INDEX in a MERGED Table

2003-01-01 Thread Andrew Kuebler
If I am reading the documentation correctly, MySQL will not maintain a UNIQUE INDEX across the tables that make-up a merged table. Does anyone have any tips for maintaining a UNIQUE INDEX across tables that make up a merged table? Is there an easier way than running a SELECT statement on all of th

MySQL 4.0.6 is not working with MyODBC 3.51.05

2002-12-23 Thread Andrew Kuebler
I've upgraded to 4.0.6 and now MyODBC does not function properly when it used to work fine with 4.0.1. When I try to open a linked table in Access I get the error: ODBC--Call Failed [MySQL][ODBC 3.51 Driver][mysqld-4.0.6*gamma-nt]Access denied for user: '@(My IP)' to database '(Database name here)

Indexes That Span Columns...

2002-12-20 Thread Andrew Kuebler
I have the following table; I renamed the columns a & b for easy reading: ID INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY, aID INT(9), bID MEDIUMINT(7), UNIQUE ab (aID, bID) INDEX b(bID) As far as I understand the UNIQUE INDEX also provides the index for aID, but not bID. Is there any other way to

INSERT... SELECT Statement fails when...

2002-12-19 Thread Andrew Kuebler
When I run an INSERT. SELECT query and I am inserting the records into a new table that has a UNIQUE key, the statement will fail as soon as it hits a "Duplicate entry" error. No further entries will be inserted. The only way I know to get around this is to pull the entire column(s) into memory and

Storage Requirements Not Equal to Actual Disk Space Used...

2002-12-19 Thread Andrew Kuebler
I have a table with 17,168,035 records. I have the following column types and I read about the following storage requirements for each column: (1) INT Column - Should take up 4 bytes each (1) MEDIUMINT Column- Should take up 3 bytes each (1) DATE Column - Should take up 3 byte

Upgrading from 4.0.1 Alpha to 4.0.5

2002-12-18 Thread Andrew Kuebler
Currently I'm using 4.0.1 Alpha and I'm thinking of upgrading to 4.0.5 as I want to be able to issue UPDATE queries that span multiple tables. Is there anything in particular I should know of or be aware of before installing 4.0.5? What is the proper procedure for upgrading? Should I first uninstal

UPDATE 1 Column from merging 2 or more others

2002-12-11 Thread Andrew Kuebler
If Column1 has a value of "John" And Column2 has a value of "Doe" How would I write an UPDATE query to SET Column3 to "John Doe" without selecting the information and reposting it to the data through an UPDATE for each and every record? I've tried: UPDATE $table SET Column3 = Column1 + " " + Col

A SUM with more decimal places than the values being SUMed?

2002-11-25 Thread Andrew Kuebler
I'm running a query to SUM a Decimal field with the configuration of DECIMAL(6,2) and I get a result looking like: 56.5515009 How is this possible??? Thank you in advance... Andrew - Before posting, please check: ht

How many columns does MySQL Support?

2002-10-15 Thread Andrew Kuebler
am, but I can see that being a 'bit of a hassle.. Any help or input is appreciated. Thanks! Best Regards, Andrew Kuebler AK Communications, Inc. Phone: (866) 925-2666 x123 / Fax: 866-925-3296 (Toll-free) http://www.akcomm.com ---

Reporting Help

2002-06-23 Thread Andrew Kuebler
I'm trying to extract information from MySQL with Microsoft Access but it will not pull a query with BIGINT columns correctly. I'm using the newest ODBC driver, version 3.51.03 and MySQL Server Alpha 4.0.1. I've installed the ODBC driver, configured the DSN, and can access all other types of colum

How about a SELECT With READ & WRITE Lock?

2002-05-21 Thread Andrew Kuebler
I understand that a query like SELECT... FOR UPDATE will lock other threads from being able to modify those records in any way, however, other threads can still read them. I would like to be able to SELECT say 10 records and place a READ and WRITE lock on those rows so that the next SELECT thread

Loading new setting without restarting the server

2002-05-10 Thread Andrew Kuebler
I've made a few config changes (examples below) in the my.ini except the server constantly utilizes 66 meg of memory total (Including OS) and I never see mysql memory usage go any higher than 12-13 meg of memory usage no matter how much strain I put on the machine. I do not believe these new setti

Pretty Simple MAX Value question...

2002-05-09 Thread Andrew Kuebler
I want to select say 100 of 1,000 records and get the highest value for "id" in that query, however the MAX command always gives me the MAX for the whole table, not just my query. Here's my expression: SELECT MAX(id) FROM table WHERE DATE = '20020509' LIMIT 100 No matter what, I will always get

How to strip off email domain for sorting by domain?

2002-05-02 Thread Andrew Kuebler
I use Perl/DBI with MySQL and I'm trying to find a way to sort email addresses by domain. I would assume there is probably an option in MySQL to strip off the text after the '@' sign that will allow me to sort on. In Perl: @fields = split(/@/, $email); My domain would be displayed as: $fields[1]

Number Of Records in a Table

2002-04-30 Thread Andrew Kuebler
Everyone on this list has been very helpful so far. I greatly appreciate all the help! I use Perl/DBI with MySQL. Normally to count records, I pull a query like: $a = $db->prepare("SELECT * FROM table"); $a->execute; Then: $numrows = $a->rows; to get a total count of records in the table. Is

Not secting empty strings

2002-04-29 Thread Andrew Kuebler
I want to query records that do not contain empty strings and null values through a SELECT statement. IS NOT NULL works for the nulls, but how I select non-empty strings ("")? I tried everything I can think of and even some non-published statements like name IS NOT '' . I just can't figure i

Not secting empty strings

2002-04-29 Thread Andrew Kuebler
I want to query records that do not contain empty strings and null values through a SELECT statement. IS NOT NULL works for the nulls, but how I select non-empty strings ("")? I tried everything I can think of and even some non-published statements like name IS NOT '' . I just can't figure i

I thought MySQL Supported Relationships

2002-04-23 Thread Andrew Kuebler
Hello Everyone. I'm still fairly a newbie to MySQL, but I could have sworn I read somewhere that MySQL supported relationships just like Access. I've searched the entire manual, and cannot find anything on the subject. Does MySQL support relationships, and if so does anyone know where I can find

Selecting Information Just Inserted

2002-04-19 Thread Andrew Kuebler
Maybe someone can help me here.. I'm inserting data with an AUTO_INCREMENT column and immediately after I need to use that new number for a corresponding record in another table. How am I able to extract that new number quickly? I could run a SELECT query after the INSERT using the MAX command, b

Size of databases

2002-03-02 Thread Andrew Kuebler
I know Databases are supposed to be larger than the data normally would be in straight txt form, but 370% larger? I'm a newbie to MySQL. I made a new database/table with 2 columns and I was importing a 24.1 meg TXT into column 2. It's nothing in particular...just radom txt and words because I wan