MySQL 4.1 and PHP 4.4

2006-01-23 Thread 立 周
Dear list subscribers, My web hosting server runs PHP 4.4 and MySQL 4.1. But PHP 4.4 doesn't fully support MySQL 4.1. and i have problems restoring a utf8 encoded database dumped from a MySQL 4.0 server to the new 4.1 server. Do i have any chance to get it working in this setup or should i persuad

How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-23 Thread Nicolas Verhaeghe
A client of mine sells motorcycle parts and the motorcycle models are for instance: YZ85 YZ125 WRF450 YZF450 Etc... If you know motorcycles, you know that the number is always the displacement in cc. What I am looking to do here is make it so that the models are sorted properly according to the

Results of materialized views project

2006-01-23 Thread Andrew Roth
Hello, You may remember a post by myself a few months ago on behalf of my group members (http://archives.neohapsis.com/archives/mysql/2005-q4/0729.html) about a project component of a course we were taking, Software Architecture, taught by professor Ric Holt. We were going to look at the architec

Troubles installing MySQL5 via Darwin Ports

2006-01-23 Thread Philip R. Thompson
Hi all. Let me clarify my subject line. I *think* I actually got all the 'MySQL5 +server' files installed correctly using Darwin Ports. The problem is that I am not able to start my server. I think that 'my.cnf' may also be incorrect. Here's what's happening... - When I try to start the se

RE: Dump only data and Database

2006-01-23 Thread Logan, David (SST - Adelaide)
Hi Luiz, If however you do not wish to create the indexes while inserting data, you can use the following option for the mysqldump --disable-keys, -K For each table, surround the INSERT statements with /*!4 ALTER TABLE tbl_name DISABLE KEYS */; and /*!4 ALTER TABLE tbl_name ENABLE KEYS *

Re: Dump only data and Database

2006-01-23 Thread Luiz Rafael Culik Guimaraes
Paul Dear Friends What are the best options to dump an entire database on linux (with creation of databases and tables) with out dumping the index creation sentences What is an "index creation sentence"? Do you mean that you want the dump to include the CREATE TABLE statements, but for thos

Re: Dump only data and Database

2006-01-23 Thread Paul DuBois
At 18:59 -0200 1/23/06, Luiz Rafael Culik Guimaraes wrote: Dear Friends What are the best options to dump an entire database on linux (with creation of databases and tables) with out dumping the index creation sentences What is an "index creation sentence"? Do you mean that you want the dum

Re: count(*) send a wrong value

2006-01-23 Thread Hank
My guess would that your PHP code is not written correctly. For instance, if you have a query in PHP: $sql="select * from my_table where cid=123"; ...and are using the PHP function mysql_numrows() to count the results, and then for your next test... you're just changing the query to: $sql="sele

Re: Need help with a query

2006-01-23 Thread Mark Phillips
On Monday 23 January 2006 03:33 pm, Michael Stassen wrote: > Mark Phillips wrote: > > I am running mysql 4.0.24 on Debian sarge. > > > > I have a table with two columns, "team" and "division", both varchar(255). > > There are some errors in the table where division has a value but team is > > bl

Re: count(*) send a wrong value

2006-01-23 Thread Michael Stassen
fabsk wrote: > Hi, > > I'm facing a strange problem. I am using a database at my Internet > provider (Free, France). The type of table is MyISAM (no choice), MySQL > 4.1.15. I can do my tests with my PHP code or phpMyAdmin. > > The definition of my table is: > - uid, int > - cid, int > - response,

Re: count(*) send a wrong value

2006-01-23 Thread Rhino
What you're describing definitely sounds like a bug to me, assuming that you are accurately reporting the query you've used and the data in your table. In other words, if there really are 10 rows that have a cid value of 123 and you really are doing "select * from table where cid = 123", then y

Re: Need help with a query

2006-01-23 Thread Michael Stassen
Mark Phillips wrote: I am running mysql 4.0.24 on Debian sarge. I have a table with two columns, "team" and "division", both varchar(255). There are some errors in the table where division has a value but team is blank. Given that I am getting new data, and the data entry folks may create a r

Re: count(*) send a wrong value

2006-01-23 Thread fabsk
Thank you for you answer, but I read many times and I did not found something to answer my question (well, I did not know about the NULL). In my case: - there is one table - htere is no "distinct" - there is a WHERE clause, so there is no optimisation - there is no other field and no "group by" I

Re: count(*) send a wrong value

2006-01-23 Thread Fabien SK
Thank you for you answer, but I read many times and I did not found something to answer my question (well, I did not know about the NULL). In my case: - there is one table - htere is no "distinct" - there is a WHERE clause, so there is no optimisation - there is no other field and no "group by" I

Re: count(*) send a wrong value

2006-01-23 Thread mysql
>From the MySQL 4.1 manual 12.10.1. GROUP BY (Aggregate) Functions COUNT(expr) Returns a count of the number of non-NULL values in the rows retrieved by a SELECT statement. COUNT() returns 0 if there were no matching rows. mysql> SELECT student.student_name,COUNT(*) ->FROM st

Dump only data and Database

2006-01-23 Thread Luiz Rafael Culik Guimaraes
Dear Friends What are the best options to dump an entire database on linux (with creation of databases and tables) with out dumping the index creation sentences For dump I use this command mysqldump -e --add-drop-database --add-drop-table dabasename > database.sql Regards Luiz -- MySQL

count(*) send a wrong value

2006-01-23 Thread fabsk
Hi, I'm facing a strange problem. I am using a database at my Internet provider (Free, France). The type of table is MyISAM (no choice), MySQL 4.1.15. I can do my tests with my PHP code or phpMyAdmin. The definition of my table is: - uid, int - cid, int - response, text - points, int (can be null

Need help with a query

2006-01-23 Thread Mark Phillips
I am running mysql 4.0.24 on Debian sarge. I have a table with two columns, "team" and "division", both varchar(255). There are some errors in the table where division has a value but team is blank. Given that I am getting new data, and the data entry folks may create a record with a blank divi

Re: NULL or NOT NULL in relational design

2006-01-23 Thread SGreen
Danny Stolle <[EMAIL PROTECTED]> wrote on 01/23/2006 01:34:01 PM: > Hi, > > I am often running into this type of design, but would it be a good > design. Normally you design tables related to each other and having e.g. > parameter tables like a country-table holding country names with their >

NULL or NOT NULL in relational design

2006-01-23 Thread Danny Stolle
Hi, I am often running into this type of design, but would it be a good design. Normally you design tables related to each other and having e.g. parameter tables like a country-table holding country names with their country-id's; and you will find these country-ids back in other tables, which

Re: DATE field key depends on value?

2006-01-23 Thread sheeri kritzer
Thanx, that's exactly it. I feel a bit embarassed as this came up on the list about 2-3 weeks ago, and I found the answer as I was waiting for the replies. -Sheeri On 1/20/06, gerald_clark <[EMAIL PROTECTED]> wrote: > sheeri kritzer wrote: > > >Hi folks, > > > >I'm attempting to optimize a quer

Re: Postcode Search

2006-01-23 Thread mysql
It might be more productive to add a foreign key to the Offices and Properties tables that points to the Primary key ID of the respective PostCode in the Postcodes table. Combined with the other suggestions, this would give you a key from the Offices and Properties tables directly into the Po

Re: Postcode Search

2006-01-23 Thread Michael Stearne
We use the inradius function as described here: http://www.phparch.com/discuss/index.php?t=msg&th=878 It's not the fast way I'm sure but seems to be pretty reliable. Instead of the zipdata table you would point it at the Postcodes table and the Properties table. You'll also need to add an X,Y (

Re: Postcode Search

2006-01-23 Thread SGreen
"Shaun" <[EMAIL PROTECTED]> wrote on 01/23/2006 11:51:32 AM: > Hi, > > We have a dataset of uk postcodes and their relevant X-Coordinates and > Y-Coordinates, a table of properties (houses), a table of users and a table > of offices - users work in an office - table structures below. > > Is i

Postcode Search

2006-01-23 Thread Shaun
Hi, We have a dataset of uk postcodes and their relevant X-Coordinates and Y-Coordinates, a table of properties (houses), a table of users and a table of offices - users work in an office - table structures below. Is it possible to run a search of all properties in the properties table that co

Mysql and Oracle

2006-01-23 Thread Xiaobo Chen
Hi, all I have a questions: I installed MySQL and Oracle 9i in the same XP box, is there any interference with each other? Thanks in advance. Xiaobo -- Faculty of Computer Science Dalhousie University Halifax, Nova Scotia Canada -- MySQL General Mailing List For list archives: http://lists

Re: Mysql and Oracle

2006-01-23 Thread Martijn Tonies
> I have a questions: > > I installed MySQL and Oracle 9i in the same XP box, is there any > interference with each other? They'll both compete for CPU and memory, but for testing or development, it's fine. Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL

Re: Comparing 2 Tables

2006-01-23 Thread Peter Brawley
Andrew, >I need to update a table without disturing the recordset however there are >or could be some overlaps with data is there a way I can compare id fro >the same 2 tables, one new one old? Here's one way... SELECT MIN(TableName) as TableName, id FROM ( SELECT 'Table a' as TableName, a.

Re: Comparing 2 Tables

2006-01-23 Thread SGreen
"AM COMS" <[EMAIL PROTECTED]> wrote on 01/23/2006 10:01:17 AM: > I need to update a table without disturing the recordset however there are > or could be some overlaps with data is there a way I can compare id fro > the same 2 tables, one new one old? > > andrew > Your question is quite vague.

Database backups

2006-01-23 Thread George Law
Just a quick question regarding mysql backups. I know myisam tables are portal from machine to machine, but I know there are some differences Between innodb tables. I am running mysql 5.0.18 on suse linux 10. I have innodb set up so it stores each table in its own .idb file. I've read that i

Comparing 2 Tables

2006-01-23 Thread AM COMS
I need to update a table without disturing the recordset however there are or could be some overlaps with data is there a way I can compare id fro the same 2 tables, one new one old? andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://l

Re: mysql and utf8

2006-01-23 Thread Gleb Paharenko
Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-string.html devy wrote: > Hi list, > > I'm having some problems while trying to save into a TEXT field some data > containing text and special characters from a C program! > I thought to convert the special chara

Re: assigning variable without printing result?

2006-01-23 Thread Gleb Paharenko
Hello. It is not clear for what does it mean without printing the result. Could you provide an example. If you don't want the variable to be in the column listing you can use such a technique: select * from ab where @variable:=1 and (other conditions). Do not forget about SET syntax (it doesn't

Re: Unable to initialise database

2006-01-23 Thread gerald_clark
Jon Miller wrote: Having a problem connecting to a MySQL database from a mail server. In the mail logs I'm getting: mail MailScanner[4904]: Unable to initialise database connection: Can't connect to MySQL server on '192.168.10.4' (110) In the script that is running it has a mysql_connect sta

Re: Can I change the password of a user on the server without interupting the user's existing connections?

2006-01-23 Thread Gleb Paharenko
Hello. Changes to global privileges and passwords take effect the next time the client connects. So, if your application doesn't reconnect you can safely change password. Another possibility is to directly modify grant tables, and perform FLUSH PRIVILEGES just before your application restarts.

Re: Import File / Insert Optimization Help

2006-01-23 Thread Gleb Paharenko
Hello. I'm not sure if it suitable for you case, but sometimes it is better to import data to the temporary table on the server and extract values from the fields of that table. Scott Klarenbach wrote: > I am importing records from a text file into my DB. Each record in the text > file corresp

Re: Installed CompleteMySQL 4.0.21 - now cant login to terminal

2006-01-23 Thread Gleb Paharenko
Hello. It is rather not MySQL problem, but the problem of your initial shell scripts. AFAIK bash usually reads .bashrc and .bash_profile. Remove the call to mysql_init from them if you have write access to you home directory. See 'man bash' for more details. Mike Stathopoulos wrote: > I install

Re: question about recovery with binlog

2006-01-23 Thread Gleb Paharenko
Hello. There a lot of different ways to perform this operation. See: http://dev.mysql.com/doc/refman/5.0/en/replace-utility.html man sed man awk wangxu wrote: > How to replace it? > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://l

question about mysqlbinlog

2006-01-23 Thread wangxu
I do the follow statement: [EMAIL PROTECTED] mysql]# /usr/bin/mysqlbinlog -h192.168.55.55 -uroot -R --to-last-log /var/lib/mysql/1.01 But the results are: --- /*!40019 SET @@session.max_insert_delayed_threads=0*

Re: Can MySQL jobs be posted to this list?

2006-01-23 Thread Colin Charles
Beau Gould wrote: Thank you, Beau Gould The best place for this would probably be the Jobs forum located at http://forums.mysql.com/list.php?8 -- Colin Charles, Community Engineer MySQL AB, Kuala Lumpur, Malaysia, www.mysql.com Office: [EMAIL PROTECTED] / +46 18 174 400 ext. 4528 Are you MyS