Re: Script for Database[MySQL]::Web interfacing

2003-08-28 Thread Cybot
Joseph Maxwell wrote: Hello, Could someone recommend a decent php script that could be used for database[MySQL]::Web interfacing and management. Preferably open source, freeware or otherwise [I'll just have to grin & bare it] phpMyAdmin -> www.phpmyadmin.net -- Sebastian Mendel www.sebastianmend

Re: Dr. Watson error

2003-08-26 Thread Cybot
We've been running mysql for the last 20 months without any problems at all. However, it just stopped with a Dr. Watson error on last Friday's evening when there was not a single connection or scheduled process running. The mysql server version we have is 3.23.35a. The Stack Trace showed the fol

Re: "union" question

2003-08-26 Thread Cybot
Marek Lewczyk wrote: Hello, Currently I'm testing my app using MySQL 4.1.0 version, and I have a strange error during execution a union query. (SELECT IF(_DAT.pri <=> null, null, ROUND(_DAT.pri/1.22)) AS pri_net, IF(_DAT.pri <=> null, null, ROUND(_DAT.price*1)) AS pri_gross, _DAT.cuid, _CUR.code FR

Re: Slow results with simple, well-indexed query

2003-08-21 Thread Cybot
Jesse Sheidlower wrote: I'm struggling with speed issues on some queries that I would have expected to be relatively fast. Perhaps even more frustratingly, when I've tried to break these down into their components, they still execute very slowly. I've looked over all the relevant suggestions for

Re: Adding up DATETIME field

2003-08-21 Thread Cybot
M. Bader wrote: Hi, i'm struggling with updating session expire times in my login table. Can you tell me, how to correctly add an amount of seconds (after that the session expires) to a datetime field? when i do the insert for a new login, or an update, the expire field will alway end up contain

Re: Transferring database from one PC to other

2003-08-14 Thread Cybot
asif mahmood wrote: hi, this is my first question on list, well i m using MySQL 4.1 and i m new user of MySQL.i want to tranfer my database from one computer to other. i want to shift the whole database to other system. so if any one can help me regarding this. if there is any script or program th

Re: Limiting left joins

2003-08-14 Thread Cybot
I have two tables, A and B, where the entries in B are connected to A through a left join. Thus there may be several entries in B for each post in A. Now I would like to select the two latest posts in A and all the corresponding posts in B. I tried something like SELECT fields FROM A LEFT JOIN B O

Re: Can't set thread stack with ver 4.0.14

2003-08-14 Thread Cybot
I try to set thread stack with ver 4.0.14 it never success the stack size still 128K (I can do with the same command with ver. 4.0.12 it work) The command is put in my.cnf like this set-variable = thread_stack = 512K how to set with ver 4.0.14 thanks Kittiphum Worachat http://www.mysql.com/d

Re: selecting multiple count statement (newbie)

2003-08-14 Thread Cybot
Ryan A wrote: Hi, This is my first post here so forgive me if its too simple or not right. basically what i do is: SELECT COUNT(*) FROM table1 where cno=3; (and dumping it into a variable $theResult - I am using PHP) and it gives me the result, but now i need to do this in 5 tables... I can of cou

Re: Multiple field updates

2003-08-14 Thread Cybot
Nils Valentin wrote: Hi Rudi, I would go for the UPDATE ...SET... syntax. http://www.mysql.com/doc/en/UPDATE.html Something like UPDATE tblname SET id=id+addedvalue WHERE id BETWEEN 3999 AND 8001; UPDATE tblname SET id=id+addedvalue WHERE id BETWEEN 4000 AND 8000; If expr is greater than or

Re: Can't set thread stack with ver 4.0.14

2003-08-14 Thread Cybot
Kittiphum Worachat wrote: Hi. I try to set thread stack with ver 4.0.14 it never success the stack size still 128K (I can do with the same command with ver. 4.0.12 it work) The command is put in my.cnf like this set-variable = thread_stack = 512K how to set with ver 4.0.14 thanks Kittiphum W

Re: Functions as default values

2003-08-14 Thread Cybot
I am trying to use a function as a default value for a column but do not seem to get the desired result. I want to use the NOW() function for a last_updated column, here is my code... CREATE TABLE test_table ( last_updated datetime NOT NULL default `NOW()` ) TYPE=MyISAM; This gives an error; CRE

Re: storing large integers properly

2003-08-07 Thread Cybot
Eben Goodman wrote: I am storing book isbn numbers in a table. isbn numbers are 10 digit numbers and many start with 0. The data type of the field I am storing this info in is a bigint(16) unsigned. It appears that isbns that start with 0 are going in as 9 digit numbers, the 0 is being ignor

Re: selecting count query (newbie alert)

2003-08-07 Thread Cybot
Ryan A wrote: Hi, This is my first post here so forgive me if its too simple or not right. basically what i do is: SELECT COUNT(*) FROM table1 where cno=3; (and dumping it into a variable $theResult - I am using PHP) and it gives me the result, but now i need to do this in 5 tables... I can of cou

Re: Query Problem, Confused by Left Join.

2003-08-07 Thread Cybot
John Wards wrote: I have this query: SELECT * FROM news_category LEFT JOIN news_x_cat ON news_category.id = news_x_cat.cat_id WHERE ( news_x_cat.news_id = 9 OR news_x_cat.news_id IS NULL ) Which gives me this output: id title perm show news_id cat_id 1 About Us 1

Re: selecting count query (newbie alert)

2003-08-06 Thread Cybot
Ryan A wrote: Hi, This is my first post here so forgive me if its too simple or not right. basically what i do is: SELECT COUNT(*) FROM table1 where cno=3; (and dumping it into a variable $theResult - I am using PHP) and it gives me the result, but now i need to do this in 5 tables... I can of cou

Re: Dropping primary key/unique key

2003-08-06 Thread Cybot
I have a problem understanding why MySQL is deleting a unique key instead of a primary key. from Documentation: DROP PRIMARY KEY drops the primary index. If no such index exists, it drops the first UNIQUE index in the table. When I do it then I get this: mysql> desc uksample4; +---+---

Re: load data infile problem

2003-08-05 Thread Cybot
Montagna, Dan wrote: Hello, I'm a very new mysql/php user and am trying to use the load data infile command without luck. I'd like to replace a table using a text file but can't get it to work. I set up a test table with no records using a telnet console. I'm trying to write a php page that ta

Re: FULLTEXT Searching

2003-08-01 Thread Cybot
Ralph Guzman wrote: I have to do a catalog search through multiple tables and columns for product model number, description, and name. I realize that doing pattern matching with multiple LIKE statements is slow so I found that FULLTEXT searches is a better alternative. I have added a FULLTEXT in

Re: Update Table By ID Ranges

2003-08-01 Thread Cybot
How do i use the UPDATE statement to update a range of Primary Key id numbers. (let say 100 through 1000). Example, UPDATE testTable set testField='' WHERE test_id in (100:1000); > how about > > UPDATE testTable set testField='' WHERE > test_id >= 100 and test_id <= 1000; or just: expr BET

Re: Deleting Duplicate Records

2003-07-31 Thread Cybot
Kim Mackey wrote: Group, I have been working on a project for a while now trying to figure out how to remove duplicate records from a single table using a query. To complicate matters, what constitutes a duplicate record is a match on several fields, but not all fields. I have been successful

Re: Calculating a primary key

2003-07-30 Thread Cybot
Colt Brunton wrote: Hi folks I need a MySQL statement that will calculate a new unique identifier for each record in a table. The identifier format is "-888" where the letters are the first four letters of the company's name and the 3 digit number is accounts for each occurrence of the let