Problem in Using two web servers

2001-06-27 Thread Maneet Puri

Dear Sir,

I am trying to connect to the MYSQL server running on web server say A, thru my 
scripts which are hosted on web server say B.

I am not able to connect to the mysql server. I am using PHP for connecting to the 
MYSQL server running on web server A.

Please let me know how can I connect to the MYSQL server thru my scripts which are not 
on the server on which MYSQL server is running.

Waiting for your reply.

Regards,

Maneet



Delete in one table with information from another table

2001-06-27 Thread Johan Nilsson

Is there any way I can delete in one table with information from another
table without doing as the following example?

SELECT column_name FROM table_1
"result = 1,2,3"
DELETE FROM table_2 WHERE column_name = 1
DELETE FROM table_2 WHERE column_name = 2
DELETE FROM table_2 WHERE column_name = 3

Regards,
Johan Nilsson
Software Developer
BeCon Mobile Internet AB, Sweden
E-Mail: [EMAIL PROTECTED]
Web: http://www.beconmobile.com

> -Ursprungligt meddelande-
> Fran: Sinisa Milivojevic [mailto:[EMAIL PROTECTED]]
> Skickat: den 27 juni 2001 14:27
> Till: [EMAIL PROTECTED]
> Kopia: [EMAIL PROTECTED]
> Amne: Re: Delete in many tables
>
>
> Johan Nilsson writes:
> > Hi,
> >
> > I have a problem when I shall delete some records (more than one) from a
> > couple of tables which has relations between each other.
> >
> > One whay to do this and it's to select all elements I want to
> delete from
> > the "primary table" and then delete from the "secondary table" and then
> > later on delete from the primary table, but that is one delete
> query/row? Is
> > there any smart way to do this?
> >
> > Can I user temporary tables when deleting? INSERT...SELECT works but I
> > havn't figured out how to use this temporary table in a DELETE query (I
> > don't think it's possible)?
> >
> > Regards,
> > Johan Nilsson
> > Software Developer
> > BeCon Mobile Internet AB, Sweden
> > E-Mail: [EMAIL PROTECTED]
> > Web: http://www.beconmobile.com
>
>
> DELETE's from multiple tables is in beta testing in 4.0 branch.
>
> And 4.0 will most probably be released in August.
>
> --
> Regards,
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
>  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
> /_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
><___/   www.mysql.com
>


-
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: Creating and dropping foreign key constraints

2001-06-27 Thread Chris Bolt

MySQL doesn't support foreign keys. Did you bother checking the manual?
http://www.mysql.com/doc/M/i/Missing_Foreign_Keys.html

> Hello
>
>  Does mysql support creating and dropping of foreign key constraints?
> i tried it.While creating foreign key constraints it doesn't dive
> any error
> but while dropping i do get some syntax errors.
> what is the reason?
> any suggetions?


-
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 Installation Help Requested.

2001-06-27 Thread Ansgar Becker

> 
> grant all privileges on *.* to jbrunk@"%"
> 
> and it goes into the user table of the database mysql, and shows that the
> host that jbrunk is allowed to connect from is "%"  but it won't let me
> connect from mysqlfront

did you "FLUSH PRIVILEGES" ?

Greetings,
Ansgar


-
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 and =MAX()

2001-06-27 Thread Jorge del Conde

Hi,

What version of MySQL are you using ?
How is price defined ?  .. In the below example, I defined price as
float(9,2).

mysql> SELECT *
-> FROM a;
+---+
| price |
+---+
| 19.95 |
| 10.99 |
|  3.99 |
|  3.45 |
|  1.69 |
|  1.45 |
|  1.25 |
+---+
7 rows in set (0.01 sec)

mysql> SELECT price
-> FROM a
-> HAVING price=MAX(price);
+---+
| price |
+---+
| 19.95 |
+---+
1 row in set (0.01 sec)

mysql>

Regards,
Jorge

For technical support contracts, visit https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Jorge del Conde <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
/_/  /_/\_, /___/\___\_\___/   Mexico City, Mexico
   <___/   www.mysql.com



-Original Message-
From: bobby [mailto:bobby] On Behalf Of R Talbot
Sent: Wednesday, June 27, 2001 8:21 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Select and =MAX()


Jorge
  When I issue your suggested commands here are the resulted rows..
mysql> SELECT price
->FROM shop
->HAVING price=MAX(price);
Empty set (0.01 sec)

But when I issue...
mysql> select price from shop order by price desc;
+---+
| price |
+---+
| 19.95 |
| 10.99 |
|  3.99 |
|  3.45 |
|  1.69 |
|  1.45 |
|  1.25 |
+---+
7 rows in set (0.01 sec)

Why??


-
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: Select and =MAX()

2001-06-27 Thread R Talbot

Jorge
  When I issue your suggested commands here are the resulted rows..
mysql> SELECT price
->FROM shop
->HAVING price=MAX(price);
Empty set (0.01 sec)

But when I issue...
mysql> select price from shop order by price desc;
+---+
| price |
+---+
| 19.95 |
| 10.99 |
|  3.99 |
|  3.45 |
|  1.69 |
|  1.45 |
|  1.25 |
+---+
7 rows in set (0.01 sec)

Why??


-
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




Creating and dropping foreign key constraints

2001-06-27 Thread Divakar

Hello

 Does mysql support creating and dropping of foreign key constraints?
i tried it.While creating foreign key constraints it doesn't dive any error
but while dropping i do get some syntax errors.
what is the reason?
any suggetions?

regards
Div


-
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: Hello please help me out

2001-06-27 Thread Paul DuBois

At 9:19 AM +0530 6/28/01, Divakar wrote:
>Hi list
>
>   I am a beginner in the field of mysql
>I would like to know whether it is possible to run sql scripts(a .sql file)
>in mysql.
>if yes please some body tell me how do we do that,.

The MySQL Reference Manual is your friend:

http://www.mysql.com/doc/M/u/Multiple_sql_commands.html

>
>regards
>Div


-- 
Paul DuBois, [EMAIL PROTECTED]

-
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




Hello please help me out

2001-06-27 Thread Divakar

Hi list

  I am a beginner in the field of mysql
I would like to know whether it is possible to run sql scripts(a .sql file)
in mysql.
if yes please some body tell me how do we do that,.

regards
Div


-
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[2]: Duplicate entry

2001-06-27 Thread Werner Stuerenburg

>> I get Duplicate entry errors quite frequently. As a rule in these

Well, as it turns out I found the solution right now myself. I am
testing locally (so nobody touches the tables but me) and delete
entries before I insert them again.

Here I have that strange error! The table is ok. What's
happening?

Very easy, but your would not expect MySQL to behave that way,
would you? Do you see what causes the error?

DELETE FROM sendIssue
WHERE idEdIssue = '117' 
AND titelIssue = 'Tipp: Leben retten '

INSERT INTO sendIssue 
(idEdIssue, titelIssue, versionIssue, itemIssue) 
VALUES ('117', 'Tipp: Leben retten ', 'h', 'etc.

Duplicate entry '117-h-Tipp: Leben retten' for key 2

The key value is 'Tipp: Leben retten ' and is followed by a
white space (in both cases, of course). If I trim the value,
things are fine. This is the definition:

CREATE TABLE sendIssue (
   idIssue smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
   idEdIssue smallint(5) unsigned DEFAULT '0' NOT NULL,
   titelIssue varchar(100) NOT NULL,
   versionIssue char(1) NOT NULL,
   itemIssue mediumtext NOT NULL,
   PRIMARY KEY (idIssue),
   UNIQUE ivi (idEdIssue, versionIssue, titelIssue)
);

So, I assume that the value has the white space, but the key has
not. Therefore the record is not found. Well, it appears to me
that I work with a combined key here and don't use the middle
value in my delete query. It doesn't matter if I truncate the
space.

In the other cases, I have keys on single fields, but I don't
trim the values. I will try this.

Am I right in my diagnosis? And if so, what does this tell about
query design? Or is something totally different going on here?

One thing for sure: in the case I observed I can produce the
desired result: error with sace, fine without.


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




Remote Connection Strangeness

2001-06-27 Thread Anatole

A bit bizarre:
When I connect to MySQL through the localhost I have no problems; however
when I connect from a remote server I get the error "Can't initialize
character set 13 (path:default)  in 

The localhost and the remote host both have versions of MySQL installed (the
remote host doesn't have the sjis charset set as its default, the localhost
does). However, it was my understanding that the remote host would use all
the functionality of the host it is connecting to.

I'm a bit confused by this error and it makes me think that I don't quite
fully understand what is going on when a remote connection is made. Any
clues? If so, please send a CC to my email address. TIA :-]

- anatole


-
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 stop this script running when the page is loaded?

2001-06-27 Thread Werner Stuerenburg

> I only want this INSERT INTO php sql script to run when the input button is
> pressed. How do I stop the script running when the page is loaded?

You have to make the query dependend on the action of the user.
So you put a condition into it:

if ($Submit) {
   //do your thing
}

Your form calls itself. If called first, $Submit is not defined.
When the user presses submit, the page is called again, but this
time the array $GLOBALS[HTTP_POST_VARS] is filled.

$GLOBALS[HTTP_POST_VARS][Submit] has value Save, and php creates
a variable $Submit with that value automatically, so you can use
this to test.

But generally, it is not that good an idea, as you can send your
form without using the submit button on IE (and on Netscape, if
there is only one field, as is typical on search boxes).

So rather than use

   if ($Submit)

you play safe with

if (isset($Submit))


You can look at it with something like the following code (which
is what I use for testing puposes - I put it into a separate file
and just include this file if I want to see what's going on. It
shows arrays, too):

if (is_array($GLOBALS[HTTP_POST_VARS])){
reset($GLOBALS[HTTP_POST_VARS]);
while(list($key, $val) = each($GLOBALS[HTTP_POST_VARS])) {
if (is_array($val)) {
echo '$' . $key ." is Array";
while(list($ky, $vl) = each($val)) {
echo $ky .": ". $vl . "\n";
}
echo "";
}
else {
echo '$' . $key ." = ". $val . "";
}
}
reset($GLOBALS[HTTP_POST_VARS]);
echo "HTTP_POST_VARS -sessionID-$sessionID--*Test\n";
}
else{
echo "no HTTP_POST_VARS -sessionID-$sessionID--*Test\n";
}
echo "\n";


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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: Got timeout reading communication packets

2001-06-27 Thread Seth Northrop


Re: large replaces truncating...

I'm still trying to figure out what's going on here.. I've now tried it in
PHP and am getting the same response... Ie, given this simple script:




The data field in the table truncates like this:

| 
12750   12751   12752   12753   12754   12755   12756   12757   12758
12759   12760   12761   12762   12763   12764   12765   12766   12767
12768   12769   12770   12771   12772   12773   1 |

It always truncates in the exact same location.  I can drop the table and
recreate but it still truncates in the exact same location.

The query, when echoed out is sane ending indeed on 9.

Here's the table again:
mysql> desc measurement_extended_data;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| content_typeID  | tinyint(3) unsigned   |  | PRI | 0   |   |
| contentID   | int(10) unsigned  |  | PRI | 0   |   |
| arrayID | smallint(5) unsigned  |  | PRI | 0   |   |
| positionID  | mediumint(8) unsigned |  | PRI | 0   |   |
| testID  | smallint(5) unsigned  |  | PRI | 0   |   |
| iteration   | smallint(5) unsigned  |  | PRI | 0   |   |
| test_locationID | smallint(5) unsigned  |  | MUL | 0   |   |
| date_added  | int(10) unsigned  |  | | 0   |   |
| added_by| mediumint(8) unsigned |  | | 0   |   |
| data| blob  |  | | |   |
+-+---+--+-+-+---+

(Note.. I've even tried changing data to a text NOT NULL).. exact same
truncation location).

The php script above reports no error.

** The UPDATE log (when turned on)  shows the ENTIRE query (ie.. the query
is at least making it to the database long enough to be logged).

Again.. the my.cnf:

# MySQL Configuration File
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options

# This will be passed to all mysql clients
[client]
port= 3306
socket  = /tmp/mysql.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# The MySQL server
[mysqld]
port= 3306
socket  = /tmp/mysql.sock
skip-locking
set-variable= key_buffer=256M
set-variable= max_allowed_packet=7M  # INCREASED FOR MORE DATA
set-variable= thread_stack=128K
set-variable= back_log=50
set-variable= max_connections=2250
set-variable= tmp_table_size=15M
set-variable= table_cache=6000
set-variable= sort_buffer=3584K
set-variable= join_buffer=512K
set-variable= connect_timeout=2
set-variable= record_buffer=1M
set-variable= flush_time=900
set-variable= wait_timeout=300

[mysqldump]
quick
set-variable= max_allowed_packet=16M

[mysql]
no-auto-rehash

[myisamchk]
set-variable= key_buffer=32M
set-variable= sort_buffer_size=48M

Any new ideas?

Seth

