[Announcement] for PHP and MySQL 4.1 Users/Testers

2003-02-11 Thread Georg Richter
Hi,

The new mysql extension (ext/mysqli) is now in the php-cvs-repository. Please 
note that you need MySQL Version 4.1 (both server and client library) and 
that this extension has experimental status.

Configuration:

--with-mysqli=/path-to-mysql-4.1  -without-mysql

If you want to use both ext/mysql and ext/mysqli you have to specity 

--with-mysqli=/path-to-mysql-4.1  --with-mysql=/path-to-mysql-4.1 
 

Some new features:

OO and plain interface
SSL connection support
Variable bindings
Bigint support
Replication support

For some samples check the tests subdir. I'll add documentation within the 
next days.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: [PHP] MySQL 4.0 + PHP 4

2003-01-22 Thread Georg Richter
On Wednesday 22 January 2003 18:52, 1LT John W. Holmes wrote:

 There's really no change from the PHP side. PHP just sends the data and
 receives something back The only change in PHP is that mysql_connect() now
 supports additional flags to connect over SSL.

Nope, I only forgot to remove a constant. SSL support will be available in 
PHP 5 (new mysql extension).

Regards

Georg



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Initiating secure connection to MySQL4 from PHP

2003-01-13 Thread Georg Richter
On Monday 13 January 2003 17:49, Tonu Samuel wrote:

Hi,

Currently PHP's mysql extension doesn't support SSL. This will be available 
in PHP 5.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why unsigned doesn't work?

2002-12-29 Thread Georg Richter
On Sunday 29 December 2002 15:06, Octavian Rasnita wrote:


 mysql create table aaa(id int not null unsigned, name text);

 Can you tell me why doesn't it work?


null can't be signed or unsigned.
try int unsigned not null

Regards

Georg


filter: mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Sorting order in latin1 broken

2002-12-28 Thread Georg Richter
On Saturday 28 December 2002 15:20, [EMAIL PROTECTED] wrote:

 When querying text strings from a latin1 database,
 a text string starting with german Ü is ordered
 between W and Y, but should be treated as U or Ue.


For the correct sorting you need another charset (latin1_de or german1).

Regards

Georg

filter:mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: multiple database connection

2002-12-25 Thread Georg Richter
On Tuesday 24 December 2002 17:47, Lalit Chandwani wrote:
 multiple database connection
 on windows 98 , mysqld running with pws

 here is some confusion with the multiple database
 connection variables
 i am executing the same code in three different ways
 it gives me diffrent output
 all the database and table are exsists


Any good reason why do want to have multiple connections in a script to the 
same host with same user/pw?

Also read the php documentation which describes the syntax for multiple 
connections to the same server.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: 4.1 Download

2002-12-20 Thread Georg Richter
On Friday 20 December 2002 14:14, Anthony W. Marino wrote:
 Where/how can I get a copy of 4.1?
 Thanks,
 Anthony


http://www.mysql.com/doc/en/Installing_source_tree.html

Regards

Georg

filter: mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: weird auto increment behaviour (bug???)

2002-12-14 Thread Georg Richter
On Friday 13 December 2002 20:43, you wrote:

Hi Sean,

this is not a bug:

http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html

 For MyISAM and BDB tables you can specify AUTO_INCREMENT on secondary column 
in a multi-column key. In this case the generated value for the autoincrement 
column is calculated as MAX(auto_increment_column)+1) WHERE 
prefix=given-prefix. This is useful when you want to put data into ordered 
groups. 

Regards

Georg

 Hi all, I have recently encountered some strange (to me) behaviour with an
 auto
 increment column. It resulted because of an oversight in table creation.
 Here is some SQL statements that will illustrate my issue:

 CREATE TABLE test (
 ID INT AUTO_INCREMENT,
 Name CHAR(30),
 KEY (Name, ID)
 )TYPE=MyISAM;

 INSERT INTO test SET Name=bob;
 INSERT INTO test SET Name=tom;


 Now, both of those columns got ID=1 from the insert.

 A few observations:
 1) MySQL requires AUTO_INCREMENT columns to have an index. This table
 uses ID as an index, but it's not a leftmost-prefix of any index, which
 i thought would give
 a create error. (is this a bug?)
 2) considering this non auto increment behaviour, i would think that ID
 should be NULL, since
 ID is allowed NULL values, and no value was assigned to the ID in the
 insert statements.

 Also, this works the same if ID is defined asID INT NOT NULL
 AUTO_INCREMENT


 It seems that this is what's happening:
 When MySQL executes the insert queries, it correctly recognizes that ID is
 an AUTO_INCREMENT
 column, so it tries to get the new auto increment value. But, because ID
 isnt properly indexed for
 an auto increment column, the value is incorrectly reported, and the column
 is set to 1 every time.

 weird, huh?
 sean peters
 [EMAIL PROTECTED]


 mysql, query


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Tuning MySQL Server Parameter

2002-12-06 Thread Georg Richter
On Friday 06 December 2002 01:11, Qunfeng Dong wrote:
 Hi,

 I wish to tune our MySQL Server Parameter to increase
 the speed of Join. I was trying to do a simple join
 with two tables. One is big (~2,500,000 records); the
 other one is small. The current join seems to take
 forever to finish even on the indexed attribute.

Before you change some server parameters, you should analyze your join query 
with EXPLAIN SELECT yourquery.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: question about mysql_real_escape_string()

2002-12-05 Thread Georg Richter
On Wednesday 04 December 2002 22:35, Stefan Hinz, iConnect \(Berlin\) wrote:
Hello Stefan,

 The communication buffer (between client and server) is set to 1 MByte by
 default. You can change this either by starting the server with a different
 option or by setting the appropriate variable in the my.cnf/my.ini file. I
 prefer the latter:

mysql_real_escape_string ist a client_side function, so in this case there is 
no communication between client and server (the charset information is stored 
on the client side too (in mysql-charset)).

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: question about mysql_real_escape_string()

2002-12-04 Thread Georg Richter
On Wednesday 04 December 2002 16:29, Tom Roos wrote:
 hi

 does this function handle a binary string of any length or is there some
 sort of max limit.

 when i load a binary file (filesize 49Kb) into a blob field, the function
 is ok but when the filesize is 1.8Mb, the function fails and my programs
 aborts. using the debugger, the program aborts when in this function.

 if mysql_real_escape_string() has a max limit, how does one get around
 this? could it be set in my.cnf, or somewhere else? or is this a case of
 bad practise to load big ( 1Mb) into mysql?

 tks
 tom