> Seth Northrop writes:
> >
> >
> > 010624 19:44:23  Aborted connection 231 to db: 'unconnected' user: 'root'
> > host: `localhost' (Got timeout reading communication packets)
> >
> >
> The above only implies that your program exited without calling
> mysql_close(). Nothing to do with your problem.
>
> But, as I told you , you did not quote string  constants.
>
> And shoot out your resulting string to some file for inspection. That
> might help you find your error.
>
>
>

---
Seth Northrop
Manager of Information Technology
Reflectivity, Inc.
3910 Freedom Circle, Suite 103
Santa Clara, CA 95054
voice:  408-970-8881 x147
fax:408-970-8840
http://www.reflectivity.com/


-
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[2]: Duplicate entry

2001-06-27 Thread Werner Stuerenburg

> Try to design your tables so, that it would be impossible to enter
> dublicate primary keys. And don't let users (if it's  CGi application) to
> set or play with your primary keys (well, we could talk more about this
> one).

> If you used AUTO_INCREMENT, or UNIQUE, I bet you wouldn't have such
> problem. 

That is the case, and that is why I get the error.

This is a typical setting:

CREATE TABLE staticStrings (
   auto mediumint(4) unsigned DEFAULT '0' NOT NULL auto_increment,
   ruri varchar(255) DEFAULT '0' NOT NULL,
   staticString mediumtext NOT NULL,
   PRIMARY KEY (auto),
   UNIQUE ruri (ruri)
);

You see, ruri is unique. We get an error on that key.

This is the error:

Error: Duplicate entry 'static/75e' for key 2,
query:
Invalid SQL: INSERT INTO staticStrings
(ruri, staticString)
VALUES ('static/75e', 'query($q);//se if we have it already
$test = $db->nf();
if (!$test){//no, grab it
$datum = date("Y-m-d H:i:s");
$q = "INSERT INTO sessData
(sid, varsVal, datum)
VALUES ('$sessionID', 'dummySession', '$datum')";
$db->query($q);
if ($db->Errno) getSessionID();
//if error, try again, just in case
}//else it is taken, get next
}
}

Of course, nobody can play with the tables. They are served by
the program exclusively.

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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 stop this script running when the page is loaded?

2001-06-27 Thread David Robley

On Thu, 28 Jun 2001 10:36, Stephen Reynolds wrote:
> I only want this INSERT INTO php sql script to run when the input
> button is pressed. How do I stop the script running when the page is
> loaded?
>
> +++ Begin HTML Page +++
>
>  //create database connection
> include("d:\bin\Apache\include\dbcon.inc");
> ?>
> 
> 
> Test Script
> 
> 
> 
> First Name
> 
>
> Last Name
> 
>
> 
> 
>
>  $sql = "INSERT INTO address (first_name, last_name) VALUES
> ('$first_name', '$last_name')";
> $result = mysql_query($sql,$dbcon);
> print ("Your new record has been entered.");
> ?>
> 
> 
>
> +++ End HTML Page +++
>
> Regards, Steve

You only want the INSERT to run when the INPUT button has been clicked? 
Test to see if the variable $Submit is empty - if not the button has been 
clicked and you can do the insert (after you validate the incoming data, 
of course). You might want to only show the input fields if the action is 
not an insert.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   (C) 1992 Wild Bill's Machine Gun Shop and House of Wax.

-
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




Innodb and timestamps

2001-06-27 Thread Noel Clarkson

Hi there,

I'm using MaxSQL 3.23.39 and have set up an innodb table but when I run an 
update statement the timestamp field does not update automatically.  Is 
anyone else experiencing this, or is it an expected behaviour of innodb 
tables?  I couldn't find anything in the manual saying that this was 
different for innodb tables.  Below is an example of what I did and the 
results.

running on Red Hat linux 6.1.

cheers,

noel

mysql> create table tbl_test(name varchar(10), lastedit timestamp) 
type=innodb;
Query OK, 0 rows affected (0.04 sec)

mysql> describe tbl_test;
+--+---+--+-+-+---+
| Field| Type  | Null | Key | Default | Extra |
+--+---+--+-+-+---+
| name | varchar(10)   | YES  | | NULL|   |
| lastedit | timestamp(14) | YES  | | NULL|   |
+--+---+--+-+-+---+
2 rows in set (0.01 sec)

mysql> insert into tbl_test(name) values('bob');
Query OK, 1 row affected (0.00 sec)

mysql> insert into tbl_test(name) values('ted');
Query OK, 1 row affected (0.00 sec)

mysql> select * from tbl_test;
+--++
| name | lastedit   |
+--++
| bob  | 20010613171610 |
| ted  | 20010613171618 |
+--++
2 rows in set (0.00 sec)

mysql> update tbl_test set name='fred' where name='ted';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> commit;
Query OK, 0 rows affected (0.03 sec)

mysql> select * from tbl_test;
+--++
| name | lastedit   |
+--++
| bob  | 20010613171610 |
| fred | 20010613171618 |
+--++
2 rows in set (0.00 sec)


-
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: Bug in Like with longblob

2001-06-27 Thread Sherzod Ruzmetov


It is a binary colum


-
-sherzodR

phone: (517) 774-2702
email: [EMAIL PROTECTED]

On Wed, 27 Jun 2001, Tobias Eggendorfer wrote:

> Hi,
> 
> I suppose I found a bug :-)
> According to  LIKE in a SELECT-query is case-insensitive. In fact, 
> it is, when using it on varchars. But with a longblod, it is not. 
> So if the table has column "test longblob" and there is a colum 
> where test is set to "xxAbcdx", the query SELECT * 
> FROM testtable WHERE test LIKE "%abcd%"; will result in an 
> empty set. :-(
> I tried it on MySQL 3.23.36 on a RedHat 7.0 box.
> 
> Regards
> 
>   Tobias
> 
> ---
> Tobias Eggendorfer
> E-Mail: [EMAIL PROTECTED]
> 
> -
> 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




How do I stop this script running when the page is loaded?

2001-06-27 Thread Stephen Reynolds

I only want this INSERT INTO php sql script to run when the input button is 
pressed. How do I stop the script running when the page is loaded?

+++ Begin HTML Page +++




Test Script



First Name


Last Name









+++ End HTML Page +++

Regards, Steve

==
Stephen Reynolds
[EMAIL PROTECTED]
http://www.sreynolds.net


-
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: Duplicate entry

2001-06-27 Thread Sherzod Ruzmetov

Try to design your tables so, that it would be impossible to enter
dublicate primary keys. And don't let users (if it's  CGi application) to
set or play with your primary keys (well, we could talk more about this
one).

If you used AUTO_INCREMENT, or UNIQUE, I bet you wouldn't have such
problem. 

Still, dealing with this issue depends on the nature of the application


-sherzodR


-
-sherzodR

phone: (517) 774-2702
email: [EMAIL PROTECTED]

On Wed, 27 Jun 2001, Werner Stuerenburg wrote:

> I get Duplicate entry errors quite frequently. As a rule in these
> cases, I check whether a record with this key exists, and in case
> it does not, take action and insert the record. So there is a
> minimal time lag, where by chance someone else may have inserted
> exactly that record. Am I right?
> 
> Another explanation is that the key went wrong, and indeed in
> most cases this is so, whence I get a number of such erros in a
> row (I send myself an email automatically whenever an error
> occurs so that I get to know it). But sometimes I get this error
> in a single instance an ismchk finds no fault with the table.
> 
> The key in turn may turn wrong when error log says
> 
> mysqld process hanging, pid 28635 - killed
> 
> or
> 
> Aborted connection 34111 to db: 'pferdezeitung' user: 'pferdezeitung'
> 
> More about the latter if someone is interested. Anybody any
> suggestions? I myself am clueless.
> 
> -- 
> Herzlich
> Werner Stuerenburg
> 
> _
> ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
> Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
> http://pferdezeitung.de
> 
> 
> 
> -
> 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: Table Creation

2001-06-27 Thread Sherzod Ruzmetov

Please, go through the manual found at http://www.mysql.com


-
-sherzodR

phone: (517) 774-2702
email: [EMAIL PROTECTED]

On Wed, 27 Jun 2001, Richard Bergeron wrote:

> Hi,
>   
> I'm new to this flavor of SQL, I've downloaded WinMySQLadmin version 1.1 for Win98,
> I seem to be missing components?
>   
> 1. I can only create Databases not Tables?
> 2. I'm don't know which source editor/compiler I can use?
>   
> Can anyone help?
>   
> Thanks.Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
> 


-
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 MYODBC not support Lotus Approach

2001-06-27 Thread max

>- Original Message -
>From: "phil" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, June 27, 2001 6:06 PM
>Subject: Does MYODBC not support Lotus Approach


>I can't get it to work... does MYODBC not support Lotus Approach

Hi Phil,

I can confirm u that Approach can work with Mysql via MyODBC  I think
that is not good idea to use Approach as GUI for a mysql db/tables, but for
my personal experience they work together 

max



-
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: redhat 7.1 setting up mysql

2001-06-27 Thread Luis

Trond Eivind Glomsrød wrote:

> "wkd" <[EMAIL PROTECTED]> writes:
>
> > 1.  (*) text/plain
> >
> > I'm setting up mysql for redhat 7.1 to be used with php and apache. However, in 
>the past I've had problems with the setup. I had a person come in and setup mysql on 
>redhat 6.0 ( 2 1/2 days later he had it running) the program has been riddle with 
>bugs. The questions are: ( note: mysql is not installed on my computer from redhat. 
>I've had problems with the default setting that come with redhat in the past and did 
>not install then).
> >
> > 1) what rpm files should I used and is there an order to them?
>
> mysql and mysql-server (mysql-devel for program development) - just
> install the rpms ("rpm -Uvh mysql mysql-server") and start the service
> ("service mysqld start", which will initialize the database for the
> first time and start the server)
>
> > 2) when installing rpm files can you or how can you tell the program
> > where to install the program?
>
> This information is embedded in the package - there is a relocate
> switch, but for most packages this can create some unexpected results
>
> --
> Trond Eivind Glomsrød
> Red Hat, Inc.
>
> -
> 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

Well the rpm that came with rh 7.1 dont use. Download it from the net. but download 
the lower case one. I have a link on how to setup apache, mysql and php click on the 
link below it should show you  how to do it.


http://www.php.net/manual/en/install.apache.php

good luck let me know if you need help with it. Once again i started the mysql book, 
since i been putting it off. kind of like it.


-
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




A join query does not produce unique column names in result

2001-06-27 Thread Joshua J. Kugler

(mysqlbug died because it couldn't find rmail.  So, I'm sending this 
manually.)

>Description:
I have a join pulling two columns (both named 'id') from two different 
tables. When these results are returned, in the result set, they are both 
called 'id', with no way to refer to them explicitly.  I would expect them to 
be named table1.id and table2.id.  Even MS Access is smart enough to qualify 
their names: that is how I discovered the bug.  I moved from an attached 
table query to an ODBCDirect query, and leg_text.id was no longer in the 
recordset. :)

>How-To-Repeat:
This query:
SELECT leg_header.id, leg_text.id, body_list.leg_char, 
leg_types.leg_type_char, leg_header.session_number, leg_header.leg_number, 
leg_text.leg_version, leg_states.state_desc, leg_header.original_date, 
body_list_1.body_name, leg_text.full_title, leg_text.short_title, 
leg_text.leg_preamble, leg_text.active_text, leg_text.leg_purpose, 
leg_text.fiscal_impact, IF(sponsor_type_id=1,CONCAT(people.fname, ' ', 
people.lname), CONCAT(body_list_2.body_name, ' Committee')) AS primary_sponsor
FROM leg_header INNER JOIN body_list ON leg_header.body_id_of_origin = 
body_list.id
INNER JOIN leg_types ON leg_header.leg_type_id = leg_types.id
INNER JOIN leg_states ON leg_header.current_state_id = leg_states.id
LEFT JOIN people ON leg_header.primary_sponsor_id = people.id
LEFT JOIN body_list AS body_list_1 ON leg_header.latest_committee_id = 
body_list_1.id
LEFT JOIN body_list AS body_list_2 ON leg_header.primary_sponsor_id = 
body_list_2.id
INNER JOIN leg_text ON leg_header.current_version_id = leg_text.id
WHERE leg_header.id = 8

For purpose of example, I ran this query:

mysql> SELECT leg_header.id, leg_text.id
FROM leg_header INNER JOIN body_list ON leg_header.body_id_of_origin = 
body_list.id
INNER JOIN leg_types ON leg_header.leg_type_id = leg_types.id
INNER JOIN leg_states ON leg_header.current_state_id =leg_states.id
LEFT JOIN people ON leg_header.primary_sponsor_id = people.id
LEFT JOIN body_list AS body_list_1 ON 
leg_header.latest_committee_id = body_list_1.id
LEFT JOIN body_list AS body_list_2 ON 
leg_header.primary_sponsor_id = body_list_2.id
INNER JOIN leg_text ON leg_header.current_version_id = leg_text.id
WHERE leg_header.id = 8\g
+++
| id | id |
+++
|  8 | 15 |
+++
1 row in set (0.01 sec)
 
mysql>

That could make it VERY hard to get at your data, no? :)

>Fix:
On second column with same name, use an AS to rename the column.
It works, but is a kludge.  If there is a conflict with column names, they
should be returned as table.column in the result set.
Possibly this: Since SELECTing two columns of the same name requires you to 
qualify them with the table name, then MySQL should return any column the way 
it is SELECTed. Thus, if you SELECT table1.id, table2.id, then in in the 
result set, it should have table1.id and table2.id as the column headings.

>Submitter-Id:  Joshua J. Kugler
>Originator:Joshua J. Kugler
>Organization: Associated Students of the University of Alaska Fairbanks
>MySQL support: none
>Synopsis:  Join query does not produce unique names in result
>Severity:  serious
>Priority:  medium
>Category:  mysql
>Class: sw-bug
>Release:   mysql-3.23.38 (Source distribution)


>Environment: Dual PIII-500, 512MB RAM, 3 9GB SCSI on a RAID 5
System: Linux deuel.as.uaf.edu 2.4.4-jjk-20010430 #2 SMP Mon Apr 30 17:14:00 
AKDT 2001 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC:
lrwxrwxrwx   1 root root   13 Feb 22 15:50 /lib/libc.so.6 -> 
libc-2.1.3.so
-rwxr-xr-x   1 root root  5257684 Jan 18 07:39 /lib/libc-2.1.3.so
-rw-r--r--   1 root root 20732410 Jan 18 07:38 /usr/lib/libc.a
-rw-r--r--   1 root root  178 Jan 18 07:38 /usr/lib/libc.so
Configure command: ./configure  --prefix=/usr/local/mysql 
--localstatedir=/usr/local/mysql/data --enable-assembler --$
Perl: This is perl, version 5.005_03 built for i686-linux
-- 
Joshua Kugler, Information Services Director
Associated Students of the University of Alaska Fairbanks
[EMAIL PROTECTED], 907-474-7601

-
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: Bug in Like with longblob

2001-06-27 Thread Paul DuBois

At 11:56 PM +0200 6/27/01, Tobias Eggendorfer wrote:
>Hi,
>
>I suppose I found a bug :-)
>According to  LIKE in a SELECT-query is case-insensitive. In fact,
>it is, when using it on varchars. But with a longblod, it is not.
>So if the table has column "test longblob" and there is a colum
>where test is set to "xxAbcdx", the query SELECT *
>FROM testtable WHERE test LIKE "%abcd%"; will result in an
>empty set. :-(
>I tried it on MySQL 3.23.36 on a RedHat 7.0 box.

Like is case insensitive _by default_.  If either operand is a binary
string, however, it's case sensitive.

You can use ALTER TABLE to convert your column to TEXT if you want it
to be case insensitive.

>
>Regards
>
>   Tobias
>
>---
>Tobias Eggendorfer
>E-Mail: [EMAIL PROTECTED]


-- 
Paul DuBois, [EMAIL PROTECTED]

-
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: Bug in Like with longblob

2001-06-27 Thread Werner Stuerenburg

> I suppose I found a bug :-)
> According to  LIKE in a SELECT-query is case-insensitive. In fact, 

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

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BLOB


The only difference between BLOB and TEXT types is that sorting
and comparison is performed in case-sensitive fashion for BLOB
values and case-insensitive fashion for TEXT values. In other
words, a TEXT is a case-insensitive BLOB.


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




thoughts on raw file systems

2001-06-27 Thread Wyly Wade
Title: Blank



Can you use a raw partition with MySQL much 
like you can with Oracle or Sybase?
 
Wyly Wade
Forefront Inc
1413 S. Howard Ave
Suit 104
Tampa Fl, 33606
813-253-2267
 


Re: Bug in Like with longblob

2001-06-27 Thread Colin Faber

a blob is by definition case sensitive hence 'Binary Large Object' This
is not a bug but by design, If you want a non-Binary field to store
large text objects then you should be using the 'TEXT' data type not the
'BLOB' data type.



Tobias Eggendorfer wrote:
> 
> Hi,
> 
> I suppose I found a bug :-)
> According to  LIKE in a SELECT-query is case-insensitive. In fact,
> it is, when using it on varchars. But with a longblod, it is not.
> So if the table has column "test longblob" and there is a colum
> where test is set to "xxAbcdx", the query SELECT *
> FROM testtable WHERE test LIKE "%abcd%"; will result in an
> empty set. :-(
> I tried it on MySQL 3.23.36 on a RedHat 7.0 box.
> 
> Regards
> 
>   Tobias
> 
> ---
> Tobias Eggendorfer
> E-Mail: [EMAIL PROTECTED]
> 
> -
> 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: select query for duplicate records

2001-06-27 Thread Paul DuBois

At 5:46 PM -0500 6/27/01, Pete Kuczynski wrote:
>Thanks Paul!
>ps works great!
>I modified the database with a UNIQUE column like you recommended
>earlier, this will now help in the PHP script to trap the duplicate
>entry and advise the user of the dup.

But if hostname now has a UNIQUE index on it, it won't even be possible
for your table to have duplicate hostname values, other than NULL.

Probably all you need to do is just go ahead and try to insert the record,
and if mysql_affected_rows() is 0, it was a duplicate and was rejected.

>
> // check for duplicate row
> $query = "SELECT hostname, COUNT(*) AS count FROM asset
>   GROUP BY hostname HAVING count > 1
> $result = mysql_query($query);
> // check if row is returned, if yes error, if no insert
> if (mysql_num_rows($result) != 0) {
> echo "error";
> } else {
> // DO INSERT
> }
> ?>
>
>Pete


-- 
Paul DuBois, [EMAIL PROTECTED]

-
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 query for duplicate records

2001-06-27 Thread Pete Kuczynski

Thanks Paul!
ps works great!
I modified the database with a UNIQUE column like you recommended
earlier, this will now help in the PHP script to trap the duplicate
entry and advise the user of the dup.

 1
$result = mysql_query($query);
// check if row is returned, if yes error, if no insert
if (mysql_num_rows($result) != 0) {
echo "error";
} else {
// DO INSERT
}
?>

Pete

Paul DuBois wrote:
> 
> At 3:13 PM -0500 6/27/01, Pete Kuczynski wrote:
> >Hi,
> >How would a word a select statment, to search a database for duplicate
> >entries in one field.
> >
> >For example, the fields: device, hostname, IP, comments
> >
> >I want to find all instances where there my be two devices with the same
> >hostname.
> 
> SELECT hostname, COUNT(*) AS count FROM tbl_name
> GROUP BY hostname HAVING count > 1
> 
> >
> >Thanks!
> >
> >Pete
> >--
> >___
> >Pete Kuczynski
> >Principal Field Engineer
> >DHL Airways Inc.
> >Infrastructure Technology & Services
> >(773)-462-9758
> >24/7 Helpdesk 1-800-434-5767
> 
> --
> Paul DuBois, [EMAIL PROTECTED]

-- 
___
Pete Kuczynski
Principal Field Engineer
DHL Airways Inc.
Infrastructure Technology & Services
(773)-462-9758
24/7 Helpdesk 1-800-434-5767


-
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 query for duplicate records

2001-06-27 Thread Bob Hall

>Hi,
>How would a word a select statment, to search a database for duplicate
>entries in one field.
>
>For example, the fields: device, hostname, IP, comments
>
>I want to find all instances where there my be two devices with the same
>hostname.
>
>Thanks!
>
>Pete

Sir, try the following.

SELECT DISTINCT device, hostname
FROM 
GROUP BY hostname
HAVING Count(*) > 1;

Only one of the two or more devices will be listed.

If you want to include cases where the same device has been listed 
twice with the same hostname, leave out the DISTINCT.

WOMM (Works On My Machine)

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database

-
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: deleting data from a table

2001-06-27 Thread massey


Are you using PHPBB? There might be better answeres at http://www.nukeforums.com/  
I use the and my Filters seem to be fine but that is an interesting question you have.

Cheers

Mike






-Original Message-
FROM: Mark Wakim
TO: [EMAIL PROTECTED]
DATE: Wed 6/27/01 15:35
SUBJECT: deleting data from a table

Hi everyone I know its very simple to delete or modify table's but what =
if someone is swearing in your message board and your filters still let =
him in and its being displayed in your board and you want to delete his =
post how do you do that?


Mark
([EMAIL PROTECTED])


-
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 query for duplicate records

2001-06-27 Thread Hannes Niedner

Peter,

That comes pretty close to the distinct -thread in this mailinglist.
You might want to try:

SELECT device, count(hostname)
FROM your_table
GROUP BY device
HAVING count(hostname)>1;

This would display all devices with at least 2 (or more) hostnames.
If you always have the same IP address, and the same comments allocated to a
certain device, then and only then you can add IP and comments to the SELECT
and GROUP BY statement.

Vary this as needed or pleased

Hope that helps 
And the manual is great too:
http://www.mysql.com/doc/G/r/Group_by_functions.html
http://www.mysql.com/doc/S/E/SELECT.html

Hannes


On 6/27/01 1:13 PM, "Pete Kuczynski" <[EMAIL PROTECTED]> wrote:

> Hi,
> How would a word a select statment, to search a database for duplicate
> entries in one field.
> 
> For example, the fields: device, hostname, IP, comments
> 
> I want to find all instances where there my be two devices with the same
> hostname.
> 
> Thanks!
> 
> Pete


-
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: host.ISM

2001-06-27 Thread Skot

Werner Stuerenburg wrote:
> 
> > I just updated MySQL 2.22 to 2.23 and when I went to restart the server,
> > I got this error message in the /var/lib/mysql/err.log file:
> > 010627 11:19:22  /usr/sbin/mysqld: Can't open file: 'host.ISM'. (errno:
> > -1)
> > mysqld ended on  Wed Jun 27 11:19:22 PDT 2001
> 
> See http://www.mysql.com/doc/R/e/Repair.html

I can't use any SQL commands, I can't even connect to mysql database
without a running server, and the server won't start because it's
looking for 'host.ISM' file, which I have never seen on my server.  I
only have host.MYD and host.MYI files there, no .ISM anythings.

Thanks.

-
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 query for duplicate records

2001-06-27 Thread Paul DuBois

At 3:13 PM -0500 6/27/01, Pete Kuczynski wrote:
>Hi,
>How would a word a select statment, to search a database for duplicate
>entries in one field.
>
>For example, the fields: device, hostname, IP, comments
>
>I want to find all instances where there my be two devices with the same
>hostname.

SELECT hostname, COUNT(*) AS count FROM tbl_name
GROUP BY hostname HAVING count > 1


>
>Thanks!
>
>Pete
>--
>___
>Pete Kuczynski
>Principal Field Engineer
>DHL Airways Inc.
>Infrastructure Technology & Services
>(773)-462-9758
>24/7 Helpdesk 1-800-434-5767


-- 
Paul DuBois, [EMAIL PROTECTED]

-
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




Bug in Like with longblob

2001-06-27 Thread Tobias Eggendorfer

Hi,

I suppose I found a bug :-)
According to  LIKE in a SELECT-query is case-insensitive. In fact, 
it is, when using it on varchars. But with a longblod, it is not. 
So if the table has column "test longblob" and there is a colum 
where test is set to "xxAbcdx", the query SELECT * 
FROM testtable WHERE test LIKE "%abcd%"; will result in an 
empty set. :-(
I tried it on MySQL 3.23.36 on a RedHat 7.0 box.

Regards

  Tobias

---
Tobias Eggendorfer
E-Mail: [EMAIL PROTECTED]

-
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




Duplicate entry

2001-06-27 Thread Werner Stuerenburg

I get Duplicate entry errors quite frequently. As a rule in these
cases, I check whether a record with this key exists, and in case
it does not, take action and insert the record. So there is a
minimal time lag, where by chance someone else may have inserted
exactly that record. Am I right?

Another explanation is that the key went wrong, and indeed in
most cases this is so, whence I get a number of such erros in a
row (I send myself an email automatically whenever an error
occurs so that I get to know it). But sometimes I get this error
in a single instance an ismchk finds no fault with the table.

The key in turn may turn wrong when error log says

mysqld process hanging, pid 28635 - killed

or

Aborted connection 34111 to db: 'pferdezeitung' user: 'pferdezeitung'

More about the latter if someone is interested. Anybody any
suggestions? I myself am clueless.

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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: deleting data from a table

2001-06-27 Thread MikeBlezien

On Wed, 27 Jun 2001 16:06:36 -0500, "Mark Wakim" <[EMAIL PROTECTED]>   wrote:

Well depending how your tracking this person, and message related to him, I
would image some sort of an ID value assigned to the poster would be the easiest
means. something like:

DELETE FROM table_posts WHERE userid = 'X'
AND message_id = 'X';

or something to this affect. 


>>Hi everyone I know its very simple to delete or modify table's but what if someone 
>is swearing in your message board and your filters still let him in and its being 
>displayed in your board and you want to delete his post how do you do that?
>>
>>
>>Mark
>>([EMAIL PROTECTED])

Mike(mickalo)Blezien

Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=
















-
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: redhat 7.1 setting up mysql

2001-06-27 Thread Trond Eivind Glomsrød

"wkd" <[EMAIL PROTECTED]> writes:

> 1.  (*) text/plain  
> 
> I'm setting up mysql for redhat 7.1 to be used with php and apache. However, in the 
>past I've had problems with the setup. I had a person come in and setup mysql on 
>redhat 6.0 ( 2 1/2 days later he had it running) the program has been riddle with 
>bugs. The questions are: ( note: mysql is not installed on my computer from redhat. 
>I've had problems with the default setting that come with redhat in the past and did 
>not install then). 
> 
> 1) what rpm files should I used and is there an order to them? 

mysql and mysql-server (mysql-devel for program development) - just
install the rpms ("rpm -Uvh mysql mysql-server") and start the service
("service mysqld start", which will initialize the database for the
first time and start the server)
 
> 2) when installing rpm files can you or how can you tell the program
> where to install the program? 

This information is embedded in the package - there is a relocate
switch, but for most packages this can create some unexpected results


-- 
Trond Eivind Glomsrød
Red Hat, Inc.

-
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




Table Creation

2001-06-27 Thread Richard Bergeron

Hi,
  
I'm new to this flavor of SQL, I've downloaded WinMySQLadmin version 1.1 for Win98,
I seem to be missing components?
  
1. I can only create Databases not Tables?
2. I'm don't know which source editor/compiler I can use?
  
Can anyone help?
  
Thanks.Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com



Re: host.ISM

2001-06-27 Thread Werner Stuerenburg

> I just updated MySQL 2.22 to 2.23 and when I went to restart the server,
> I got this error message in the /var/lib/mysql/err.log file:
> 010627 11:19:22  /usr/sbin/mysqld: Can't open file: 'host.ISM'. (errno:
> -1)
> mysqld ended on  Wed Jun 27 11:19:22 PDT 2001

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


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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: Re:innobase bug w/ 3.23.29???

2001-06-27 Thread ryc



> Heikki> Well, mystery solved :). Except that why MySQL uses hours to
> Heikki> sieve away the extraneous rows in the first query.
>
> To be able to answer the question why:
>
> SELECT COUNT(*) FROM table1 WHERE col1=0 and col2=0
>
> Is slow, I would need to get an EXPLAIN for this query.

mysql> explain select count(*) from messages where clean=0 and
parentmsgid=0;

+--+---+---+-+-+--+-
+-+
| table| type  | possible_keys | key | key_len | ref  | rows
| Extra   |
+--+---+---+-+-+--+-
+-+
| messages | index | parentmsgid   | parentmsgid |   5 | NULL | 7207120
| where used; Using index |
+--+---+---+-+-+--+-
+-+

It appears that it is using the index, but it takes a very long time to
complete..

Thanks,
ryan



-
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




select query for duplicate records

2001-06-27 Thread Pete Kuczynski

Hi,
How would a word a select statment, to search a database for duplicate
entries in one field.

For example, the fields: device, hostname, IP, comments

I want to find all instances where there my be two devices with the same
hostname.

Thanks!

Pete
-- 
___
Pete Kuczynski
Principal Field Engineer
DHL Airways Inc.
Infrastructure Technology & Services
(773)-462-9758
24/7 Helpdesk 1-800-434-5767


-
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: Host "" is not allowed to connect to this MySQL Server

2001-06-27 Thread Paul DuBois

At 9:23 PM +0200 6/27/01, Oscar E. Salninch wrote:
>I guess if you are updating user columns directly, you need to restart
>mysqld in order for changes to take effect... I think, that was a case
>with me...

Or issue a FLUSH PRIVILEGES query.

>
>- Original Message -
>From: "Juan" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, June 27, 2001 5:24 PM
>Subject: Host "" is not allowed to connect to this MySQL Server
>
>
>Hi,
>
>When I try to connect from another machine (using MySQL Front) I'm
>getting
>the following error message:
>==
>Error
>Connection failed
>1130 - Host "" is not allowed to connect to this MySQL Server
>==
>
>I changed the user to Host = "%" into user table to connect from any
>host
>and add a record into host table with my host, but I'm still getting the
>same error message. How can I connect from other host?
>
>The message contains an empty host name ... (!?) Why?
>
>TIA,
>Juan.
>
>
>
>
>-
>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


-- 
Paul DuBois, [EMAIL PROTECTED]

-
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




deleting data from a table

2001-06-27 Thread Mark Wakim

Hi everyone I know its very simple to delete or modify table's but what if someone is 
swearing in your message board and your filters still let him in and its being 
displayed in your board and you want to delete his post how do you do that?


Mark
([EMAIL PROTECTED])



Re: multiple database issue on winNT4.0

2001-06-27 Thread Paul DuBois

At 11:25 AM -0500 6/27/01, Pete Kuczynski wrote:
>Hi,
>Can I connect to multiple databases on a 4.0 NT box? I created a test
>database on the same box that has the pre-production ddb, and I can not
>connect to it using the same PHP scripts [I redirected the scripts to
>look to the new test ddb] and all I had is my PHP trap statment "Unable
>to connect ..."
>
>I suspect I cannot, but some insight into this would help.

You can, but you may have to GRANT privileges on the database to the
account that you're using to connect to the server.

If your "unable to connect" message comes from the mysql_connect()
or mysql_pconnect() call, though, that would be weird.  That doesn't
specify a database, so if it worked before, it should still work.
I'd expect the error to occur when you invoke mysql_select_db().

>
>Thanks!
>
>Pete
>--
>___
>Pete Kuczynski
>Principal Field Engineer
>DHL Airways Inc.
>Infrastructure Technology & Services
>(773)-462-9758
>24/7 Helpdesk 1-800-434-5767

-- 
Paul DuBois, [EMAIL PROTECTED]

-
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




Resource temporary unavailable

2001-06-27 Thread yankee

Hi,
I have problem running MySQL on RedHat 6.2 machine. After few hours of work I get 
message: fork: resource 
temporary unavailable and only rebooting helps. CPU utilisation is very low (more than 
90% idle), so 
I think there is something wrong with the memory usage. I have about 120 connections 
to MySQL and 
512 MB of ram (plus 512MB of swap space).
Is it really not enough memory? And if so, how can I decrease the size of it MySQL is 
using? 
Thanks in advance
Rafal


-
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 via ODBC

2001-06-27 Thread Joshua J. Kugler

Short answer: yes, there is a way to set it up programatically.  Also, by 
specify the driver, server, connect paramters, etc, you ca sometimes do a 
DSN-less connection.  I do that with an ODBCDirect connection under Access.  
It doesn't work, however, when I try to attach tables.

Look on http://msdn.microsoft.com/library/default.asp and look for their ODBC 
API reference.  There should be something under there that will be helpful.  
I used to have a link to a command call SQLConfigDataSource, but the link is 
broken now.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/dasdkodbcoverview.asp

Should get you started.  Sorry if it wrapped.

HTH.

j- k-

On Wednesday 27 June 2001 01:34, Amanda wrote:
> Hi,
>
> I am trying to access a mysql unix database from Clarion.
> Setting up the database throgh ODBC Administrator and then accessing
> through Clarion is Fine. However depending on selections mad by the User we
> need to connect to a different MySQL database. Claion suggessted creating a
> file DSN to get the parameter settings. However whenever i try to create a
> file DSN a get "file not saved". Where else can i get the names of the
> attibutes to set up the ODBC srouce programatically. Is there a windows API
> function to change/setup DSN? Any advice would be greatfully accepted,
> Thanks,
> Amanda Weddell.

-- 
Joshua Kugler, Information Services Director
Associated Students of the University of Alaska Fairbanks
[EMAIL PROTECTED], 907-474-7601

-
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: Host "" is not allowed to connect to this MySQL Server

2001-06-27 Thread Tuc

> 
> I guess if you are updating user columns directly, you need to restart
> mysqld in order for changes to take effect... I think, that was a case
> with me...
> 
I find a "mysqladmin flush-hosts" fixes it for me. WHY, no one
ever has figured out why. When one or more of the systems decides it can't
talk to the server, I just run that and its all happy again.

Thanks, Tuc/TTSG Internet Services, Inc.

-
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




redhat 7.1 setting up mysql

2001-06-27 Thread wkd

I'm setting up mysql for redhat 7.1 to be used with php and apache. However, in the 
past I've had problems with the setup. I had a person come in and setup mysql on 
redhat 6.0 ( 2 1/2 days later he had it running) the program has been riddle with 
bugs. The questions are: ( note: mysql is not installed on my computer from redhat. 
I've had problems with the default setting that come with redhat in the past and did 
not install then). 

1) what rpm files should I used and is there an order to them? 

2) when installing rpm files can you or how can you tell the program where to install 
the program? 

3) the most common problems is that after installing mysql it will not allow you to 
log in at all, yet, you can just type mysql and go right into mysql program. 

4) other problems are when testing or running a test, mysql tell me my server is not 
running i ran all test for the server and it is running. 

Writting code for mysql is not a problems. It getting mysql up and running to work 
with apache, php, java, and perl is the problems. 

if any body can help me out please let me know.




Re: Creating Table with a Default Datetime field

2001-06-27 Thread Rich Duzenbury

Only the first timestamp is updated by MYSQL.  Create two timestamp 
fields.  MySQL will maintain the first one.  Set timestamp2 to null when 
the record is created.

Regards,
Rich


At 10:54 AM 6/27/01 -0500, Pete Harlan wrote:
>TIMESTAMP is not the solution to his problem; he wants the date to
>default to now() when the record is created, not updated.
>
>There's currently no way to do this in MySQL; default values must be
>constants.
>
>--Pete


-
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:innobase bug w/ 3.23.29???

2001-06-27 Thread Michael Widenius


Hi!

> "Heikki" == Heikki Tuuri <[EMAIL PROTECTED]> writes:

Heikki> Monty,
Heikki> there is an SQL optimizer deficiency if a two-column index is used.
Heikki> (Added later: actually not, see the end of this email.)
Heikki> Ryan does the following query, for which there is a very good
Heikki> index on (parentmsgid, clean). But from the printout below we
Heikki> see that though MySQL uses the right key, it does not communicate
Heikki> the value of the second column to InnoDB (i.e., key_len is only 4, the
Heikki> length of an integer).

Heikki> The query:

Heikki> select * from messages where clean=0 and parentmsgid=0;

Heikki> should return 5 rows.

Heikki> Another strange thing is that when InnoDB returns rows to MySQL
Heikki> which MySQL apparently sieves away because 'clean' is '1' in them,
Heikki> the query seems to take hours. It should not take that long to sieve
Heikki> away maybe 1 million rows. I looked at the 45 MB long printout
Heikki> Ryan sent and and apparently InnoDB was not in a loop, it just sent
Heikki> a very large number of rows to MySQL, since parentmsgid = 0 in
Heikki> most rows. clean is '0' in only a few rows.

Heikki> I remember that a user complained 2 months ago on the mailing list
Heikki> about the same deficiency in the SQL optimizer when using 2-column
Heikki> indexes.

Heikki> Now I found the solution! For the following query the optimizer
Heikki> gives a 2-column search key:

Heikki> select * from messages where clean = '0' and parentmsgid = 0;

Heikki> Ok, Ryan, you can use the above formulation. The reason why
Heikki> the optimizer does not use the second column in the first query
Heikki> is that it probably considers type conversion '0' -> 0 a function,
Heikki> and generally optimizers ignore conditions like

Another reason is that anything in 'clean' that is not a number will be
regarded as 0.  For example

clean='a' and parentmsgid=0 will also match the query.

In other words, MySQL can't use the whole index on this query, even if
it wanted.

Heikki> Well, mystery solved :). Except that why MySQL uses hours to
Heikki> sieve away the extraneous rows in the first query.

To be able to answer the question why:

SELECT COUNT(*) FROM table1 WHERE col1=0 and col2=0

Is slow, I would need to get an EXPLAIN for this query.

Heikki> Regards,

Heikki> Heikki
Heikki> http://www.innodb.com



Regards,
Monty

-
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




natural sort

2001-06-27 Thread Brannon King

How many people would be interested in this feature?

On Wed, Jun 27, 2001 at 01:46:05PM +0300, [EMAIL PROTECTED] wrote:
> Brannon King wrote:
>
> >Any plans for a natural sort? A query to the effect of
> >
> >ORDER BY [~] NATURAL ASC
> >
> >or
> >
> >ORDER BY [~] NATASC
> >
> >etc.
> >
> >That would be a lot easier than bringing the data back to PHP and then
running their natsort()
>
> Can you explain in more detail what do you mean by natural sort ?
I digged a bit on PHP.net (for the first time ;-) and found the following:
http://www.php.net/manual/en/function.natsort.php
which for the algorithm refers to
http://www.linuxcare.com.au/projects/natsort/
which seems to be not reachable at the moment unfortunatly, but Google
has a cached page:
http://www.google.com/search?q=cache:GyOlzOSjQss:linuxcare.com.au/projects/n
atsort/+natsort&hl=en
The description follows:
--
Strings are sorted as usual, except that decimal integer substrings
are compared on their numeric value. For example,
a < a0 < a1 < a1a < a1b < a2 < a10 < a20
Strings can contain several number parts:
x2-g8 < x2-y7 < x2-y08 < x8-y8
in which case numeric fields are separated by nonnumeric characters.
Leading spaces are ignored. This works very well for IP addresses from
log files, for example.
Numeric substrings with leading zeros are considered to be fractional:
1.001 < 1.002 < 1.010 < 1.02 < 1.1 < 1.3
Performance is linear: each character of the string is scanned at most
once, and only as many characters as necessary to decide are
considered.
[...]

Related Work
POSIX sort(1) has the -n option to sort numbers, but this doesn't work
if there is a non-numeric prefix.
GNU ls(1) has the --sort=version option, which works the same way.
Stuart Cheshire's Macintosh program to do natural ordering. I already
had the idea of this routine, but borrowed the term ``natural
sort''. Article about this in a Mac magazine.
--
Hope this helps,
Benjamin ([EMAIL PROTECTED])


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
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: Creating Table with a Default Datetime field

2001-06-27 Thread Sherzod Ruzmetov


Thanks, ravi. Have I missed that in the documentation? If it is not there,
could you guys include it please. I think It's a good one

-sherzodR

On Wed, 27 Jun 2001, Ravi Raman wrote:

> hi.
> 
> assuming all inserts and updates never specify a value for UpdatedDate or
> CreationDate, on the initial insert:
> mysql> insert into table (Info) values ('blahblahblah');
> they will both be set to '20010627125429' or something.
> 
> any subsequent updates:
> mysql> update table set Info='somethingelse' where Info='blahblahblah';
> will leave CreationDate as its original value, and change UpdatedDate to
> whatever the current timestamp is because it is first in the table
> description/create definition.
> 
> hth.
> -ravi.
> 
> 
> -Original Message-
> From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 2:10 PM
> To: Ravi Raman
> Cc: Pete Harlan; Richard Bates; [EMAIL PROTECTED]
> Subject: RE: Creating Table with a Default Datetime field
> 
> 
> 
> Wait, I didn't get the following:
> 
> 
> > an alternate solution is to have a table like this:
> > Create table(
> >  UpdatedDatetimestamp(14),
> >  CreationDatetimestamp(14),
> >  Infovarchar(100)
> >  );
> > as mysql only automatically updates the _first_ timestamp column in a
> table.
> 
> 
> 
>  . Could you tell me more about it? And how does it solve thr problem?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> >
> > hth.
> >
> > -ravi.
> >
> > -Original Message-
> > From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 27, 2001 1:40 PM
> > To: Pete Harlan
> > Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED]
> > Subject: Re: Creating Table with a Default Datetime field
> >
> >
> >
> >
> > I, c. Then you just have to INSERT INTO it NOW() manually, that works
> >
> >
> > On Wed, 27 Jun 2001, Pete Harlan wrote:
> >
> > > TIMESTAMP is not the solution to his problem; he wants the date to
> > > default to now() when the record is created, not updated.
> > >
> > > There's currently no way to do this in MySQL; default values must be
> > > constants.
> > >
> > > --Pete
> > >
> > >
> > >
> > > > hi.
> > > >
> > > > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the
> column
> > > > type?
> > > > you can then format the date accordingly with...uh...DATE_FORMAT() in
> > your
> > > > select statements...
> > > >
> > > > hth.
> > > > -ravi
> > > >
> > > >
> > > > -Original Message-
> > > > From: Richard Bates [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, June 26, 2001 3:00 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Creating Table with a Default Datetime field
> > > >
> > > >
> > > > How do I get a default date time in the create table clause...
> > > >
> > > > I have tried
> > > >
> > > > Create table(
> > > > CreationDateDATETIMEDEFAULT NOW(),
> > > > Infovarchar(100)
> > > > );
> > > > Create table(
> > > > CreationDateDATETIMEDEFAULT "NOW()",
> > > > Infovarchar(100)
> > > > );
> > > >
> > > > Create table(
> > > > CreationDateDATETIMEDEFAULT SYSDATE(),
> > > > Infovarchar(100)
> > > > );
> > > > Create table(
> > > > CreationDateDATETIMEDEFAULT "SYSDATE()",
> > > > Infovarchar(100)
> > > > );
> > > >
> > > > Create table(
> > > > CreationDateDATETIMEDEFAULT CURRENT_DATE(),
> > > > Infovarchar(100)
> > > > );
> > > > Create table(
> > > > CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
> > > > Infovarchar(100)
> > > > );
> > > >
> > > > All without the quote return with invalid syntax.
> > > > With the quote inserts "000-00-00 00:00:00" meaining invalid date.
> > > > ==
> > > > === Richard Bates
> > > > === TELEHOUSE America
> > > > ==
> > > >
> > > >
> > > >
> > > > -
> > > > 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
> > > >
> > >
> > >
> > > -
> > > Before posting, please check:
> > >http://www.mysql.com/manual.php   (the ma

host.ISM

2001-06-27 Thread Skot

Hello,

I just updated MySQL 2.22 to 2.23 and when I went to restart the server,
I got this error message in the /var/lib/mysql/err.log file:
010627 11:19:22  /usr/sbin/mysqld: Can't open file: 'host.ISM'. (errno:
-1)
mysqld ended on  Wed Jun 27 11:19:22 PDT 2001

I've never seen this and can't find any docs on it.  I reverted back to
2.22 and I still get the same message.  Anyone know what I can do to fix
this?

Thanks.

Skot.

-
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: Creating Table with a Default Datetime field

2001-06-27 Thread Ravi Raman

hi.

assuming all inserts and updates never specify a value for UpdatedDate or
CreationDate, on the initial insert:
mysql> insert into table (Info) values ('blahblahblah');
they will both be set to '20010627125429' or something.

any subsequent updates:
mysql> update table set Info='somethingelse' where Info='blahblahblah';
will leave CreationDate as its original value, and change UpdatedDate to
whatever the current timestamp is because it is first in the table
description/create definition.

hth.
-ravi.


-Original Message-
From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 2:10 PM
To: Ravi Raman
Cc: Pete Harlan; Richard Bates; [EMAIL PROTECTED]
Subject: RE: Creating Table with a Default Datetime field



Wait, I didn't get the following:


> an alternate solution is to have a table like this:
> Create table(
>  UpdatedDatetimestamp(14),
>  CreationDatetimestamp(14),
>  Infovarchar(100)
>  );
> as mysql only automatically updates the _first_ timestamp column in a
table.



 . Could you tell me more about it? And how does it solve thr problem?












>
> hth.
>
> -ravi.
>
> -Original Message-
> From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 1:40 PM
> To: Pete Harlan
> Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED]
> Subject: Re: Creating Table with a Default Datetime field
>
>
>
>
> I, c. Then you just have to INSERT INTO it NOW() manually, that works
>
>
> On Wed, 27 Jun 2001, Pete Harlan wrote:
>
> > TIMESTAMP is not the solution to his problem; he wants the date to
> > default to now() when the record is created, not updated.
> >
> > There's currently no way to do this in MySQL; default values must be
> > constants.
> >
> > --Pete
> >
> >
> >
> > > hi.
> > >
> > > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the
column
> > > type?
> > > you can then format the date accordingly with...uh...DATE_FORMAT() in
> your
> > > select statements...
> > >
> > > hth.
> > > -ravi
> > >
> > >
> > > -Original Message-
> > > From: Richard Bates [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 26, 2001 3:00 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Creating Table with a Default Datetime field
> > >
> > >
> > > How do I get a default date time in the create table clause...
> > >
> > > I have tried
> > >
> > > Create table(
> > > CreationDateDATETIMEDEFAULT NOW(),
> > > Infovarchar(100)
> > > );
> > > Create table(
> > > CreationDateDATETIMEDEFAULT "NOW()",
> > > Infovarchar(100)
> > > );
> > >
> > > Create table(
> > > CreationDateDATETIMEDEFAULT SYSDATE(),
> > > Infovarchar(100)
> > > );
> > > Create table(
> > > CreationDateDATETIMEDEFAULT "SYSDATE()",
> > > Infovarchar(100)
> > > );
> > >
> > > Create table(
> > > CreationDateDATETIMEDEFAULT CURRENT_DATE(),
> > > Infovarchar(100)
> > > );
> > > Create table(
> > > CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
> > > Infovarchar(100)
> > > );
> > >
> > > All without the quote return with invalid syntax.
> > > With the quote inserts "000-00-00 00:00:00" meaining invalid date.
> > > ==
> > > === Richard Bates
> > > === TELEHOUSE America
> > > ==
> > >
> > >
> > >
> > > -
> > > 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
> > >
> >
> >
> > -
> > 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 unsub

Re: Host "" is not allowed to connect to this MySQL Server

2001-06-27 Thread Oscar E. Salninch

I guess if you are updating user columns directly, you need to restart
mysqld in order for changes to take effect... I think, that was a case
with me...

- Original Message -
From: "Juan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 5:24 PM
Subject: Host "" is not allowed to connect to this MySQL Server


Hi,

When I try to connect from another machine (using MySQL Front) I'm
getting
the following error message:
==
Error
Connection failed
1130 - Host "" is not allowed to connect to this MySQL Server
==

I changed the user to Host = "%" into user table to connect from any
host
and add a record into host table with my host, but I'm still getting the
same error message. How can I connect from other host?

The message contains an empty host name ... (!?) Why?

TIA,
Juan.




-
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 Installation Help Requested.

2001-06-27 Thread Jason Brunk

i originally tried to do it with the /stand/sysinstall on bsd, and it
installs it fine, but i am using the program MySQLFront to try and access
it, and it keeps coming up "Host perm202-202.ij.net is not allowed to
connect to this mysql server"  the host name perm202-202.ij.net is host of
my workstation since i am on a static ip, but i used

grant all privileges on *.* to jbrunk@"%"

and it goes into the user table of the database mysql, and shows that the
host that jbrunk is allowed to connect from is "%"  but it won't let me
connect from mysqlfront

Jason
- Original Message -
From: "Peter Matulis" <[EMAIL PROTECTED]>
To: "'Jason Brunk'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 2:12 PM
Subject: RE: MySQL Installation Help Requested.


> From RPM, binary, or source?  I have my personal docs for source.
>
> Peter Matulis
> 282-7073 ext 392
> [EMAIL PROTECTED] 
>
>
> -Original Message-
> From: Jason Brunk [mailto:[EMAIL PROTECTED]]
> Sent: June 27, 2001 12:43 PM
> To: [EMAIL PROTECTED]
> Subject: MySQL Installation Help Requested.
>
>
> is there anyone who icq and who has a few minutes that might be willing to
> help me out with the mysql install?  i have been having some trouble, so i
> figured i would check and see if there was anyone who could help a newbie
> out.
>
> Jason
>
>
> -
> 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: Creating Table with a Default Datetime field

2001-06-27 Thread Sherzod Ruzmetov


Wait, I didn't get the following:


> an alternate solution is to have a table like this:
> Create table(
>  UpdatedDatetimestamp(14),
>  CreationDatetimestamp(14),
>  Infovarchar(100)
>  );
> as mysql only automatically updates the _first_ timestamp column in a table.



 . Could you tell me more about it? And how does it solve thr problem?












> 
> hth.
> 
> -ravi.
> 
> -Original Message-
> From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 1:40 PM
> To: Pete Harlan
> Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED]
> Subject: Re: Creating Table with a Default Datetime field
> 
> 
> 
> 
> I, c. Then you just have to INSERT INTO it NOW() manually, that works
> 
> 
> On Wed, 27 Jun 2001, Pete Harlan wrote:
> 
> > TIMESTAMP is not the solution to his problem; he wants the date to
> > default to now() when the record is created, not updated.
> >
> > There's currently no way to do this in MySQL; default values must be
> > constants.
> >
> > --Pete
> >
> >
> >
> > > hi.
> > >
> > > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
> > > type?
> > > you can then format the date accordingly with...uh...DATE_FORMAT() in
> your
> > > select statements...
> > >
> > > hth.
> > > -ravi
> > >
> > >
> > > -Original Message-
> > > From: Richard Bates [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 26, 2001 3:00 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Creating Table with a Default Datetime field
> > >
> > >
> > > How do I get a default date time in the create table clause...
> > >
> > > I have tried
> > >
> > > Create table(
> > > CreationDateDATETIMEDEFAULT NOW(),
> > > Infovarchar(100)
> > > );
> > > Create table(
> > > CreationDateDATETIMEDEFAULT "NOW()",
> > > Infovarchar(100)
> > > );
> > >
> > > Create table(
> > > CreationDateDATETIMEDEFAULT SYSDATE(),
> > > Infovarchar(100)
> > > );
> > > Create table(
> > > CreationDateDATETIMEDEFAULT "SYSDATE()",
> > > Infovarchar(100)
> > > );
> > >
> > > Create table(
> > > CreationDateDATETIMEDEFAULT CURRENT_DATE(),
> > > Infovarchar(100)
> > > );
> > > Create table(
> > > CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
> > > Infovarchar(100)
> > > );
> > >
> > > All without the quote return with invalid syntax.
> > > With the quote inserts "000-00-00 00:00:00" meaining invalid date.
> > > ==
> > > === Richard Bates
> > > === TELEHOUSE America
> > > ==
> > >
> > >
> > >
> > > -
> > > 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
> > >
> >
> >
> > -
> > 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: HELP NEEDED: Problems with SELECT in combination with HAVING

2001-06-27 Thread Hannes Niedner

Thomas

You might want to consider to post a sample select from the table, some
things become apparent just then.

Hannes

On 6/27/01 3:35 AM, "Thomas Michael Koch" <[EMAIL PROTECTED]> wrote:

> Hey Hans - it didn't work (damn) but thank you for your reply and sorry
> about the accidental mail you got.
> 
> The result that was produced had the correct time but it was not attatched
> to the correct row. It was instead attached to the first row that MySql
> found in the RobotRun table.
> 
> I have found another way around it, which goes like this:
> 
> SELECT max(runId), robotId
>> FROM RobotRun
> WHERE endTime IS NOT NULL
> GROUP BY RobotId
> 
> This builds on the assumption that runId's are assigned in a strictly
> ascending order, so it only works for my domain ...
> 
> It also seems that I have made a small typo in my initial request (sorry).
> The purpose of the SQL is to find the runId of the newest run for each
> robotId. Thus I reformed your SQL to: SELECT runId, max(startTime)
> 
> I can solve my problem by using GROUP BY and HAVING when running against
> SyBase like this:
> 
> SELECT *
>> FROM RobotRun
> WHERE endTime IS NOT NULL
> GROUP BY robotId
> HAVING startTime = max(startTime)
> 
> Alas, this does not work with MySql.
> 
> Is there a general understanding within the MySql community that GROUP BY
> and HAVING doesn't conform to the standard ?
> 
> Regards
> Thomas
> 
> 
> -Original Message-
> From: Hannes Niedner [mailto:[EMAIL PROTECTED]]
> Sent: 26. juni 2001 17:42
> To: [EMAIL PROTECTED]
> Subject: Re: HELP NEEDED: Problems with SELECT in combination with
> HAVING
> 
> 
> Try
> 
> SELECT robotId, max(startTime) as crit
>> FROM RobotRun
> WHERE startTime >= '2001-06-26 00:00:00'
> AND endTime IS NOT NULL
> GROUP BY robotId
> 
> This should return the robotId and the most recent startTime labeled 'crit'
> for all records specified in the where clause. And have a look in the manual
> for the group by statement - since this statement works like a enhanced
> 'select distinct' query it will produce ill results applied to non unique
> combinations in the select and group by statement. I suppose that¹s the case
> for your  'robotId, startTime' pair.
> 
> If I got this wrong forgive me it was first thing in the morning.
> 
> Hannes
> 
> On 6/26/01 4:05 AM, "Thomas Michael Koch" <[EMAIL PROTECTED]> wrote:
> 
>> Hello there - I have this weird problem using MySql (version 3.23.39).
>> 
>> It seems that MySql interpretation of a SELECT statment using HAVING is
>> completely random.
>> 
>> I have a table called RobotRun which stores information about when a robot
>> has been running (start, stop and the id of the robot). This translates to
>> columns: "runId" (primary key), "robotId" (the id of the robot),
> "startTime"
>> and "endTime".
>> 
>> A robot can run several times during its life time, thus several records
>> will appear in RobotRun for the same robotId, however, each row will
> always
>> have a unique runId.
>> 
>> The purpose of the SQL is to produce one RobotRun row for each robot, with
>> the added restriction that it is only the row with the newest "startTime"
>> value that gets selected.
>> 
>> Now if I do the following SQL things start to get strange:
>> 
>> SELECT robotId, startTime, max(startTime) as crit
>>> FROM RobotRun
>> WHERE startTime >= '2001-06-26 00:00:00'
>> AND endTime IS NOT NULL
>> GROUP BY robotId
>> HAVING startTime = crit
>> 
>> This query produces 321 rows.
>> 
>> Setting the startTime to '2001-06-25 00:00:00' produces 707 rows, which is
>> correct and expected since the input set is larger.
>> 
>> NOW: Setting the startTime to '2001-06-24 00:00:00' produces 21 rows
>> What is going on. I cannot see how this is possible. The input set is only
>> getting larger.
>> 
>> The number of rows involved in the table is in the vicinity of 5. The
>> theoretical maximum number of rows produced from the SQL is in the
>> neighbourhood of 5000 rows. That shouldn't be a problem.
>> 
>> 
>> I have also tried the following statement with the same result (problem):
>> 
>> SELECT robotId, startTime
>>> FROM RobotRun
>> WHERE startTime >= '2001-06-26 00:00:00'
>> AND endTime IS NOT NULL
>> GROUP BY robotId
>> HAVING startTime = max(startTime)
>> 
>> 
>> Any help would be appreciated.
>> 
>> Regards
>> Thomas Koch
>> 
>> 
>> -
>> 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 P

RE: Creating Table with a Default Datetime field

2001-06-27 Thread Ravi Raman

hi.

an alternate solution is to have a table like this:
Create table(
 UpdatedDatetimestamp(14),
 CreationDatetimestamp(14),
 Infovarchar(100)
 );
as mysql only automatically updates the _first_ timestamp column in a table.

hth.

-ravi.

-Original Message-
From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 1:40 PM
To: Pete Harlan
Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED]
Subject: Re: Creating Table with a Default Datetime field




I, c. Then you just have to INSERT INTO it NOW() manually, that works


On Wed, 27 Jun 2001, Pete Harlan wrote:

> TIMESTAMP is not the solution to his problem; he wants the date to
> default to now() when the record is created, not updated.
>
> There's currently no way to do this in MySQL; default values must be
> constants.
>
> --Pete
>
>
>
> > hi.
> >
> > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
> > type?
> > you can then format the date accordingly with...uh...DATE_FORMAT() in
your
> > select statements...
> >
> > hth.
> > -ravi
> >
> >
> > -Original Message-
> > From: Richard Bates [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 3:00 PM
> > To: [EMAIL PROTECTED]
> > Subject: Creating Table with a Default Datetime field
> >
> >
> > How do I get a default date time in the create table clause...
> >
> > I have tried
> >
> > Create table(
> > CreationDateDATETIMEDEFAULT NOW(),
> > Infovarchar(100)
> > );
> > Create table(
> > CreationDateDATETIMEDEFAULT "NOW()",
> > Infovarchar(100)
> > );
> >
> > Create table(
> > CreationDateDATETIMEDEFAULT SYSDATE(),
> > Infovarchar(100)
> > );
> > Create table(
> > CreationDateDATETIMEDEFAULT "SYSDATE()",
> > Infovarchar(100)
> > );
> >
> > Create table(
> > CreationDateDATETIMEDEFAULT CURRENT_DATE(),
> > Infovarchar(100)
> > );
> > Create table(
> > CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
> > Infovarchar(100)
> > );
> >
> > All without the quote return with invalid syntax.
> > With the quote inserts "000-00-00 00:00:00" meaining invalid date.
> > ==
> > === Richard Bates
> > === TELEHOUSE America
> > ==
> >
> >
> >
> > -
> > 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
> >
>
>
> -
> 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: Creating Table with a Default Datetime field

2001-06-27 Thread Gerald Clark

Well, almost true.
On insert, all timestamp fields are updated.
On update, only the first timestamp field is updated.
So, If you have two timestamp fields, you can get the result you want.

Pete Harlan wrote:

> TIMESTAMP is not the solution to his problem; he wants the date to
> default to now() when the record is created, not updated.
> 
> There's currently no way to do this in MySQL; default values must be
> constants.
> 
> --Pete
> 
> 
> 
> 
>> hi.
>> 
>> check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
>> type?
>> you can then format the date accordingly with...uh...DATE_FORMAT() in your
>> select statements...
>> 
>> hth.
>> -ravi
>> 
>> 
>> -Original Message-
>> From: Richard Bates [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, June 26, 2001 3:00 PM
>> To: [EMAIL PROTECTED]
>> Subject: Creating Table with a Default Datetime field
>> 
>> 
>> How do I get a default date time in the create table clause...
>> 
>> I have tried
>> 
>> Create table(
>> CreationDateDATETIMEDEFAULT NOW(),
>> Infovarchar(100)
>> );
>> Create table(
>> CreationDateDATETIMEDEFAULT "NOW()",
>> Infovarchar(100)
>> );
>> 
>> Create table(
>> CreationDateDATETIMEDEFAULT SYSDATE(),
>> Infovarchar(100)
>> );
>> Create table(
>> CreationDateDATETIMEDEFAULT "SYSDATE()",
>> Infovarchar(100)
>> );
>> 
>> Create table(
>> CreationDateDATETIMEDEFAULT CURRENT_DATE(),
>> Infovarchar(100)
>> );
>> Create table(
>> CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
>> Infovarchar(100)
>> );
>> 
>> All without the quote return with invalid syntax.
>> With the quote inserts "000-00-00 00:00:00" meaining invalid date.
>> ==
>> === Richard Bates
>> === TELEHOUSE America
>> ==
>> 
>> 
>> 
>> -
>> 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
>> 
> 
> 
> 
> -
> 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


-- 
Gerald L. Clark
[EMAIL PROTECTED]


-
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: DISTINCT

2001-06-27 Thread Hannes Niedner

On 6/27/01 8:48 AM, "Sherzod Ruzmetov" <[EMAIL PROTECTED]> wrote:

That should work without errors and was one of my suggested ways (can still
be seen down below). The group by query works for me the same way like the
distinct query, given that all selected fields give you a unique combination
(so you could assign a combined primary key from those columns). But you are
certainly right that this is not needed if you don't need the feature to
access the differences created by extra fields among these identical tuples
by using count(), max(), min() and so on.

Cheers Hannes


> 
> Try this:
> 
> CEATE TABLE new_table
> SELECT DISTINCT NAME, EMAIL, AGE
> FROM whatever_table
> 
> 
> 
> On Wed, 27 Jun 2001, tom harrow wrote:
> 
>> Actually I now realise that im solving the wrong proplem.
>> 
>> here is a simplified version of my dilema
>> 
>> *
>> NAMEEMAILAGE
>> tomtom@mail23
>> dicktom@mail76
>> petepete@email54
>> davecool@mail21
>> stevesteve@mail17
>> marycool@mail89
>> thomastom@mail13
>> richrich@mail65
>> richdick@mail33
>> tomtom@mail23
>> tomtom@mail23
>> 
>> so what i want to do is cut it down so there are no duplicate email
>> addresses. I want the table looking like this:
>> 
>> *
>> NAMEEMAILAGE
>> tomtom@mail23
>> petepete@email54
>> davecool@mail21
>> stevesteve@mail17
>> richrich@mail65
>> richdick@mail33
>> 
>> Cheers tom
>> 
>> 
>> -Original Message-
>> From: Hannes Niedner [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, June 26, 2001 5:45 PM
>> To: tom harrow; [EMAIL PROTECTED]
>> Subject: Re: DISTINCT
>> 
>> 
>> Hi Tom,
>> 
>> The solution to your problem could be simple if the redundancy is across all
>> fields. Then you could simply issue a
>> 
>> CREATE table distinct_records
>> SELECT distinct field_1,.field_last
>> FROM table_duplicate_records
>> WHERE 1=1;
>> 
>> Or
>> 
>> CREATE table distinct_records
>> SELECT field_1,.field_last
>> FROM table_duplicate_records
>> GROUP BY field_1,.field_last;
>> 
>> The latter will not work properly if one or more of the fields selected is
>> not identical for identical combinations of the remaining fields.
>> 
>> Otherwise if you have one or more fields that is not identical among a group
>> of otherwise (apart from those fields) duplicate records) you must decide if
>> this difference matters to you or not. If they don¹t matter just select all
>> where the "duplicates" are identical. Make sure that the fields in the
>> select and group by part are the same.
>> 
>> Example 
>> 
>> table_duplicate records
>> 
>> field_1 field_2 field_3
>> a   b   c
>> a   b   c
>> a   b   d
>> f   g   h
>> f   g   h
>> d   j   k
>> k   i   o
>> 
>> CREATE table distinct_records
>> SELECT field_1, field_2, field_3
>> FROM table_duplicate_records
>> GROUP BY field_1, field_2, field_3;
>> 
>> table_distinct_records
>> 
>> field_1 field_2 field_3
>> a   b   c
>> a   b   d
>> f   g   h
>> d   j   k
>> k   i   o
>> 
>> Got the idea?
>> 
>> 
>> Hope that helps
>> 
>> Hannes
>> 
>> On 6/26/01 4:00 AM, "tom harrow" <[EMAIL PROTECTED]> wrote:
>> 
>>> Hi Hannes
>>> 
>>> I saw your reply to a question someone had regarding the DISTINCT keyword
>>> and doing the opposite. I too have the same problem... basically need to
>>> know the values that arnt distinct and get rid of them but keeping one of
>>> course... so there are no duplicates.
>>> 
>>> i am trying to write an asp applicatiojn to do it at the mo but its
>> getting
>>> quitre complex.
>>> 
>>> Anyway I thinkk im looking far to deep into the problem and there is
>>> probably a much simpler way of doing it. any ideas
>>> 
>>> cheers
>>> 
>>> Tom Harrow
>>> Web Developer
>>> 
>>> Netpoll Ltd
>>> 9-12 Long Lane
>>> London EC1A 9HA
>>> TEL 020 7710 2800
>>> FAX 020 7710 2828
>>> 
>>> 
>>> 
>> 
> 


-
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: Creating Table with a Default Datetime field

2001-06-27 Thread Sherzod Ruzmetov



I, c. Then you just have to INSERT INTO it NOW() manually, that works


On Wed, 27 Jun 2001, Pete Harlan wrote:

> TIMESTAMP is not the solution to his problem; he wants the date to
> default to now() when the record is created, not updated.
> 
> There's currently no way to do this in MySQL; default values must be
> constants.
> 
> --Pete
> 
> 
> 
> > hi.
> > 
> > check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
> > type?
> > you can then format the date accordingly with...uh...DATE_FORMAT() in your
> > select statements...
> > 
> > hth.
> > -ravi
> > 
> > 
> > -Original Message-
> > From: Richard Bates [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 3:00 PM
> > To: [EMAIL PROTECTED]
> > Subject: Creating Table with a Default Datetime field
> > 
> > 
> > How do I get a default date time in the create table clause...
> > 
> > I have tried
> > 
> > Create table(
> > CreationDateDATETIMEDEFAULT NOW(),
> > Infovarchar(100)
> > );
> > Create table(
> > CreationDateDATETIMEDEFAULT "NOW()",
> > Infovarchar(100)
> > );
> > 
> > Create table(
> > CreationDateDATETIMEDEFAULT SYSDATE(),
> > Infovarchar(100)
> > );
> > Create table(
> > CreationDateDATETIMEDEFAULT "SYSDATE()",
> > Infovarchar(100)
> > );
> > 
> > Create table(
> > CreationDateDATETIMEDEFAULT CURRENT_DATE(),
> > Infovarchar(100)
> > );
> > Create table(
> > CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
> > Infovarchar(100)
> > );
> > 
> > All without the quote return with invalid syntax.
> > With the quote inserts "000-00-00 00:00:00" meaining invalid date.
> > ==
> > === Richard Bates
> > === TELEHOUSE America
> > ==
> > 
> > 
> > 
> > -
> > 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
> > 
> 
> 
> -
> 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: Creating Table with a Default Datetime field

2001-06-27 Thread Hannes Niedner

Sorry, for quoting the manual but this might be just another example where
it could have the answer right away:
Hannes

http://www.mysql.com/doc/D/A/DATETIME.html

> The TIMESTAMP column type provides a type that you can use to automatically
> mark INSERT or UPDATE operations with the current date and time. If you have
> multiple TIMESTAMP columns, only the first one is updated automatically.
> 
> Automatic updating of the first TIMESTAMP column occurs under any of the
> following conditions:
> 
> *The column is not specified explicitly in an INSERT or LOAD DATA INFILE
> statement. 
> *The column is not specified explicitly in an UPDATE statement and some
other 
> column changes value. (Note that an UPDATE that sets a column to the value it
> already has will not cause the TIMESTAMP column to be updated, because if you
> set a column to its current value, MySQL ignores the update for efficiency.)
> *You explicitly set the TIMESTAMP column to NULL.
> 
> TIMESTAMP columns other than the first may also be set to the current date and
> time. Just set the column to NULL or to NOW().
> 
> You can set any TIMESTAMP column to a value different than the current date
> and time by setting it explicitly to the desired value. This is true even for
> the first TIMESTAMP column. You can use this property if, for example, you
> want a TIMESTAMP to be set to the current date and time when you create a row,
> but not to be changed whenever the row is updated later:
> 
> *Let MySQL set the column when the row is created. This will initialize it
to 
> the current date and time.
> *When you perform subsequent updates to other columns in the row, set the
> TIMESTAMP column explicitly to its current value.
> 
> On the other hand, you may find it just as easy to use a DATETIME column that
> you initialize to NOW() when the row is created and leave alone for subsequent
> updates. 


On 6/27/01 8:54 AM, "Pete Harlan" <[EMAIL PROTECTED]> wrote:

> TIMESTAMP is not the solution to his problem; he wants the date to
> default to now() when the record is created, not updated.
> 
> There's currently no way to do this in MySQL; default values must be
> constants.
> 
> --Pete
> 
> 
> 
>> hi.
>> 
>> check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
>> type?
>> you can then format the date accordingly with...uh...DATE_FORMAT() in your
>> select statements...
>> 
>> hth.
>> -ravi
>> 
>> 
>> -Original Message-
>> From: Richard Bates [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, June 26, 2001 3:00 PM
>> To: [EMAIL PROTECTED]
>> Subject: Creating Table with a Default Datetime field
>> 
>> 
>> How do I get a default date time in the create table clause...
>> 
>> I have tried
>> 
>> Create table(
>> CreationDateDATETIMEDEFAULT NOW(),
>> Infovarchar(100)
>> );
>> Create table(
>> CreationDateDATETIMEDEFAULT "NOW()",
>> Infovarchar(100)
>> );
>> 
>> Create table(
>> CreationDateDATETIMEDEFAULT SYSDATE(),
>> Infovarchar(100)
>> );
>> Create table(
>> CreationDateDATETIMEDEFAULT "SYSDATE()",
>> Infovarchar(100)
>> );
>> 
>> Create table(
>> CreationDateDATETIMEDEFAULT CURRENT_DATE(),
>> Infovarchar(100)
>> );
>> Create table(
>> CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
>> Infovarchar(100)
>> );
>> 
>> All without the quote return with invalid syntax.
>> With the quote inserts "000-00-00 00:00:00" meaining invalid date.
>> ==
>> === Richard Bates
>> === TELEHOUSE America
>> ==
>> 
>> 
>> 
>> -
>> 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
>> 
> 
> 
> -
> 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

Does MYODBC not support Lotus Approach

2001-06-27 Thread phil

I can't get it to work... does MYODBC not support Lotus Approach

Regards

Phil



-
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[2]: DISTINCT

2001-06-27 Thread Werner Stuerenburg

> *
> NAMEEMAIL   AGE
> tom tom@mail23
> dicktom@mail76
> petepete@email  54
> davecool@mail   21
> steve   steve@mail  17
> marycool@mail   89
> thomas  tom@mail13
> richrich@mail   65
> richdick@mail   33
> tom tom@mail23  
> tom tom@mail23

> so what i want to do is cut it down so there are no duplicate email
> addresses. I want the table looking like this:

> *
> NAMEEMAIL   AGE
> tom tom@mail23
> petepete@email  54
> davecool@mail   21
> steve   steve@mail  17
> richrich@mail   65
> richdick@mail   33  

I would create a new table with unique index on the pair name,
email. Then import all records into that table. Redundancies will
be avoided by your index. Kill the old table, rename the new
table.

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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: permissions and table creation

2001-06-27 Thread Werner Stuerenburg

> I'm very new to mysql and adminstration of database software in


Have you tried phpMyAdmin to manage your db? Recommended:

http://www.phpwizard.net/projects/phpMyAdmin/


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




mysql++

2001-06-27 Thread Greger Haga

Hi!

downloaded mysql++-1.7.9 tar ball from www.mysql.com and attempted to
set it up..this is th eoutput when doing automake in the  mysql++-1.7.9
directory, as said in the README

[root@171 mysql++-1.7.9]# automake
automake: Makefile.am: required file `./INSTALL' not found
automake: Makefile.am: required file `./NEWS' not found
automake: Makefile.am: required file `./COPYING' not found
automake: Makefile.am: required file `./AUTHORS' not found
automake: Makefile.am: required file `./ChangeLog' not found
[root@171 mysql++-1.7.9]#

so..something is obviously missing in the package...or am I missing
something?

Greger



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
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




MySQL Installation Help Requested.

2001-06-27 Thread Jason Brunk

is there anyone who icq and who has a few minutes that might be willing to
help me out with the mysql install?  i have been having some trouble, so i
figured i would check and see if there was anyone who could help a newbie
out.

Jason


-
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: Re[2]: question about PHP4 setup on Win98...

2001-06-27 Thread massey


Yup tons of tutorials! http://www.devshed.com/Server_Side/PHP/ has alot as well. 
Including the Apache, MySQL , PHP setup step by step for newbies

Have fun

Massey



-Original Message-
FROM: Werner Stuerenburg
TO: loiseau
CC: [EMAIL PROTECTED]
DATE: Wed 6/27/01 10:19
SUBJECT: Re[2]: question about PHP4 setup on Win98...

What exactly is the problem? There are some tutorials out there,
for example

http://sourceforge.net/projects/phptriad/

>>any advice on setting up PHP4 in collabaration with MySQL on Win98?
>>thanx...

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




multiple database issue on winNT4.0

2001-06-27 Thread Pete Kuczynski

Hi,
Can I connect to multiple databases on a 4.0 NT box? I created a test
database on the same box that has the pre-production ddb, and I can not
connect to it using the same PHP scripts [I redirected the scripts to
look to the new test ddb] and all I had is my PHP trap statment "Unable
to connect ..."