Hi,

mysql_real_escape_string uses 4 parameters: MYSQL *mysql, char *to, char 
*from, ulong length)

*to should be allocated from your program, and the size should be 2 * 
strlen(from) + 1, which is the worst case (every char has to be escaped). If 
length is  2 * strlen(from) + 1 you can change the size via realloc.

Regards

Georg


Filter:mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Where is 4.1 source

2002-11-21 Thread Georg Richter
On Thursday 21 November 2002 12:58, Daniel Kiss wrote:
 Hi all,

 Where can I download MySQL version 4.1 source code?

http://www.mysql.com/doc/en/Installing_source_tree.html

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: LIMIT clause

2002-11-20 Thread Georg Richter
On Thursday 21 November 2002 00:31, JohnMeyer wrote:
 When you specify a limit clause, do you start at 0 or at 1?
 The reason why I ask is that, on one query, it seems to be picking up the
 second record first when I use 1 e.g LIMIT 1, 10.



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)

From: http://www.mysql.com/doc/en/SELECT.html

The LIMIT clause can be used to constrain the number of rows returned by the 
SELECT statement. LIMIT takes one or two numeric arguments. The arguments 
must be integer constants. If two arguments are given, the first specifies 
the offset of the first row to return, the second specifies the maximum 
number of rows to return. The offset of the initial row is 0 (not 1): 

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Info for PHPMySQL-Users: New ini-option for php4/ext/mysql

2002-11-11 Thread Georg Richter
Hi all,

just for your information:

I just committed new stuff for php's mysql extension:

I added some trace/debug functionality, which can be activated via  
ini-setting mysql.trace_mode. When it's set to on, you will get 
automatically warnings for:

a) table  index scan
b) SQL-Errors
c) non freed result sets

If you don't have access to the php.ini-file use ini_set(mysql.trace_mode, 
1) to activate this feature.

I'll hope this will help you a little bit to improve your work :)

If you have some additional ideas for trace_mode, I would be glad to hear 
from you.

Regards

Georg

P.S: This feature is currently available only via CVS.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: PHP bias

2002-11-09 Thread Georg Richter
On Sunday 10 November 2002 14:12, Robert Macwange wrote:

 PHP is an inferior language. Deal with perl instead.

Looks like you're not very familar with the spirit of Open Source:

Perl, PHP, Python, Ruby etc. are very excellent languages. They all have 
benefits and of course some disadvantages. But this competition helps each 
one to improve and become more popular.

The same with MySQL, Postgres, SleepyCat, ... etc.

There is no better or inferior: Just define your needs and choose whats the 
best for you.

Regards

Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Speed !

2002-08-03 Thread Georg Richter

On Saturday, 3. August 2002 06:44, Lord  Loh wrote:

Hi,

 I have a database of mysql with 3 million records. No query is
 performed in
 less than 10 seconds!(With Index and all that)

Some more information like your table structure, indexes and a sample query 
and an explain could help to give you an answer.

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Crashing under high load

2002-08-02 Thread Georg Richter

On Friday, 2. August 2002 20:48, Shane Allen wrote:
Hi,

 I digress... at this point, the question that plagues me is: Is it normal
 for MySQL to die under high load?

you have a lot of programs, which prefer to die under heavy load. The main 
question is not why they die, the question is why is the load so high?

I hope you already analyzed your system, your mysql-server and your queries  
and can could give us some more additional information.

Regards

Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to use LAST_INSERT_ID() or mysql_insert_id() ?

2002-07-29 Thread Georg Richter

On Monday, 29. July 2002 06:33, databarn wrote:
Hi,

 E.G., $qry=$qry.;select LAST_INSERT_ID(); will blow up on me every time 
 I've evaluated $qry, and it works just fine until I append the piece that
 should let me recover the auto increment value that was created during the
 insert process.

Fortunately its not possible to combine multiple commands in a single query 
(that would be a security hole). You have to send two queries instead, or you
can use the php function mysql_insert_id after executing the 1st query.

 I'm using, according to phpinfo(), MySQL 3.23.32 and PHP 4.0.5 on Win2K
 with IIS 5.0.
I recommend to upgrate your MySQL and PHP-Version.

Regards

Georg 

mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Errors -

2002-07-23 Thread Georg Richter

On Tuesday, 23. July 2002 09:34, William_dw -- Sqlcoders wrote:
 Hi!,
 I'm hoping someone can give me a pointer as to what's going wrong that's
 crashing our MySQL server, I've included a snippet of the log (for the last
 time it restarted and then the errors after that).


 020722  8:55:45  read_key: Got error 127 when reading table
 './wahse/keywords'

perror 127: 127 = Record-file is crashed

see http://www.mysql.com/doc/R/e/Repair.html how to fix that.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Very basic bug: Respecting NOT NULL?

2002-07-19 Thread Georg Richter

On Friday, 19. July 2002 01:57, Bradley Plies wrote:

Hi Bradley,

 mysql select * from pfpbaserequest;
 ++--++-+--+

 | id | trx_type | tender | req_date| amt  |

 ++--++-+--+

 |  1 |  | X  | -00-00 00:00:00 | 0.00 |

 ++--++-+--+
 1 row in set (0.00 sec)

I don't understand your question. None of the columns has a NULL Value.
NULL ist not  (empty string) and not 0 (numeric).

Regards Georg

mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Installation Problem

2002-07-19 Thread Georg Richter