I suspect I cannot, but some insight into this would help.

Thanks!

Pete
-- 
___
Pete Kuczynski
Principal Field Engineer
DHL Airways Inc.
Infrastructure Technology & Services
(773)-462-9758
24/7 Helpdesk 1-800-434-5767


-
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


Undefined symbol "_uncompress" libmysqlclient.so.10.0

2001-06-27 Thread Alexandr Grinko

When i install php3 module in apache server i see this:

/usr/www/bin > ./apachectl configtest
Syntax error on line 22 of /usr/www/conf/httpd.conf:
Cannot load /usr/www/libexec/libphp3.so into server: Undefined symbol
"_uncompress" in httpd:/usr/local/mysql/lib/mysql/libmysqlclient.so.10.0

OS: FreeBSD 2.2.8
Thanks


/alex grinko


-
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




Undefined symbol

2001-06-27 Thread Alexandr Grinko

When i install php3 module in apache server i see this:

/usr/www/bin > ./apachectl configtest
Syntax error on line 22 of /usr/www/conf/httpd.conf:
Cannot load /usr/www/libexec/libphp3.so into server: Undefined symbol
"_uncompress" in
httpd:/usr/local/mysql/lib/mysql/libmysqlclient.so.10.0

OS: FreeBSD 2.2.8
Thanks


/alex grinko


-
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: Creating Table with a Default Datetime field

2001-06-27 Thread Pete Harlan

TIMESTAMP is not the solution to his problem; he wants the date to
default to now() when the record is created, not updated.

There's currently no way to do this in MySQL; default values must be
constants.

--Pete



> hi.
> 
> check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column
> type?
> you can then format the date accordingly with...uh...DATE_FORMAT() in your
> select statements...
> 
> hth.
> -ravi
> 
> 
> -Original Message-
> From: Richard Bates [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 3:00 PM
> To: [EMAIL PROTECTED]
> Subject: Creating Table with a Default Datetime field
> 
> 
> How do I get a default date time in the create table clause...
> 
> I have tried
> 
> Create table(
> CreationDateDATETIMEDEFAULT NOW(),
> Infovarchar(100)
> );
> Create table(
> CreationDateDATETIMEDEFAULT "NOW()",
> Infovarchar(100)
> );
> 
> Create table(
> CreationDateDATETIMEDEFAULT SYSDATE(),
> Infovarchar(100)
> );
> Create table(
> CreationDateDATETIMEDEFAULT "SYSDATE()",
> Infovarchar(100)
> );
> 
> Create table(
> CreationDateDATETIMEDEFAULT CURRENT_DATE(),
> Infovarchar(100)
> );
> Create table(
> CreationDateDATETIMEDEFAULT "CURRENT_DATE()",
> Infovarchar(100)
> );
> 
> All without the quote return with invalid syntax.
> With the quote inserts "000-00-00 00:00:00" meaining invalid date.
> ==
> === Richard Bates
> === TELEHOUSE America
> ==
> 
> 
> 
> -
> 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
> 


-
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: DISTINCT

2001-06-27 Thread Sherzod Ruzmetov


Try this:

CEATE TABLE new_table 
SELECT DISTINCT NAME, EMAIL, AGE 
FROM whatever_table



On Wed, 27 Jun 2001, tom harrow wrote:

> Actually I now realise that im solving the wrong proplem.
> 
> here is a simplified version of my dilema
> 
>   *
> NAME  EMAIL   AGE
> tom   tom@mail23
> dick  tom@mail76
> pete  pete@email  54
> dave  cool@mail   21
> steve steve@mail  17
> mary  cool@mail   89
> thomastom@mail13
> rich  rich@mail   65
> rich  dick@mail   33
> tom   tom@mail23  
> tom   tom@mail23
> 
> so what i want to do is cut it down so there are no duplicate email
> addresses. I want the table looking like this:
> 
>   *
> NAME  EMAIL   AGE
> tom   tom@mail23
> pete  pete@email  54
> dave  cool@mail   21
> steve steve@mail  17
> rich  rich@mail   65
> rich  dick@mail   33  
> 
> Cheers tom
> 
> 
> -Original Message-
> From: Hannes Niedner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 5:45 PM
> To: tom harrow; [EMAIL PROTECTED]
> Subject: Re: DISTINCT
> 
> 
> Hi Tom,
> 
> The solution to your problem could be simple if the redundancy is across all
> fields. Then you could simply issue a
> 
> CREATE table distinct_records
> SELECT distinct field_1,.field_last
> FROM table_duplicate_records
> WHERE 1=1;
> 
> Or
> 
> CREATE table distinct_records
> SELECT field_1,.field_last
> FROM table_duplicate_records
> GROUP BY field_1,.field_last;
> 
> The latter will not work properly if one or more of the fields selected is
> not identical for identical combinations of the remaining fields.
> 
> Otherwise if you have one or more fields that is not identical among a group
> of otherwise (apart from those fields) duplicate records) you must decide if
> this difference matters to you or not. If they don¹t matter just select all
> where the "duplicates" are identical. Make sure that the fields in the
> select and group by part are the same.
> 
> Example 
> 
> table_duplicate records
> 
> field_1 field_2 field_3
> a   b   c
> a   b   c
> a   b   d
> f   g   h
> f   g   h
> d   j   k
> k   i   o
> 
> CREATE table distinct_records
> SELECT field_1, field_2, field_3
> FROM table_duplicate_records
> GROUP BY field_1, field_2, field_3;
> 
> table_distinct_records
> 
> field_1 field_2 field_3
> a   b   c
> a   b   d
> f   g   h
> d   j   k
> k   i   o
> 
> Got the idea?
> 
> 
> Hope that helps
> 
> Hannes
> 
> On 6/26/01 4:00 AM, "tom harrow" <[EMAIL PROTECTED]> wrote:
> 
> > Hi Hannes
> > 
> > I saw your reply to a question someone had regarding the DISTINCT keyword
> > and doing the opposite. I too have the same problem... basically need to
> > know the values that arnt distinct and get rid of them but keeping one of
> > course... so there are no duplicates.
> > 
> > i am trying to write an asp applicatiojn to do it at the mo but its
> getting
> > quitre complex.
> > 
> > Anyway I thinkk im looking far to deep into the problem and there is
> > probably a much simpler way of doing it. any ideas
> > 
> > cheers
> > 
> > Tom Harrow
> > Web Developer
> > 
> > Netpoll Ltd
> > 9-12 Long Lane
> > London EC1A 9HA
> > TEL 020 7710 2800
> > FAX 020 7710 2828
> > 
> > 
> > 
> 