Hi Dexter,

 configure:1948: checking for C compiler default output
 configure:1951: gcc -03conftest.c  5
 gcc: unrecognized option `-03'
 cpp: Internal compiler error: program cpp got fatal signal 9
 configure:1954: $? = 1
 configure: failed program was:
 #line 1932 configure
 #include confdefs.h

Hi Dexter,

Hmm.. looks like that you have specified CC=gcc -03 ?!
Should be gcc -O3 (Letter O, not zero).

Regards

Georg

mysql,query




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: proces to blockade

2002-07-18 Thread Georg Richter

On Friday, 19. July 2002 02:40, [EMAIL PROTECTED] wrote:
 Hi we have a problem,
 I have table of 1,000,000 rows and i do query all, and after i can't do any
 more, because this process to blockade all mysql i can't do query of any
 table.

 What can i do ?

Hi,

hard to say, when we don't know anything about your query and your table 
structure.

Regards Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Installation Problem

2002-07-18 Thread Georg Richter

On Friday, 19. July 2002 07:03, Dexter S. Tan wrote:

Hello Dexter,

would be interesting to know the content from your config.log file.

Regards

Georg

mysql,query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: copy question

2002-07-17 Thread Georg Richter

On Wednesday, 17. July 2002 18:07, Vivian Wang wrote:
 Can mysql copy from table1 to table2?


Yes, if table t2 doesn't exist you have to create table2 first.
Then you can use INSERT .. SELECT STAMENT.

http://www.mysql.com/doc/I/N/INSERT_SELECT.html

Regards

Georg

mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: using a php page to reboot linux

2002-07-17 Thread Georg Richter

On Wednesday, 17. July 2002 21:38, Harpreet Kaur wrote:
 Hi mysql list members,

 Is it possible to reboot the linux server through a PHP page. Like a client
 clicking on a button in a php page and that would result in rebooting the
 linux server.

 Can this be done?? Pls help,

Yes, its possible.
But this the mysql-list, send you php-questions to [EMAIL PROTECTED]

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: LOAD DATA in LOCAL

2002-07-16 Thread Georg Richter

On Tuesday, 16. July 2002 08:55, [EMAIL PROTECTED] wrote:

Hi,

 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)

http://www.mysql.com/doc/L/O/LOAD_DATA_LOCAL.html

Regards Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Mysql wil lnot load

2002-07-16 Thread Georg Richter

On Tuesday, 16. July 2002 07:11, Aaron Axelsen wrote:

Hi,

 020715 23:40:08  mysqld started
 020715 23:40:08  /usr/local/mysql/libexec/mysqld: Can't create/write to
 file '/usr/local/mysql/var/Alpha.pid' (Errcode: 13)
 020715 23:40:08  /usr/local/mysql/libexec/mysqld: Can't find file:
 './mysql/host.frm' (errno: 13)
 020715 23:40:08  /usr/local/mysql/libexec/mysqld: Error on delete of
 '/usr/local/mysql/var/Alpha.pid' (Errcode: 13)
 020715 23:40:08  mysqld ended

 any suggestions?

perror 13 == Error code  13:  Permission denied
So you have to change the file privileges, or you should run mysqld under 
another user.

Regards

Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: UDF: Funcion definida por el usuario

2002-07-15 Thread Georg Richter

On Monday, 15. July 2002 15:28, Daniel BI wrote:
 Hola listeros :)

Hola!

please write in english, or use the spanish mailing list 
([EMAIL PROTECTED])

Thx

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Default created date field

2002-07-15 Thread Georg Richter

On Monday, 15. July 2002 16:51, Shawn Poulson wrote:

Hi,

 I'm having trouble doing this in MySQL, but it keeps complaining.  All I
 have to work on is:
 create table mytable (
createddate datetime not null default now()
 )


Just use timestamp instead datetime.

Regards

Georg

mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Calculating weeks

2002-07-15 Thread Georg Richter

On Monday, 15. July 2002 20:28, Paul W. Reilly wrote:

Hello Paul,

maybe http://www.mysql.com/doc/D/a/Date_and_time_functions.html could answer 
your question (Function week() )

Regards Georg

 Trying to count weeks!  I am doing a personal accounting system in
 php/mysql.  I have a report section that groups and calculates expenses
 into running totals, so that I can see total amount spent in each category.
  I would like to add a break down to this that will show me the average
 weekly amount.  The calculation is easy enough, but I can not figure out
 how to get the number of weeks being calculated.

 Any ideas would be greatly appreciated.  Right now I am putting in the
 number of weeks in manually.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MyISAM v. InnoDB

2002-07-15 Thread Georg Richter

On Monday, 15. July 2002 22:46, Chris Boget wrote:


 Of the data? Or of the queries?


Not the data. Just your query, the output from explain and a create table 
statement.

Regards

Georg



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: replace query

2002-07-10 Thread Georg Richter

On Wednesday, 10. July 2002 18:13, Anil Garg wrote:
Hi!
 I tried to do it with the replace query but being a newbie to mysql i
 couldnt find the right syntax.
 Can someone help.


http://www.mysql.com/doc/U/P/UPDATE.html

Regards

Georg



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Query Optimization

2002-07-08 Thread Georg Richter

On Monday, 8. July 2002 12:37, Arul wrote:
 Hi All

 The Query below took around 175 Secs to return 22 Rows..Any way this query
 can be optimized


For analyzing your problem, you should send your table definition and an 
output of the EXPLAIN statement.


Regards Georg

mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Root pass

2002-07-03 Thread Georg Richter

On Wednesday, 3. July 2002 07:51, Page Works Web Solutions wrote:

Hi,

 Type 'help;' or '\h' for help. Type '\c' to clear the buffer

 mysql UPDATE user SET Password=PASSWORD(testpassword)
 - WHERE User='root';
 ERROR 1046: No Database Selected
 mysql

1) select the database with use mysql before, or specify mysql.user as table

2) Quote testpassword: ... =password('testpassword') 


Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Mysql C API problems

2002-06-29 Thread Georg Richter

On Saturday, 29. June 2002 11:15, Hugo Veiga wrote:

Hello Hugo,

 will this do?
 if(!mysql_query(myData, query)
 {
results = mysql_store_results(myData);

-if(mysql_num_rows() == 0)
+if (!mysql_num_rows(results))
{
//action;
}
 }

with the above correction it should work :)

 will this do?
 row = mysql_fetch_row( results );

 if(row[0]!=NULL)
 {
 tempo=_registo[0]-decimals; //?!??!?!?
 //other actions here
 }//if


The values in row are always represented as strings, so you have to use atoi, 
atol, atof depends on the type, to convert it:

if ((row = mysql_fetch_row(results)) != NULL) {
  tempo = atoi(row[0]); 
}

Regards Georg

mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: saving modified image to blob

2002-06-29 Thread Georg Richter

On Saturday, 29. June 2002 15:10, andy wrote:
Hi Andy,

What shows mysql_errno after mysql_query?!
Why you don't use mysql_real_escape_string (or mysql_escape_string for PHP 
Version  4.1.1) instead of addslashes?!

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: lost connectioin error!!

2002-06-28 Thread Georg Richter

On Friday, 28. June 2002 19:29, Anil Garg wrote:

Hi Anil,

 Now, when i run the following query:
 mysql select * from xoops_groups_modules_link where type='R' and mid=2 and
 groupid=3 ;
 ERROR 2006: MySQL server has gone away
 No connection. Trying to reconnect...
 Connection id:1
 Current database: xoops


Looks like your query is too slow and you will get a timeout.
Add an index to type and mid (or if possible a multi-column index) and try it 
again.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: SELECT COUNT

2002-06-27 Thread Georg Richter

On Thursday, 27. June 2002 13:36, Per Jessen wrote:
 Hi,

 I am in the process of running ecperf using mysql, and ran into a
 small problem regarding SELECT COUNT - usd in some of the ecperf
 source.
 Apparently,  SELECT COUNT (*) FROM  is not valid syntax according
 to mysql ? where as SELECT COUNT(*) FROM  is ?

 What's with this blank between COUNT and ( ?

If you want to use blanks between function names and left parenthesis you 
have to start the mysql damoen with option --ansi. In this case all your 
function names are reserved words too.

Regards

Georg

mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hardware Planning

2002-06-27 Thread Georg Richter

On Thursday, 27. June 2002 21:26, [EMAIL PROTECTED] wrote:
Hi,

 I apologize for not being more specific. The query that is taking too long
 is :
 SELECT * FROM Stories WHERE UCASE(Path) LIKE 'toUpper(path)%';
 Path is a 255 char field with an index on it. path is variable passed in.
 Thanks again.

Of course this query needs time, cause it doesn't use an index. How should 
MySQL uses the Index on Path, when you need UCASE(Path). You can't use an 
index in a where clause with a function on column.

To see if an index is used or not, use the EXPLAIN SELECT ... statement.

Regards

Georg

mysql, query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Does Yahoo Use MySQL?

2002-06-27 Thread Georg Richter

On Friday, 28. June 2002 05:54, Arul wrote:
Hi,

 Just was curious to know...
 I saw a posting by one of the guys here that Yahoo uses MySQL.
 Is this true..
 Any idea how many MySQL servers does Yahoo Use amd for which domain they
 use MYSQL.

http://www.mysql.com/articles/us/yahoo_finance.html

Regards Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL dump/recovery probable bug

2002-06-24 Thread Georg Richter

On Friday, 21. June 2002 15:43, Stefano Incontri wrote:
Hi,

 I found the following problem, which I consider a bug, but maybe I'm
 missing something to make it work correctly.

This is not a bug. Why do you use a reserved word (LOAD) for an index name?!
Rename it and everything should be ok.

See also: http://www.mysql.com/doc/R/e/Reserved_words.html

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: what is wrong with php?

2002-06-16 Thread Georg Richter

On Sunday, 16. June 2002 17:07, Andy Cheng wrote:
 Hi all,

 I find php slow when accessing mysql.  When I do

 $sql='select count(*) from table';
 $result = mysql_query($sql);

 It takes 10 sec to return. Is this normal speed for php or my Mandrake
 Linux configuration problem?

It looks like a configuration or network problem. PHP uses the mysql-client 
library too.

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Undo query in mysql

2002-06-16 Thread Georg Richter

On Saturday, 15. June 2002 23:36, mohamadally wrote:
 Hi all,

 I accidently deleted some values in table using mysql .

 Is there any way to undo the query ?

Yes,

for MyISAM-Tables use your backup or your replication server, for 
transactional tables like Inno-DB or BDB you can use ROLLBACK

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: building tree view in mysql?

2002-05-23 Thread Georg Richter

On Thursday, 23. May 2002 16:16, Sagi Bashari wrote:
Hi,

snip

 How can I get MySQL to sort it like that? I tried to use group/order by,
 but I cannot get it to sort it this way..

 Any ideas?
/snip

For trees you need self joins.

Regards


Georg


mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Location of header files - RPM

2002-05-23 Thread Georg Richter

On Thursday, 23. May 2002 17:46, Carl Carpenter wrote:
Hi,


  From the php-4.2.1 directory, enter:

 ./configure --with-mysql=/usr/share/mysql --with-xml
 --with-apache=/usr/loca l/src/apache_1.3.23/ --enable-track-vars
 --enable-ftp


You don't need the configure option --with-mysql. Just use the php built in 
client library, the include files should be located somewhere under /usr.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How do I uninstall a MySQL source installation on Linux ?

2002-05-23 Thread Georg Richter

On Thursday, 23. May 2002 19:18, Sharksforum wrote:
   How do I uninstall a MySQL source installation on Linux ?
 
  make uninstall

 I tried that without success.
 Would it require the original source code?

 Regards Jacob


just,  make clean like in any other makefiles.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL 4

2002-05-23 Thread Georg Richter

On Thursday, 23. May 2002 19:20, Olexandr Vynnychenko wrote:
Hi,
 Hey people, I'm using MySQL 3.23.49 now, but I'd like someone to tell
 me if I can use new MySQL 4. Is it very buggy? Is it safe enough to
 use not only at home? AFAIR it has some features 3.23 doesn't have.
 Thank's in advance.

if you need features like cache queries and some other things, you should 
switch. We run MySQL 4.0.1 in a production environment, with 200q/sec without 
any problems. All the few bugs we detected are reproducable in 3.23.x or 
caused by bad design/coding.

Regards

Georg

mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL statement problem

2002-05-20 Thread Georg Richter

On Monday, 20. May 2002 19:58, SpyProductions Support Team wrote:
 Shouldn't this come up with a list of names from each table that matches?


 SELECT * FROM table1,table2 WHERE table1.name = table2.name;


 Does anyone see anything wrong with this query?  It keeps giving me an
 empty set - but there definitely matches.  I even did a LIKE instead of =,
 takes longer, but comes out the same.  I triple checked the data, and it is
 *exactly* the same!

You should check your data again!

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Comparing UNSIGNED and INDEXED columns with negative numbers

2002-05-16 Thread Georg Richter

On Thursday, 16. May 2002 21:44, Benjamin Pflugmann wrote:
 Hi.

 What you observe is the fact that -1 will be converted to the format
 of the index, else the index could not be used.

 Converting -1 to an unsigned number give the biggest possible number
 for the type in question (here BIGINT UNSIGNED). None of your numbers
 is bigger than this, so you get an empty set, i.e. the result you
 observe is to be expected.

Hmm... not really

When you specify ... where id = -1 it works fur int unsigned (not for 
bigint)


 IIRC, the behaviour without indexes has been fixed in the 4.x version
 (to be also an unsigned comparison).

No, its still the same in 4.x

Regards

Georg

mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Dateformat

2002-05-15 Thread Georg Richter

On Wednesday, 15. May 2002 14:54, Mattias Persson wrote:

 query above. The manual says

 %v Week (1..53), where Monday is the first day of the week. Used with '%x'
 %u Week (0..53), where Monday is the first day of the week

 When is there a week 0?

Hi,

Week = 0 only is valid for %u. 

%v means January 1st is always in the 1st week, regardless which weekday it 
is. (1st Week:  January 1st - until next sunday after January 1st

%u means: The 1st week in January starts with first monday. So all before 1st 
monday is week 0. (Saturday Januar 1st = week 0, Monday January 3d is week 1)

Regards

Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: VERY Urgent!

2002-05-12 Thread Georg Richter

On Monday, 13. May 2002 06:10, Matthew Hale wrote:
 I work on a site called Creature World. We get ~110,000 pageviews per day.
 Our server load is constantly at like 10. From investigation...pretty much
 all of this load comes from mySQL. How can we optimize mysql to make it run
 faster and produce less load?

Hello,

first take a look of the SHOW STATUS Output and analyze them. Maybe you have 
to change your values, or if you have slow queries, optimize your queries.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Error code 28

2002-05-12 Thread Georg Richter

On Monday, 13. May 2002 07:20, Kittiphum  Worachat wrote:
Hi,

 In select field list if they have some field that field type is text or
 blob and if I use group by some filed MySQL will generate  Got error 28
 from table handler the query like this

 select a.f1,a.f2,a.f3,b.f1,b.f2
 from table_a as a,table_b as b
 where a.f1=b.f1
 and a.f1='xxx'
 group by b.f2

 if f2.b if mediumtext I will got error 28 but when change type to varchar
 it OK but I realy need mediumtext type how to solve this problem


For a error description use perror

perror 28
Error code  28:  No space left on device

So maybe you should delete some stuff on your disks or buy a new one.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Password=password('mypassword')

2002-05-12 Thread Georg Richter

Hi,

 Why does select * from usertable where user=username and Password =
 password('passowrd') not worked?


You should quote the username, and fix the typo in 'passowrd'.

select * from usertable where user=username and password('password') does
work, but that only checks if user exists and doesn't check for the correct
password...

Same here, quote the username and set the Password field in the where clause.

Regards

Georg

mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Adding new users

2002-05-12 Thread Georg Richter

On Monday, 13. May 2002 07:06, Todd Cary wrote:
Hi,

 However this does not work in a script:

 mysql_connect(209.204.172.122, root, mypassword);

 What am I missing?

What script do you use? Which language?

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Best book on MySQL

2002-05-11 Thread Georg Richter

On Saturday, 11. May 2002 17:43, Todd Cary wrote:
 I need to convert a PHP app from using Interbase to using MySQL.  What is
 the best book?

Hello Todd,

I prefer two books

1st: the PHP online-manual (http://www.php.net/docs.php)

2nd: MySQL from Paul DuBois, also known as the bible
Newriders ISBN 0.7357.0921.1

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How do i add an attachment

2002-05-11 Thread Georg Richter

On Saturday, 11. May 2002 19:38, yimdjo francis wrote:
 I have a mailing list in Mysql database working very
 well; How do I add an ATTACHMENT(files of any type) to
 emails going to the addresses in the mailing list
 stored in the database?

Hello Francis,

I guess this not the right mailing list for your question. Depends on which 
language do you use (C, Perl, PHP, Python,...) you should send your question 
to one of the lang-ml's.

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MYSQL ERROR-NO.0

2002-05-09 Thread Georg Richter

On Thursday, 9. May 2002 18:43,  Soilant ! wrote:
 Dear mysql,
 I just got one simple table. The PHP-Script ist ok (tested on another
 server), but trying to get data over my server, nothing comes back.
 So, I put up the lines:
 .mysql_errno(). - .mysql_error().
 It gives back:  0 - 

Hello  Webmaster,

Errorcode 0 means that there is no error.
Please refer to your PHP-Documentation: http://www.php.net/mysql_errno:
or read the description for mysql_errno Api-function in the MySql-Manual.

Btw: As a webmaster you also should know, which chars you shouldn't use in 
Mailaddr Names.


Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Fatal Error: Call to undefined function: mysql_connect()

2002-04-25 Thread Georg Richter

On Thursday, 25. April 2002 08:17, Andrew Rich wrote:

 5. I have determined I was running a copy of PHP that did not have MYSQL
 support compiled in.
Yes, looks like this is an an very old version, without mysql-support.

 6. Could someone suggest where i could get a PHP copy that supports MYSQL ?

Go to www.php.net or some of the mirrors. The rpm-package has integrated 
mysql-support. Or download the source-tarball and compile it. The libmysql is 
integrated in the tarball to. 

Regards

Georg

(query,mysql)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Poor Manual [Was: Why using filesort here?]

2002-04-21 Thread Georg Richter

On Sunday, 21. April 2002 20:54, Colin Faber wrote:
 it's my understanding that the latest revision of the manual is (minus
 4.x commits) always included in the distribution set.  New features
 are always documented in the manual and are nearly always appended
 with a This was added in version insert version here string some
 place.

Thats right, but often you can't find this information with the first view.
A little note under the function name, like in the PHP-Manual, would be 
easier to use.

Just my 2 cents

Georg

Filter: mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Cannot set auto-increment value to a specific number

2002-04-13 Thread Georg Richter

On Saturday, 13. April 2002 23:31, Alex Duffield wrote:
 Ignore this ---Get around silly filter -- sql,query

  Description:

 Using myisamchk -A=nn reports success but does nothing!


 I found this problem is being had by many, but have never come across a
  solution..

  Is there some way to manually set the auto_increment or not??!!!?

Its not recommended to change the auto_increment field, this could be a 
reason for inconsistent databases. If you need some logic order, insert an 
additional field.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL UDF questions

2002-04-11 Thread Georg Richter

On Thursday, 11. April 2002 02:11, Fei Chen wrote:

 How do I write a UDF to handle a entire tuple, e.g. is it possible to have
 select my_udf(*) from myTable;
 ?

Parmeters in the UDF could also be fields from a table.

 Also, is there a way for a UDF to return a data structure, say, a multi
 dimensional array? Or do I need to write some stringify function for the
 UDF to return?

UDF functions can return STRING (char *), INTEGER (long) OR REAL (double).
Please read the Manual: http://www.mysql.com/doc/A/d/Adding_UDF.html

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL UDF questions

2002-04-11 Thread Georg Richter

On Thursday, 11. April 2002 10:26, Fei Chen wrote:
 Dear Georg,


 * notation. Just as normally I can say
 select * from myTable;
 can I write a UDF to handle
 select my_udf(*) from myTable; ?
 There is the builtin function
 select count(*) from myTable;
 But the manual does not say how this is to be accomplished using UDFs.

No, the udf is outside from mysql in a shared library. So the udf doesn't 
know anything about the used table(s) and his fields.
When you want functionallity like count, you have to write an aggregate udf. 
The diffrence between a normal udf and a aggregate udf is that _reset and _add
functions will be called for first row/each row.

 Indeed UDFs can return (char *), but my question is, is there a way to
 return an array of intergers (int *)? or some more complicated structure,
 say, (myStruct *)? If UDFs are limited to returning (char*), (long) or
 (double), does that mean the only way out is to turn (myStruct*)  into
 some kind of string and return it as (char*)?


An user defined function (udf) is not a api-function. It would make no sense 
to return other values, or a structure. What output should be displayed, when 
udf would return a structure?

SELECT UDF(foo); 

Regards Georg

mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: SQL Question...

2002-04-06 Thread Georg Richter

On Sunday, 7. April 2002 05:56, Chuck \PUP\ Payne wrote:
Hi,

 I am trying to set up a SQL statement using NOW(), what I am wanting to do
 is to use NOW() then do a search on any date less than 7 days. Before I get
 several e-mails asking why. I am trying to a news base database for the
 company intranet and I am wanting to only show newsitems that are 7 days or
 less. And I want NOW() to set today date and then go back as far as seven
 days. But I am not sure now to use  less than in my statement with NOW(),
 or if it will work.


http://www.mysql.com/doc/D/a/Date_and_time_functions.html 
There is a sample how to use TO_DAYS function.

Regards

Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: copying field x to field y for each record in table

2002-04-03 Thread Georg Richter

Am Mittwoch, 3. April 2002 18:10 schrieb Chuck Barnett:
 Hi, how do I do the following:

 I have a table I have added a new field to, I want to take field X and copy
 it to the new field for each record.  What should this query look like?

UPDATE yourtable set newfield=x

Regards 

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: access sql statement

2002-04-03 Thread Georg Richter

On Thursday, 4. April 2002 20:16, Rw wrote:

   http://www.abc.com?select * from test

 Thanks.

MySQL is not a web server. But you can use a scripting language like PHP or 
Perl in combination with a web server and MySQL to do this.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Table statistics

2002-04-03 Thread Georg Richter

On Thursday, 4. April 2002 08:12, Doug Bishop wrote:

 ?
 mysql_connect(localhost, user, password);
 $query = SHOW TABLES;;
 $result = mysql_db_query(databasename, $query);
 $i = 0;
 while ($row = mysql_fetch_array($result))
 {
 $tableNames[$i] = $row[0];
   $i++;
 }
 for ($i = 0; $i = count($tableNames); $i++)
 {
   $query = SELECT COUNT(*) FROM  . $tableNames[$i] . ;;
   $result = mysql_db_query(databasename, $query);
   $row = mysql_fetch_array($result);
   echo Table  . $tableNames[$i] .  contains  . $row[0] .  rows.\nbr;
 }
 ?

I think Andy asked for a general solution, not for a solution in PHP. Not all 
people are working with PHP. There are a lot of other languages like C, Perl, 
Python, ... which all supports MySQL.

Finally a little note about your PHP Code: Did you ever heard about 
mysql_free_result ?!

Regards


Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Myths Debunked Revision 5

2002-03-25 Thread Georg Richter

On Tuesday, 26. March 2002 00:28, Michael Bacarella wrote:
 A new revision of MySQL Myths Debunked is now available.

 http://m.bacarella.com/projects/mysqlmyths/

looks nice, and you had a lot of work :)

Maybe it could be interesting to integrate a faq in the mysql-manual and 
implement this?!

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: keeping given order in resulset

2002-03-22 Thread Georg Richter

On Friday, 22. March 2002 10:43, Mickael Bailly wrote:
 Hello !

  I got a table having an auto_increment field, let's say 'id'. tis table
 has a varchar field too, let's say 'name'.

 Is there a way to do something like:

 select id, name from table where id in (5,3,7)

 AND that mysql orders the results the way I gave into the 'IN(...)' clause
 ?

Hi Mickael,

you can use the find_in_set function e.g.
select id,name from table where find_in_set (id, 5,3,7);

But you can't order them in the order specified in set. 

Regards 

Georg

Only for the spam filter: mysql rulez!

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Tables stops at row 126

2002-03-22 Thread Georg Richter

On Friday, 22. March 2002 14:04, [EMAIL PROTECTED] wrote:

Hello,

 I encountered a problem with my pictures-DB which I with PHP.
 The table's stops at row 126, all photos I store in DB afterwards all get
 the ID 127.

 I don't know if it's php or MySQL causing this.

 My table structure is
 field typeAllow Nulls Key Default Value
 Albumid   tinyint(4)  No  None0

 Any solution

please read the manual section column types: 
http://www.mysql.com/doc/C/o/Column_types.html

tinyint has a range from -128 to 127.
If you have more rows than 127 use unsigned tinyint (0..255) or int.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Date and SQL statement

2002-03-20 Thread Georg Richter

On Wednesday, 20. March 2002 18:31, Chuck PUP Payne wrote:
Hi!
 I need to do a search where I am looking at the table that has dates and I
 need to look only things that are 30 days or younger.

 Can so one show me a some SQL statements where you use  , ? And the key
 for equal to or less?


SELECT columns FROM table WHERE date  DATESUB(CURDATE(), INTERVAL 30 DAY);

For a detailed description see: 
http://www.mysql.com/doc/D/a/Date_and_time_functions.html

Regards

Georg

(mysql, query)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: environment variable code fails

2002-03-19 Thread Georg Richter

On Wednesday, 20. March 2002 05:06, jrfoutin wrote:
 ?
 session_start();
 include($DOCUMENT_ROOT/php/main.home.php);
 ?

 The environment variable in this code on index.php is not invoking
 main.home.php page in php folder in htdocs on new server.

 Code worked on previous server setup, but fails on new server. Other php
 calls to MySQL db in ported site code that uses environment variable
 seems to work fine, but this very first start page code fails.

 What can be wrong?--JRF

Hello,

The mysql-Mailinglist is not the correct place for PHP specific questions. 
For php questions post to the PHP Mailinglist ([EMAIL PROTECTED]).

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Difference between Max

2002-03-18 Thread Georg Richter

Am Montag, 18. März 2002 13:58 schrieb Alexander Burbello:
 I would like to know, what difference between the version mysql and
 mysql-max.

 I don't found anything about.

take a look on http://www.mysql.com/downloads/mysql-max-3.23.html

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Insert from select

2002-03-16 Thread Georg Richter

On Saturday, 16. March 2002 09:26, David McInnis wrote:
 I think that I saw a similar query last week some time but I cannot
 remember the sql syntax.  Is it possible to insert from a select.

See http://www.mysql.com/doc/I/N/INSERT_SELECT.html

Regards Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: white background

2002-03-16 Thread Georg Richter

On Sunday, 17. March 2002 05:52, Andreas Dau wrote:
 Hi There H

 Well, it's not really a mysql topic, but it's a bit connected to it. I
 have a website that uses frames. My php script retrieves data from a
 mysql database and displays it. My problem now is: each time that
 specific page loads it first displays a white background, retrieves the
 data and then displays it. It's just a cosmetic issue but I'd like to
 avoid that ;-)

Hello,

the page cannot display any content until the script finished. If you need 
some output before take a look here : http://www.php.net/flush

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: GETTING STARTED !!

2002-03-15 Thread Georg Richter

On Friday, 15. March 2002 09:32, Sammy Lau wrote:

  2. How to check if mysql server is up ?

 [Sammy] trying to connect the mysqlserver is the best way to do the job.

Try: ps -ax | grep mysqld
or mysqladmin ping

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: remote connect

2002-03-15 Thread Georg Richter

On Friday, 15. March 2002 09:41, Mike Estes wrote:
 I can't connect to mysql remotely. I have added my hostname to the host
 table, i have the correct entries in user table,for localhost, my hostname,
 my ip, and even %. i can login locally through the shell, and the uname and
 pass is same for all entries. What else could be wrong. I'm using a php
 script to connect, the error code i get is not in the docs.
 Can't connect to MySQL server on 'chandra056.besthost.net' (10060)
 help please

Did you execute FLUSH PRIVILEGES statement or run mysqladmin flush-privileges 
to tell the server to reload the grant tables?!

Regards 

Georg 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: automating mysql command

2002-03-14 Thread Georg Richter

On Thursday, 14. March 2002 15:13, Andrew Hazen wrote:

 Can I just write the mysql commands as a .sql  file and tell Unix to
 execute it? Or is there another way?

When you already use PHP, why don't use php-cli and execute it via cron?!

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why queries only the first SELECT statement

2002-03-12 Thread Georg Richter

On Sunday, 10. March 2002 09:53, Tshering Norbu wrote:
 Hi list,
 I am trying to making online telephone directory search.
 I have an input form which has input for name and SELECT option for the
 area. Name of this form file is 'searchtel.php'

This is not a mysql problem.
Go to php.net and read the documentation - comparison operators.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: site search

2002-03-11 Thread Georg Richter

On Tuesday, 12. March 2002 06:18, you wrote:
 I want to build a MySQL site search. Can anyone help with my 'overview'

 I have written a perl programme to open each html file, cut out all the
 tags and create a hash of hashes each word is a key, then the secondary key
 is the filename, then the value is the number of occurances in that
 document.

 So how should I make my SQL tables? I thought a 2 column
 (filename:occurances) table for each word would be the best way, but thats
 A LOT of tables. I'd get perl to do all the writing, and I'm sure I could
 get it to work this way.

 But is this the best way? I'm fairly new to MySQL so please be explicit!


Hello.

I'm not sure if building a search engine is the right task for a mysql 
beginner, but maybe this link could be helpful for you:

http://www.howstuffworks.com/search-engine.htm

Maybe its easier to use an existing engine/code like mnogosearch.

Regards

Georg

(mysql, query)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Importing .sql files into database.

2002-03-07 Thread Georg Richter

On Thursday, 7. March 2002 07:18, Josiah Wallingford wrote:

Would the command by mysql -u
 username -p password  dbname filename.sql(mysql)


No, just use

mysql dbname -uusername -ppaswwod  filename.sql

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Quotation Marks in Mysql fields

2002-03-02 Thread Georg Richter

On Saturday, 2. March 2002 08:24, Bill Platt wrote:
 Now, my question is this. How do I get the database to accept
 the quotation marks and apostrophes?? The kind of data I am
 entering into the tables is better with these items left in
 rather than left out.

Hello Bill,

all you have to do is to escape your quotation marks:

 = \   or ' = \'

Regards Georg


sql, query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Number of working hours in a month.

2002-03-02 Thread Georg Richter

On Saturday, 2. March 2002 08:11, Hoo Kok Mun wrote:
 Hi,

 I have look thru the website on date and time functions but nothing that I
 can use.
 http://www.mysql.com/doc/D/a/Date_and_time_functions.html

 How do I dynamically calculate how many working hours in a particular
 month? Has anyone do it before?

Thats really not the way to calculate the working hours  in mysql. You can do 
it in PHP, or if you really need it within a query, write an UDF/NF for.

Regards Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql task scheduler

2002-03-02 Thread Georg Richter

On Saturday, 2. March 2002 09:11, Varsha Gaware wrote:

 Can I schedule a task in mysql ? I want to perform some operation on
 database after a specific period of time. Is it possible ?

Hi,

MySQL currently has no task schedulers. But you can use cron (*nix) or at 
(windows) commands to start tasks/programs which do some database operations.

Regards

Georg

sql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Query structure puzzle

2002-03-02 Thread Georg Richter

On Saturday, 2. March 2002 09:32, John Hughes wrote:
 I have a table with approximately 600 rows. Two of the fields are
 record_date and status  Every record has an entry in the
 record_date in -00-00 format.  The status is either input
 or published (I DID NOT create this colum as ENUM; those are simply

If you have a table with 600 records and you got only 17 and 33 rows, and 
status has only the conditional values published and input - something 
must be wrong. Maybe wrong table or other values in status.

Try SELECT status, count(*) from yourtable group by status to see if there 
are any other values in status.

Regards

Georg

sq, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: is this a mysql Bug ?

2002-03-02 Thread Georg Richter

On Saturday, 2. March 2002 12:10, Jamil Ahmed wrote:
 is this a mysql Bug ?

 curdate()-3 returns 20020299
 curdate()-2 returns 20020300

No it's not a bug! But why do you want substract numbers from a string?!
In this case 2002-03-02 will be interpreted as 20020302 and from this number 
you substract.

When dealing with dates use the Date/Timefunctions described in the Manual.

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Help Restoring a MySQLdumped database...????

2002-02-25 Thread Georg Richter

On Monday, 25. February 2002 17:47, Miretsky, Anya wrote:
 How do I restore a Mysqldump of a database? I've found documentation on how
 to backup a db and have done but I can't figure out how to create a new db
 from my dump file? Please help.

1) Create an empty db yourdb
2) mysql -uuser -ppassword yourdb  yourdump.sql

Thats all

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL php - assigning date variables

2002-02-25 Thread Georg Richter

On Tuesday, 26. February 2002 00:18, Craig Westerman wrote:


 What is proper way to define a variable to include all dates newer than
 1995-01-01?

 What is proper way to define a variable to include all dates older than
 1995-01-01?

 What is proper way to define a variable to include all  dates between
 1995-01-01 and 1998-12-31?

don't use LIKE for your statements. With LIKE '%$query%' you can't use an 
index too.

USE ,  and = instead!

e.g. SELECT fields from table WHERE date  '1995-01-01'

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Beginner needs help

2002-02-25 Thread Georg Richter

On Tuesday, 26. February 2002 00:33, Bob Rea wrote:
 I'm getting a syntax error when I try to insert more two
 sets of values into a table.

 I have looked at the manual on the insert statement, and
 don't see what is wrong.


 ERROR 1064: You have an error in your SQL syntax near
 'values(
 '0-312-25313-3',
 'Coup de Grace',
 'Borthwick',
 'J S',
 St Martin's Minot' at line 21

Correct Syntax is INSERT INTO table (fields,..) VALUES (values,...)
You try to use to insert 2 or more records with one insert statement,
that isnt allowed, and therefore the syntax error.

Regards

Georg

mysql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql not using indexes if select * where a 5

2002-02-21 Thread Georg Richter

On Thursday, 21. February 2002 12:46, Natalino Picone wrote:
 Hi,
 I found that mysql doesn't used indexes if there is a  in the where
 statement...
 for example
 mysql explain select * from testtable where id  5;

It would only make sense to use an index, when you want to select the id 
field (SELECT id from testtable where id  5). Otherwise a table scan would 
be faster.

Regards

George

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: errno: 138

2002-02-13 Thread Georg Richter


 ---snip---
 mysql select * from customers;
 ERROR 1016: Can't open file: 'customers.ISD'. (errno: 138)
 ---snip---

http://www.mysql.com/doc/p/e/perror.html

Regards

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysql_fetch_array

2002-02-12 Thread Georg Richter

On Tuesday, 12. February 2002 03:22, [AFQ]T1T4N wrote:
G'Morning!

Put an echo mysql_error(); behind your mysql_query statement and check error 
ouput.

  html
  body
  ?
  include(config.inc);
  $db = mysql_connect($servidor, $usuariodb, $password);
  mysql_select_db($base,$db);
  ?
  ?
  $result = mysql_query(select nombres,email from usuarios);
+  echo mysql_error();
  while ($row = mysql_fetch_array($result)) {
  echo user_id: .$row[nombres].br\n;
  echo user_id: .$row[0].br\n;
  echo email: .$row[email].br\n;
  echo fullname: .$row[1].br\n;
  }
  mysql_free_result($result);
  ?
  /body
  /html

George

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Error codes

2002-02-12 Thread Georg Richter

On Tuesday, 12. February 2002 06:07, Chetan Lavti wrote:
Hi!
 hi,
 I am using C api's for accessing the MySQL server, I want to make use of
 the mysql api's inside the functions I have made. I do not want to print
 the description of the error, instead, I want to display out the error
 code corresponding to that message.

maybe you're looking for 
http://www.mysql.com/documentation/mysql/bychapter/manual_Clients.html#mysql_errno 
?!

Regards 

Georg


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: error messages

2002-02-12 Thread Georg Richter

On Monday, 11. February 2002 16:15, user lacko wrote:
 Hi!

 Where can I find the MySQL error messages ?
 I have error message can't find file host.MYD errno: 2
 Is it permission problems?


No, it isnt a permission problem. He can't found your file.
To explain your errorcode numbers, use perror errornr to display errormessage.

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: install MySQL

2002-02-12 Thread Georg Richter

On Monday, 11. February 2002 01:54, [EMAIL PROTECTED] wrote:
 Dear Sir,

 I want to install MySQL. The operating system used is Mac OS X. I have
 downloaded MySQL from www.mysql.com. I would be grateful if you could
 supply some tip regarding how to install mysql with Mac OS X. Thanks a
 lot.


Installing MySQL on MacOS is describted in manual section 2.6.5
http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#Mac_OS_X

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: install MySQL

2002-02-10 Thread Georg Richter

On Monday, 11. February 2002 01:54, [EMAIL PROTECTED] wrote:
 Dear Sir,

 I want to install MySQL. The operating system used is Mac OS X. I have
 downloaded MySQL from www.mysql.com. I would be grateful if you could
 supply some tip regarding how to install mysql with Mac OS X. Thanks a
 lot.


Installing MySQL on MacOS is describted in manual section 2.6.5
http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#Mac_OS_X

Georg

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php