-
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: DISTINCT

2001-06-27 Thread Sherzod Ruzmetov

Well, I can say that the problem is becasue of GROUP BY clause. 
I'd say its use in that query is void isn't it?

Correct me if I'm wrong, but as far as I know, there should be summary
functions in your select, which I cannot see in yours. So it should give
you an error

-sherzdoR

On Wed, 27 Jun 2001, tom harrow wrote:

> Hannes...
> 
> The last scenario is exactly the problem i have... when i try to use your
> example i get an error with the sql
> 
> when creating the table do i have to specify the data type or anything like
> that or should it be as simple as
> 
> CREATE table distinct_records
> SELECT field_1, field_2, field_3
> FROM table_duplicate_records
> GROUP BY field_1, field_2, field_3;
> 
> thanks in advance
> 
> :-)
> 
> tom
> 
> -Original Message-
> From: Hannes Niedner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 5:45 PM
> To: tom harrow; [EMAIL PROTECTED]
> Subject: Re: DISTINCT
> 
> 
> Hi Tom,
> 
> The solution to your problem could be simple if the redundancy is across all
> fields. Then you could simply issue a
> 
> CREATE table distinct_records
> SELECT distinct field_1,.field_last
> FROM table_duplicate_records
> WHERE 1=1;
> 
> Or
> 
> CREATE table distinct_records
> SELECT field_1,.field_last
> FROM table_duplicate_records
> GROUP BY field_1,.field_last;
> 
> The latter will not work properly if one or more of the fields selected is
> not identical for identical combinations of the remaining fields.
> 
> Otherwise if you have one or more fields that is not identical among a group
> of otherwise (apart from those fields) duplicate records) you must decide if
> this difference matters to you or not. If they don¹t matter just select all
> where the "duplicates" are identical. Make sure that the fields in the
> select and group by part are the same.
> 
> Example 
> 
> table_duplicate records
> 
> field_1 field_2 field_3
> a   b   c
> a   b   c
> a   b   d
> f   g   h
> f   g   h
> d   j   k
> k   i   o
> 
> CREATE table distinct_records
> SELECT field_1, field_2, field_3
> FROM table_duplicate_records
> GROUP BY field_1, field_2, field_3;
> 
> table_distinct_records
> 
> field_1 field_2 field_3
> a   b   c
> a   b   d
> f   g   h
> d   j   k
> k   i   o
> 
> Got the idea?
> 
> 
> Hope that helps
> 
> Hannes
> 
> On 6/26/01 4:00 AM, "tom harrow" <[EMAIL PROTECTED]> wrote:
> 
> > Hi Hannes
> > 
> > I saw your reply to a question someone had regarding the DISTINCT keyword
> > and doing the opposite. I too have the same problem... basically need to
> > know the values that arnt distinct and get rid of them but keeping one of
> > course... so there are no duplicates.
> > 
> > i am trying to write an asp applicatiojn to do it at the mo but its
> getting
> > quitre complex.
> > 
> > Anyway I thinkk im looking far to deep into the problem and there is
> > probably a much simpler way of doing it. any ideas
> > 
> > cheers
> > 
> > Tom Harrow
> > Web Developer
> > 
> > Netpoll Ltd
> > 9-12 Long Lane
> > London EC1A 9HA
> > TEL 020 7710 2800
> > FAX 020 7710 2828
> > 
> > 
> > 
> 


-
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




Host "" is not allowed to connect to this MySQL Server

2001-06-27 Thread Juan

Hi,

When I try to connect from another machine (using MySQL Front) I'm getting 
the following error message:
==
Error
Connection failed
1130 - Host "" is not allowed to connect to this MySQL Server
==

I changed the user to Host = "%" into user table to connect from any host 
and add a record into host table with my host, but I'm still getting the 
same error message. How can I connect from other host?

The message contains an empty host name ... (!?) Why?

TIA,
Juan.


-
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 again: More questions about Fulltext searching.

2001-06-27 Thread Nessi

Hello Matthew,

I posted this earlier today but maybe you didnt get the message.
This definitely works for me, and its definitely an AND search (example):

SELECT author, title, year, recommend, copy, publ_desc, publ_loc, 
CEILING(IF(MATCH author AGAINST ( 'Adams') > 0, IF(MATCH title AGAINST 
('Places') > 0, IF(MATCH publ_desc AGAINST ('Society') > 0, (MATCH author 
AGAINST ('Adams') + MATCH title AGAINST ('Places') + MATCH publ_desc 
AGAINST ('Society')), 0), 0), 0)) as x FROM books, publ WHERE publ_id = 
pub_id ORDER BY x DESC

Its messy and you will need to split the words if you only use 1 entry 
field (I use 3 different ones).
But that shouldnt be a problem in php with explode function (even for 
whitespaces).
You then need a function to create the seperate parts according to the 
number of
the words. Even this example select query is only from a test file, my 
original file
sets the whole query together in a php process.
"as x" will give only more than 0% if all three words apply.
So you only need a function in your script reading out the rows with x > 0.

See also the IF() section in the mysql manual...thats how I came up with 
this query.

Hope this helps

Cheers, Nessi



At 17:08 27/06/01 , you wrote:
>  --- Colin Faber <[EMAIL PROTECTED]> wrote:
> > Ok,
> >
> > The message set that I noticed this morning sparked my interest in this.
> >
> > Currently I'm developing a search engine that will utilize mysql's
> > fulltext match technology. The problem that i've run into is, I can't
> > seem to find any documentation on how to force an AND search with in
> > MATCH AGAINST syntax, As far as I can tell this is `OR' only. Has is
> > there
> > an option to force AND?
>
>Sadly not. I've had the same trouble as you with this. It's mentioned
>somewhere
>(http://www.mysql.com/doc/F/u/Fulltext_Features_to_Appear_in_MySQL_4.0.html)
>that this will be in v4; until then, no chance.
>
>The way I do this is to split queries into words and do AND.
>
>So to find charles dickens:
>
>SELECT * FROM BOOK WHERE MATCH author AGAINST ('charles') AND MATCH author
>AGAINST ('dickens')
>
>If anyone knows how to make 'charles dickens' match simply fields
>containing both those words, rather than one or the other (ordering by
>score helps, but still the last results would be irrelevant), please
>enlighten me.
>
>=
>
>
>
>Do You Yahoo!?
>Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
>or your free @yahoo.ie address at http://mail.yahoo.ie
>
>-
>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: Perl DBI Error 19

2001-06-27 Thread Gerald Clark

Your inner loop usage of $sth overwrites the result set of the outer loop.
Use a different variable.

Hannes Niedner wrote:

> I am having trouble with DBI. I wrote a little script that should update
> fields in one table (uid_test) based on values in another table (merge). I
> updates one row and then dies with:
> 
>  os prompt: blah blah
> 
> 1   1011877 101
> Error during processing for table uid_test
> 
> Error 19 (fetch() without execute())
> 
> The selected values (primary_id, other_id) are both INT(12) and so are the
> fields of the target table (superceded_by, uid_new).
> 
> Please have a look at the Perl code snippet below. As I said it works for
> the first row. BTW if there is pure sql code that would do the job, I would
> be delighted to learn about.
> 
> Thanks Hannes
> 
> 
> 
> -snippet-
> #issue query
> $sth = $dbh->prepare ( "SELECT primary_id, other_id
> FROM merge
> ORDER BY other_id"
>  ) or &bail_out ("Cannot prepare query from merge");
> $sth->execute () or &bail_out ("Cannot execute query from merge");
> 
> while (@ary = $sth->fetchrow_array ()) {
> $counter++;
> my ($primary_id) = $ary[0];
> my ($other_id) = $ary[1];
> print "$counter\t$primary_id\t$other_id\n";
> 
> #update the data in the target table
> $sth = $dbh->prepare ( "UPDATE $table_name
> SET superceded_by=$primary_id, status=\'1\',
> time=null
> WHERE uid_new=$other_id"
>  ) or &bail_out ("Cannot prepare sql (UPDATE
> $table_name)!");
> $sth->execute () or &bail_out ("Cannot execute sql(UPDATE
> $table_name)!"); 
>   
> }
> 
> if (!defined($DBI::err)) {
> print "$counter sequences retrieved from table merge, cleaned out
> and successfully updated in table niedner.$table_name.\n";
> }else {&bail_out ("Error during processing for table $table_name\n");
> }
> 
> 
> #clean up
> $sth->finish () or &bail_out ("Cannot finish query from database");
> $dbh->disconnect () or &bail_out ("Cannot disconnect from database");
> exit (0)
> --snippet end
> 
> 
> -
> 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


-- 
Gerald L. Clark
[EMAIL PROTECTED]


-
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




permissions and table creation

2001-06-27 Thread Mohan Khurana

mysql fans,

I'm very new to mysql and adminstration of database software in
general.  I'm not clear as to how the permissions of mysql work,
specifically, there is a root user (on the database, not the system) which
has special privileges to perform certain tasks.  If I understand
correctly, other users can be added to allow for access to certain
databases.  Do applications I create use these users to connect to the
database and access certain tables?  How are these applications to manage
the usernames and passwords that control access to these tables?

Surely, passwords shouldn't be embedded into my applications on connection
statements to the mysql server, right?

The other question I have involves table creation, let's say I create a
table, is it easy to add more fields to that table with mysql?  Are there
any problems associated with performing this task?

Does anyone have any suggestions on basic administration and development
guides that are online to help me understand how things work?

thanks,

mohan



-
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: delay times, threads

2001-06-27 Thread Werner Stuerenburg

> Suppose a user can add a new row to a database in a PHP page with a form,
> and after submit, the next page he will see is a page displaying part of 
> the same database, hopefully with his new row on top. Questions: A) will he 
> always see the new data which he entered just a second before?

Yes.

> B) How much 
> delay could there be. In other words, how multi-tasking is PHP; will it run 
> the next script line, even when a previous line (a MySQL query) has not 
> been completed yet? And will MySQL execute a next (non-update) query, when 
> the precious one is not done yet? I think that last question has the 
> beginnings of an answer in it... :-)

Nothing to do with multitasking. You invoke a program which is
executed line by line. php has to wait for mysql to get any
return code for further processing.

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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

2001-06-27 Thread Werner Stuerenburg

> What is the best way to deal with both single and double quotation marks
> ' "
> when using php and mysql? I seem to be generating a lot of errors due to
> these special characters.


use functions addslashes and stripslashes when inserting and
retrieving, resp.

See http://php.net/manual/en/function.addslashes.php


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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[2]: question about PHP4 setup on Win98...

2001-06-27 Thread Werner Stuerenburg

What exactly is the problem? There are some tutorials out there,
for example

http://sourceforge.net/projects/phptriad/

>>any advice on setting up PHP4 in collabaration with MySQL on Win98?
>>thanx...

-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




Visual Foxpro

2001-06-27 Thread Hugo S. Orta Hernandez

Tengo una base de datos en Mysql pero programando en visual foxpro no me regresa la 
informacion 
no se, si hay que hacer algo en especial ??

el codigo en que hace la conexion es el sig.

   STORE SQLCONNECT('Sipaae') TO db_conec
  IF db_conec <= 0
= MESSAGEBOX('Falla al Conectarse al Servidor', 16, 'SQL Connect Error')
Do \sipaaepc\CleanUp.prg
Restore Macros
Close DataBase All
Clear Events
Quit
  Else 
  = SQLSETPROP(db_conec, 'Transactions', 2)  
  ENDIF  
  = SQLEXEC(db_conec, "SELECT cve_acceso, nombre, niv_acc FROM "+;
   "catalogos:ca_operadores Where rpe='"+wrpe_usuario+"'", "CurSubesta")
  Select CurSubesta
  Go Top
  If !Eof()
 If(cve_acceso==wcontraseña_usuario)
Store niv_acc To wnivel_usuario
Store nombre  To wnombre
ThisForm.Lb1.Visible=.f.
ThisForm.Lb2.Visible=.f.
ThisForm.Tx1.Visible=.f.
ThisForm.Tx2.Visible=.f.

alguna sugerencia???.



Re[2]: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread Werner Stuerenburg

> You'll find mysqldumpslow (in the mysql distribution) does all that and
> much much more

Sorry, not on my server (MySQL 3.22.32).

> It's a pity that it's not mentioned in the online documentation
> since it's a _very_ useful tool.

http://www.mysql.com/udmsearch/search.php?q=mysqldumpslow

shows no results. How come?


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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 'locking up'

2001-06-27 Thread Gerald Clark

Perhaps the tmp directory used by MySQL was full.

Dawn H wrote:

> Occasionally, MySQL seems to lock up on the Linux box and just sit there. It
> did it today for three hours before we realized it.  When this happens, the
> only thing we know of to do is restart it, and this time it wouldn't shut
> down so we had to reboot the Linux box. Does anyone have any idea what
> causes this and what we can do to keep it from happening in the future? It's
> not a good thing when our customers who use MySQL databases suddenly can't
> access them.
> 
> Thanks,
> Dawn H
> 
> http://www.rdcss.com/ - R&D Computer Solutions
> http://wow.cooncheese.com/ - WOW.CoonCheese.com
> http://dpenguin.rdcss.com/ - Cornucopia
> 
> 
> -
> 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


-- 
Gerald L. Clark
[EMAIL PROTECTED]


-
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: DISTINCT

2001-06-27 Thread tom harrow

Actually I now realise that im solving the wrong proplem.

here is a simplified version of my dilema

*
NAMEEMAIL   AGE
tom tom@mail23
dicktom@mail76
petepete@email  54
davecool@mail   21
steve   steve@mail  17
marycool@mail   89
thomas  tom@mail13
richrich@mail   65
richdick@mail   33
tom tom@mail23  
tom tom@mail23

so what i want to do is cut it down so there are no duplicate email
addresses. I want the table looking like this:

*
NAMEEMAIL   AGE
tom tom@mail23
petepete@email  54
davecool@mail   21
steve   steve@mail  17
richrich@mail   65
richdick@mail   33  

Cheers tom


-Original Message-
From: Hannes Niedner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 5:45 PM
To: tom harrow; [EMAIL PROTECTED]
Subject: Re: DISTINCT


Hi Tom,

The solution to your problem could be simple if the redundancy is across all
fields. Then you could simply issue a

CREATE table distinct_records
SELECT distinct field_1,.field_last
FROM table_duplicate_records
WHERE 1=1;

Or

CREATE table distinct_records
SELECT field_1,.field_last
FROM table_duplicate_records
GROUP BY field_1,.field_last;

The latter will not work properly if one or more of the fields selected is
not identical for identical combinations of the remaining fields.

Otherwise if you have one or more fields that is not identical among a group
of otherwise (apart from those fields) duplicate records) you must decide if
this difference matters to you or not. If they don¹t matter just select all
where the "duplicates" are identical. Make sure that the fields in the
select and group by part are the same.

Example 

table_duplicate records

field_1 field_2 field_3
a   b   c
a   b   c
a   b   d
f   g   h
f   g   h
d   j   k
k   i   o

CREATE table distinct_records
SELECT field_1, field_2, field_3
FROM table_duplicate_records
GROUP BY field_1, field_2, field_3;

table_distinct_records

field_1 field_2 field_3
a   b   c
a   b   d
f   g   h
d   j   k
k   i   o

Got the idea?


Hope that helps

Hannes

On 6/26/01 4:00 AM, "tom harrow" <[EMAIL PROTECTED]> wrote:

> Hi Hannes
> 
> I saw your reply to a question someone had regarding the DISTINCT keyword
> and doing the opposite. I too have the same problem... basically need to
> know the values that arnt distinct and get rid of them but keeping one of
> course... so there are no duplicates.
> 
> i am trying to write an asp applicatiojn to do it at the mo but its
getting
> quitre complex.
> 
> Anyway I thinkk im looking far to deep into the problem and there is
> probably a much simpler way of doing it. any ideas
> 
> cheers
> 
> Tom Harrow
> Web Developer
> 
> Netpoll Ltd
> 9-12 Long Lane
> London EC1A 9HA
> TEL 020 7710 2800
> FAX 020 7710 2828
> 
> 
> 


TEL 020 7710 2800

www.netpoll.net

Netpoll Ltd
9-12 Long Lane
London
EC1A 9HA

This message contains confidential information and is intended only for the individual 
or entity named.
If you are not the named addressee you should not disseminate, distrribute or copy 
this email.
Please notify the sender or [EMAIL PROTECTED] immediatly by email if you have 
received this email by mistake
and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error free as information 
could be intercepted, corrupt, lost, destroyed, arrive late
or incomplete and may contain viruses.
The sender therefor does not accept liability for any errors or omissions in the 
contents of this message which arrise as a result of
email transmission.

If verification is required please request a hard copy version.

This message has been scanned for viruses with Trend Micro's Virus Wall



-
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: DISTINCT

2001-06-27 Thread tom harrow

Hannes...

The last scenario is exactly the problem i have... when i try to use your
example i get an error with the sql

when creating the table do i have to specify the data type or anything like
that or should it be as simple as

CREATE table distinct_records
SELECT field_1, field_2, field_3
FROM table_duplicate_records
GROUP BY field_1, field_2, field_3;

thanks in advance

:-)

tom

-Original Message-
From: Hannes Niedner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 5:45 PM
To: tom harrow; [EMAIL PROTECTED]
Subject: Re: DISTINCT


Hi Tom,

The solution to your problem could be simple if the redundancy is across all
fields. Then you could simply issue a

CREATE table distinct_records
SELECT distinct field_1,.field_last
FROM table_duplicate_records
WHERE 1=1;

Or

CREATE table distinct_records
SELECT field_1,.field_last
FROM table_duplicate_records
GROUP BY field_1,.field_last;

The latter will not work properly if one or more of the fields selected is
not identical for identical combinations of the remaining fields.

Otherwise if you have one or more fields that is not identical among a group
of otherwise (apart from those fields) duplicate records) you must decide if
this difference matters to you or not. If they don¹t matter just select all
where the "duplicates" are identical. Make sure that the fields in the
select and group by part are the same.

Example 

table_duplicate records

field_1 field_2 field_3
a   b   c
a   b   c
a   b   d
f   g   h
f   g   h
d   j   k
k   i   o

CREATE table distinct_records
SELECT field_1, field_2, field_3
FROM table_duplicate_records
GROUP BY field_1, field_2, field_3;

table_distinct_records

field_1 field_2 field_3
a   b   c
a   b   d
f   g   h
d   j   k
k   i   o

Got the idea?


Hope that helps

Hannes

On 6/26/01 4:00 AM, "tom harrow" <[EMAIL PROTECTED]> wrote:

> Hi Hannes
> 
> I saw your reply to a question someone had regarding the DISTINCT keyword
> and doing the opposite. I too have the same problem... basically need to
> know the values that arnt distinct and get rid of them but keeping one of
> course... so there are no duplicates.
> 
> i am trying to write an asp applicatiojn to do it at the mo but its
getting
> quitre complex.
> 
> Anyway I thinkk im looking far to deep into the problem and there is
> probably a much simpler way of doing it. any ideas
> 
> cheers
> 
> Tom Harrow
> Web Developer
> 
> Netpoll Ltd
> 9-12 Long Lane
> London EC1A 9HA
> TEL 020 7710 2800
> FAX 020 7710 2828
> 
> 
> 


TEL 020 7710 2800

www.netpoll.net

Netpoll Ltd
9-12 Long Lane
London
EC1A 9HA

This message contains confidential information and is intended only for the individual 
or entity named.
If you are not the named addressee you should not disseminate, distrribute or copy 
this email.
Please notify the sender or [EMAIL PROTECTED] immediatly by email if you have 
received this email by mistake
and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error free as information 
could be intercepted, corrupt, lost, destroyed, arrive late
or incomplete and may contain viruses.
The sender therefor does not accept liability for any errors or omissions in the 
contents of this message which arrise as a result of
email transmission.

If verification is required please request a hard copy version.

This message has been scanned for viruses with Trend Micro's Virus Wall



-
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:innobase bug w/ 3.23.29???

2001-06-27 Thread Heikki Tuuri

Monty,

there is an SQL optimizer deficiency if a two-column index is used.
(Added later: actually not, see the end of this email.)
Ryan does the following query, for which there is a very good
index on (parentmsgid, clean). But from the printout below we
see that though MySQL uses the right key, it does not communicate
the value of the second column to InnoDB (i.e., key_len is only 4, the
length of an integer).

The query:

select * from messages where clean=0 and parentmsgid=0;

should return 5 rows.

Another strange thing is that when InnoDB returns rows to MySQL
which MySQL apparently sieves away because 'clean' is '1' in them,
the query seems to take hours. It should not take that long to sieve
away maybe 1 million rows. I looked at the 45 MB long printout
Ryan sent and and apparently InnoDB was not in a loop, it just sent
a very large number of rows to MySQL, since parentmsgid = 0 in
most rows. clean is '0' in only a few rows.

I remember that a user complained 2 months ago on the mailing list
about the same deficiency in the SQL optimizer when using 2-column
indexes.

Now I found the solution! For the following query the optimizer
gives a 2-column search key:

select * from messages where clean = '0' and parentmsgid = 0;

Ok, Ryan, you can use the above formulation. The reason why
the optimizer does not use the second column in the first query
is that it probably considers type conversion '0' -> 0 a function,
and generally optimizers ignore conditions like

sin(col1) = 0.5

Well, mystery solved :). Except that why MySQL uses hours to
sieve away the extraneous rows in the first query.

Regards,

Heikki
http://www.innodb.com
.
Match mode 1
 search tuple DATA TUPLE: 1 fields;
 0: len 4; hex ; asc ;;
N tables locked 0
Using index parentmsgid cnt 0 ; Page no 1834
PHYSICAL RECORD: n_fields 3; 1-byte offs TRUE; info bits 0
 0: len 4; hex ; asc ;; 1: len 1; hex 30; asc 0;; 2: len 8; hex
8000
0002; asc ;;
Comparing rec and search tuple
Using index parentmsgid cnt 0 ret value 10
Match mode 1
 search tuple DATA TUPLE: 1 fields;
 0: len 4; hex ; asc ;;
N tables locked 0
..
(gdb) print key_len
$1 = 4
(gdb) bt
#0  ha_innobase::index_read (this=0x8313b80, buf=0x8312280 "",
key_ptr=0x8307668 "", key_len=4, find_flag=HA_READ_KEY_EXACT)
at ha_innobase.cc:1675
#1  0x80f085b in join_read_always_key (tab=0x8307548) at sql_select.cc:4370
#2  0x80efb24 in sub_select (join=0xbe9ff2a4, join_tab=0x8307548,
end_of_records=false) at sql_select.cc:4100
#3  0x80ef7a9 in do_select (join=0xbe9ff2a4, fields=0x8311ccc, table=0x0,
procedure=0x0) at sql_select.cc:4013
#4  0x80e66ef in mysql_select (thd=0x8311a80, tables=0x8306b98,
fields=@0x8311ccc, conds=0x8306dc0, ftfuncs=@0x8311d00, order=0x0,
group=0x0, having=0x0, proc_param=0x0, select_options=8950784,
result=0x8306e40) at sql_select.cc:785
#5  0x80cd92e in mysql_execute_command () at sql_parse.cc:1137
#6  0x80d0bc9 in mysql_parse (thd=0x8311a80,
inBuf=0x8306ad8 "select * from messages where parentmsgid = 0 and clean
= 0
limit 2", length=66) at sql_parse.cc:2290
#7  0x80ccc50 in do_command (thd=0x8311a80) at sql_parse.cc:829
#8  0x80cc04e in handle_one_connection (arg=0x8311a80) at sql_parse.cc:551
#9  0x40041ca3 in pthread_start_thread () from /lib/libpthread.so.0
#10 0x40041cee in pthread_start_thread_event () from /lib/libpthread.so.0
(gdb)


-Original Message-
From: ryc <[EMAIL PROTECTED]>
To: Heikki Tuuri <[EMAIL PROTECTED]>
Date: Wednesday, June 27, 2001 12:38 AM
Subject: Re: Re:innobase bug w/ 3.23.29???


>Sorry about the delay in getting you the output. Had a few problems to take
>care of before I could take down the db server for the testing.
>
>I managed to get all of the input for both queries, however they were
rather
>large. So instead of attaching them to the messages and clogging your
>mailbox, I have them on my home dsl line. The file size is 750k or so.
>Inside the archive there are two files, log.limit2 and log.limit6. They
>correspond with the two queries listed below.
>
>http://p0key.dnsq.org/ryc/log.tar.gz
>
>Here is some information:
>Using innobase compiled with 64kb pages.
>Using Openbsd 2.7
>Mysql compiled with:
>export CXXFLAGS="-O6 -felide-constructors -fno-rtti -fno-exceptions"
>export CFLAGS="-O6 -felide-constructors -fno-rtti -fno-exceptions"
>./configure --enable-static --localstatedir="/var/mysql" --with-libwrap --w
i
>th-mysqld-user="mysql" --with-unix-socket-path="/var/mysql/mysql.sock" --wi
t
>hout-perl --without-debug --without-readline --without-bench --without-mit-
t
>hreads --with-innodb
>
>The create statement:
>CREATE TABLE messages (
>  messageid bigint(20) NOT NULL auto_increment,
>  msgid varchar(255) NOT NULL default '',
>  groupid int(10) unsigned NOT NULL default '0',
>  userid int(10) unsigned NOT NULL default '0',
>  parentmsgid int(10) unsigned NOT NULL default '0',
>  subject t

RE: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread sean . odonnell

any idea where any sort of documentation/tutorial can be found?

-Original Message-
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 1:45 PM
To: Nathanial Hendler
Cc: Mysql; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Perl Script: MySQL Slow Query Log Parser


You'll find mysqldumpslow (in the mysql distribution) does all that and
much much more

It's a pity that it's not mentioned in the online documentation
since it's a _very_ useful tool.

Tim.

On Mon, Jun 25, 2001 at 11:59:59PM -0700, Nathanial Hendler wrote:
> I wrote a perl script that will parse slow_queries logs, and output some 
> useful information.  It's kind of hard to explain, but I'll try.  I wanted
to 
> see what queries were taking a lot of time, and how often they were 
> happening.  I wrote a perl script that parses the log files, ignores
queries 
> that take less than n seconds, and normalizes the queries and reports the 
> info for each queries sorted by query occurance.
> 
> 'normalize' meaning...
> 
> this...
> 
> SELECT * FROM ween WHERE pandy_fackler = 1;
> SELECT * FROM ween WHERE pandy_fackler = 15;
> 
> becomes...
> 
> SELECT * FROM ween WHERE pandy_fackler = XXX;
> 
> this...
> 
> SELECT names FROM things WHERE name LIKE '%wazoo%';
> SELECT names FROM things WHERE name LIKE '%tada%';
> 
> becomes...
> 
> SELECT names FROM things WHERE name LIKE 'XXX';
> 
> This has proven to be a very interesting and useful tool.  You should DL
it 
> and try it on your long_queries log file.
> 
> Whoever runs mysql.com should put a copy on the website.  It might just be

> the greatest thing ever (my program, not the website).
> 
> For more info, and to get a copy, you can get it at:
> http://www.retards.org/mysql/index.php
> 
> I'd like to hear people's thought on it.  I'm the only person to test it
so 
> far, so it'd be nice to know that it works for other people.
> 
> Thanks,
> Nathan Hendler
> Tucson, AZ USA
> http://retards.org/
> 
> -
> 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


-
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 PHP4 setup on Win98...

2001-06-27 Thread loiseau

i've never had any problem...

Le Wed, 27 Jun 2001, stompbot :
>greetings,
>
>any advice on setting up PHP4 in collabaration with MySQL on Win98?
>thanx...
>
>
>-
>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
--

Yannick Loiseau
DEA a l'Institut de Recherche en Informatique de Nantes 
http://www.polytech.univ-nantes.fr
Eleve ingenieur a l'Ecole polytechnique de l'universite de Nantes 
http://www.sciences.univ-nantes.fr/irin/
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Tel: 0616183486


-
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: [PATCH] fix float parser for 1.1E1

2001-06-27 Thread Sinisa Milivojevic

Cristian Paslaru writes:
> 
> The case for this patch is that you can do sql queries with 1.1e+1 to say,
> or 1.1e01, but if you try 1.1e1 will give you an error.
> 
> I try it on MySQL 3.23.39 and 3.23.33. I think this is a very old and not
> seen bug.
> 
> Regards.
> 
> -- 
> Cristian Paslaru
> http://devel.iasi.ro

Thanks for explanation. We shall consider it.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   <___/   www.mysql.com

-
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: Repairing Tables

2001-06-27 Thread Gerald Clark

Use a backup powersupply and shutdown software to gracefully shutdown
after a power fail.

Yaw Ofori-Adjei wrote:

> I have used MySQL for about 2 years nowand I love it.
> My only problem is that I am in africa were power
> fluctuations are rampant. I usally get table handelr
> error 127 after every power outage. S'times simple
> repair just doesn't work and the entire database must
> be restore. It there a way around this error occuring
> after every outage?. Otherwise MySQL is topmost.
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> 
> -
> 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


-- 
Gerald L. Clark
[EMAIL PROTECTED]


-
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




databases disappear...

2001-06-27 Thread Marco Bleeker

[No David, the result set that suddenly goes to 0 is, or should not be 
empty, it is the result of a SELECT with no WHERE - and there were no 
deletes yet]

For the first time developing a PHP-MySQL system, I am experiencing strange 
things. Perhaps it is the off-line mode (Localhost) I am running Apache in, 
or my Wintel 98SE Pentium3. So I create and populate 3 small tables in a 
database with a standard little PHP script. Then I start working on my 
other PHP scripts and testing them out. Of course there are mistakes, like 
forgotten semicolons or a left bracket where it should be a right one 
(parse errors), and I correct them, untill I get a nice output on my 
screen. But suddenly - "Offset 0 is not valid for this result set". This is 
a mysql_data_seek() error, but that is probably a coincidence. The point 
is: MySQL suddenly thinks that the database is empty, as if it was destroyed.

When I look in my MYSQL directory tree, I find my database in the \data 
subdirectory. So it is present (3 files for each table). When I look at the 
date stamps for the files, all maintain their creation date/time, although 
I did make changes to the tables during testing - except one table, with 
just one row in it (my user/password), did change the timestamp, but I did 
not access that one (it does not work under Windows)!

It get weirder. I must physically delete the database from the MySQL data 
directory, before I can create them anew, with the same little script I 
mentioned above. Usually I can access the tabels again then, but quite 
often, I don't see the newly created tables, but the changed version from a 
previous test - although I deleted those from my hard disk.

So I presume there is a cache somewhere, maintained by Windows, Apache, 
MySQL or PHP. Can I flush that cache? How can I stop this weird behaviour? 
I hope I am not really damaging my database, because when I will be working 
with the real thing later on, I can not afford to have to start from 
scratch over and over again. Is there a workaround?

Thanks, Marco
|
| Marco Bleeker, Amsterdam
| [EMAIL PROTECTED]
| http://www.euronet.nl/users/mbleeker/
|
| Attachments only after prior notice please.
| Don't put me on any kind of mailing list.
|
| I am now receiving the Snowhite virus 4x a day
| - some of you must be infected, please check !
| (No, you did not get it from me, I use Eudora)
| __@
|   _`\<,_
|__(*)/ (*)Ah, op DIE fiets !



-
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 service on nt

2001-06-27 Thread Miguel Angel Solórzano

At 19:33 27/06/2001 +0100, Maria Aurora VT de la Vega wrote:
Hola,

Verifica primero si en el SCM ya existe el servicio llamado
mysql instalado.
Si existe, entra en el prompt del DOS, y remueválo con el
comando: d:\mysql\bin\mysqld-nt --remove

Después de eso, edita el archivo my.cnf de la siguiente manera:

[mysqld]
basedir=d:/mysql
datadir=d:/mysql/data

Entra de nuevo en el prompt de comando e instala el servicio:

d:\mysq\bin\mysqld-nt --install

Dá el arranque al servicio:

net start mysql

Solo eso,

Abrazos,
Miguel

>i've been trying to install mysql as service on nt...
>mysql is currently working fine without it installed as a service...
>mysql is installed in D:\mysql
>tried the following in vain...
>1. mysqld-nt --basedir=d:\mysql --install --> not valid
>2. copy and edit c:\my.cnf and set basedir=d:\mysql\
> and try mysqld-nt --install
> and then net start mysql --> specified file not found error
>3. try set basedir=d:\mysql as environment variable
> and try mysqld-nt --install
> and then net start mysql --> specified file not found error
>
>help!
>
>thanks.
>
>
>
>-
>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

-- 
For technical support contracts, goto https://order.mysql.com/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Mr. Miguel A. Solórzano <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Mogi das Cruzes - São Paulo, Brazil
<___/   www.mysql.com


-
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[2]: databases disappear...

2001-06-27 Thread Werner Stuerenburg

> In any case, the problem is not with Mysql - perhaps if you were to
> enquire on the PHP list with a code sample?

Also, it is a good idea to shut down mysql and restart it to see
changes written to disk, which is fine to recover memory leaks
unde Win, too. I wrote a batch

cd c:\mysql\bin
mysqladmin shutdown
mysqld

and put that on my start bar, so that is just a click.


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




delay times, threads

2001-06-27 Thread Marco Bleeker

Running Unix, Apache, MySQL and PHP, should I worry about delay times, and 
will the server always present the user with the latest database update 
(after a possible delay)?

Suppose a user can add a new row to a database in a PHP page with a form, 
and after submit, the next page he will see is a page displaying part of 
the same database, hopefully with his new row on top. Questions: A) will he 
always see the new data which he entered just a second before? B) How much 
delay could there be. In other words, how multi-tasking is PHP; will it run 
the next script line, even when a previous line (a MySQL query) has not 
been completed yet? And will MySQL execute a next (non-update) query, when 
the precious one is not done yet? I think that last question has the 
beginnings of an answer in it... :-)

Thanks a lot; this is a great mailing list! (please email me directly, I am 
not signed up)

Marco
|
| Marco Bleeker, Amsterdam
| [EMAIL PROTECTED]
| http://www.euronet.nl/users/mbleeker/
|
| Attachments only after prior notice please.
| Don't put me on any kind of mailing list.
|
| I am now receiving the Snowhite virus 4x a day
| - some of you must be infected, please check !
| (No, you did not get it from me, I use Eudora)
| __@
|   _`\<,_
|__(*)/ (*)Ah, op DIE fiets !



-
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: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread Tim Bunce

You'll find mysqldumpslow (in the mysql distribution) does all that and
much much more

It's a pity that it's not mentioned in the online documentation
since it's a _very_ useful tool.

Tim.

On Mon, Jun 25, 2001 at 11:59:59PM -0700, Nathanial Hendler wrote:
> I wrote a perl script that will parse slow_queries logs, and output some 
> useful information.  It's kind of hard to explain, but I'll try.  I wanted to 
> see what queries were taking a lot of time, and how often they were 
> happening.  I wrote a perl script that parses the log files, ignores queries 
> that take less than n seconds, and normalizes the queries and reports the 
> info for each queries sorted by query occurance.
> 
> 'normalize' meaning...
> 
> this...
> 
> SELECT * FROM ween WHERE pandy_fackler = 1;
> SELECT * FROM ween WHERE pandy_fackler = 15;
> 
> becomes...
> 
> SELECT * FROM ween WHERE pandy_fackler = XXX;
> 
> this...
> 
> SELECT names FROM things WHERE name LIKE '%wazoo%';
> SELECT names FROM things WHERE name LIKE '%tada%';
> 
> becomes...
> 
> SELECT names FROM things WHERE name LIKE 'XXX';
> 
> This has proven to be a very interesting and useful tool.  You should DL it 
> and try it on your long_queries log file.
> 
> Whoever runs mysql.com should put a copy on the website.  It might just be 
> the greatest thing ever (my program, not the website).
> 
> For more info, and to get a copy, you can get it at:
> http://www.retards.org/mysql/index.php
> 
> I'd like to hear people's thought on it.  I'm the only person to test it so 
> far, so it'd be nice to know that it works for other people.
> 
> Thanks,
> Nathan Hendler
> Tucson, AZ USA
> http://retards.org/
> 
> -
> 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: Single-user `MYSQL.DLL' server

2001-06-27 Thread Sinisa Milivojevic

Tiago Luchini writes:
> On MySQL manual one reads:
> 
> "Here are some open issues for anyone who might want to help us with the
> Windows release:
> 
>* Make a single-user `MYSQL.DLL' server.  This should include
>  everything in a standard *MySQL* server, except thread creation.
>  This will make *MySQL* much easier to use in applications that
>  don't need a true client/server and don't need to access the
>  server from other hosts."
> 
> That would make my life just perfect for 2 or 3 projects that I am running. Does 
>anyone knows if someone has actually tried to do it? If not, could anyone point me 
>out where to start from?
> 
> Atenciosamente,
> 
> Tiago Luchini
> Diretor Técnico-Comercial
> Galluch Soluções Internet
> Telefax: 11 6912 3255
> Celular: 11 3176 7740
> http://www.galluch.com.br/

No, oobody has tried to do it and it is not high on our TODO list.

Would you be ready to sponsor that project ??

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   <___/   www.mysql.com

-
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: [PATCH] fix float parser for 1.1E1

2001-06-27 Thread Sinisa Milivojevic


Why do you think that this patch is necessary ??

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   <___/   www.mysql.com

-
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




  1   2   >