errors

2002-01-04 Thread Joel N. Eusebio

Hi All,

I am very new to using mysql. I have encountered lots of problems when I
first installed mysql on my freebsd box. I am running an Intrusion Detection
System on my freebsd box and it needs to have mysql and DBI modules
installed in order for its web based reporting system to work. I am seeing
errors on my logs that I cannot interpret. Here is a sample:

DBD::mysql::st execute failed: MySQL server has gone away at ./rtu-mysql.pl
line 320,  chunk 23275.
INSERT ERROR: DBI::st=HASH(0x805af0c)->errstr
READ: 2002-01-03
22:44:04|snipper|DYNAMIC-TCP|192.168.0.111|66.48.37.52|1572|80|F|---A|6|
tcp,sp=1572,dp=80,

Does anyone know what the above error means. Any help would be greatly
appreciated.

I used the binary distribution for freeBSD and here are the other modules
that I have installed:

DBI-1.14.tar.gz
Data-ShowTable-3.3.tar.gz
Msql-Mysql-modules-1.2215.tar.gz
mysql-3.23.42-unknown-freebsdelf4.3-i386

Regards // Joel

--
Joel N. Eusebio
MIS/Technical Support Engineer
Commverge Solutions Philippines

11/F 6750 Ayala Avenue
Makati City, 1200 Philippines
Tel: +63 2 8931139
Fax: +63 2 8123122
Mobile: +63 917 8395009
Email: [EMAIL PROTECTED]
CCNA,MCP, Certified Linux Administrator
--


-
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: 3-letter stop words in FULLTEXT

2002-01-04 Thread Dave Rolsky

On Fri, 4 Jan 2002, Chris Lott wrote:

> How is full-text working for you otherwise? Is it excruciatingly slow to
> generate indexes and optimize tables as some have said?

Oh god, yes.  Running 3.23.46 on Linux with a 1Ghz PIII and 4 GB of RAM it
_still_ takes a heck of a long time to do optimize/repair tables.


-dave

/*==
www.urth.org
we await the New Sun
==*/


-
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 posterity, I had to jump through a few small hoops to install 4.0.1-MAX Binary

2002-01-04 Thread Allen



The directions do not work exactly right.
INSTALL-BINARY for one example...

The my.cnf examples do not work exactly right.
( Especially since there is some innodb crap in 
  the data directory already to begin with, notably
  my-small.cnf says look in ../var, and the size of 
  the innodb tablespace does not match up with 
  the default one )

There is confusion in the scripts where .../var/
is supposed to be the DATA directory vs. by default
it starts off with .../data

( I simply modified everything to be the /usr/local/mysql/data
  directory... in the my.cnf and uncommented the stuff
  it said to uncomment to get the innodb going )

Oh yeah !  I zapped EVERYTHING in the ../data directory
EXCEPT for the subdirectories ../mysql and ../test, then 
I put my good my.cnf in there.

THEN stuff started up right...

Applying the instructions to unpack the tar.gz 
and leaving /usr/local/mysql-some-odd-version
and making a symbolic link so you have
/usr/local/mysql to that...  does not work right.

I am on Mandrake 8.1, kernel 2.4.17.

The symlink thing, I'm not sure what it was, I ended up
unpacking straight into /usr/local/mysql  ( via the "mv" command 
after unpacking )

I put the support-files/mysql.server as /etc/init.d/mysql.
I had to edit the HOSTNAME thing in there.

I had some leftover garbage from previous MySQL installation(s)
that seemed to conflict in the PATH since some crap was /bin,
and some was /usr/bin, etc., etc.,  ( So much for RPM's )

After managing through all that I appear to have a happily functioning
InnoDB MySQL on Mandrake 8.1 Kernel 2.4.17.

I don't know what if anything anyone would like to do about this,
just FYI, stuff's not quite right, not nearly smooth or seamless.

HOWEVER, I have to say that was a good 3 hour educational 
experience that I'm actually NOT sorry I had to go through...
( I think because I feel comfortable sort of knowing what I'm
  doing )

Now... on to playing with all the neato goodies...

INSERT INTO ... SELECT ... FROM ... tee hee !!

( I wonder if this is going to work out okay with LVM, XFS, Reiser,
  type stuff... That's for another day, or week... )

THX
-AEF


-- 
"When I took off my space suit helmet, I let out a sigh.
 At least that's what I told the martians..."
 - Jack Handy

-
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: Newbie Question - Long Queries

2002-01-04 Thread Anvar Hussain K.M.

Hi Bill,

Try putting first all the county equality tests together and then the other 
tests in the where clause.

select * from jobs where (county = 'county1',' or county = 'county2'...  or 
description like '%county1%' or
or description like '%county2' ...  or title like '%county1%' or title like 
'%county2') .

Since you are using perl the above query can be easily created. ie if user 
just selects county1 the
query will be
select * from jobs where (county = 'county1'  or description like 
'%county1%' or
or title like '%county1%' ) .

if count1 and count3 are selected it becomes

select * from jobs where (county = 'county1' or county = 'county3'  or 
description like '%county1%' or
description like '%county3' or title like '%county1%'  or title like 
'%county3') .

if no field selected by the user then
just select * from jobs;

These queries should run faster if you have index on county column.  Since 
this column is small in size
compared to the other two fields first searching on these should return the 
result faster.

The description and title can be in any order in the where clause depending 
on the size of the fields and
the probability of finding the string in these fields. If description 
column is smaller and there is higher probability of
finding the string in this column then put this column in the where clause 
before the title column.  If not, then
first put the title and then the description.

Tell us if there is any performance difference.

Note that changing the query does not have any effect if user selects only 
one county.

Anvar.

At 03:45 PM 04/01/2002 -0500, you wrote:
>Greetings all,
>I'm new to the list, and I'm somewhat new to MySQL.
>I have a somewhat simple question that I hope someone can help me with.
>
>I'm designing a database for a job search. There are a little over 10,000
>entries in the db.
>I need to query the database to accomplish a few results, one of which is a
>little perplexing to me.
>
>Just a little background as to how it works -
>The person can choose a county and a basic job description, and I make the
>query string dependant on what they choose. For example, if they choose one
>specific county or select "all counties," it sets the query appropriately.
>The problem that I have is - if there are 7 counties, I've got the string
>saying:
>select * from jobs where (county='county1' or description like '%county1%'
>or title like '%county1%') or (county='county2' or description like
>'%county2%' or title like '%county2%')  etc, and if they choose a
>specific keyword it then throws that into the query.
>
>The computer is a dual P3 1GZ w/1.5GB's of RAM - RedHat 7.2 - PERL DBI - it
>takes over 3 seconds to complete queries like that, and I know that I can
>get it faster.
>
>Any suggestions would be appreciated sincerely.
>Thanks,
>--Bill
>
>
>-
>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: ENUM -- integers or strings?

2002-01-04 Thread Michael Brunson

PHP will handle your var types for you just fine. If
you want to bet sure, so an intval() before you
compare.

On Fri, 4 Jan 2002 16:18:24 -0500, Erik Price used a
few recycled electrons to form:

| There's no data in the database yet, so I haven't tested this code.  I 
| don't want to use the mysql CLI client to input data b/c the data is 
| spread out over a number of tables, rather, I'm writing PHP pages that 
| provide a means to populate the database in an organized way.  But until 
| the PHP is done, I can't test... conundrum?
| 
| Erik
| 
| 
| On Friday, January 4, 2002, at 03:07  PM, Rick Emery wrote:
| 
| > What happened when you experimented?  What were your results?
| >
| > -Original Message-
| > From: Erik Price [mailto:[EMAIL PROTECTED]]
| > Sent: Friday, January 04, 2002 2:03 PM
| > To: [EMAIL PROTECTED]
| > Subject: ENUM -- integers or strings?
| >
| >
| > A quick question --
| >
| > If I have a table with an ENUM column, and the possible values are ("0",
| > "1", "2", "3"), does the number qualify as an integer or a string?
| >
| > I am working in PHP4 and intend to compare this value as such:
| >
| > // dbaccess.access_level is ENUM("0", "1", "2", "3") column
| > // $user_id has been established already
| >
| >  // get the access level for the user based on their ID
| > $sql = "SELECT dbaccess.access_level
| > FROM dbaccess, users
| > WHERE $user_id = users.user_id
| > AND users.dbaccess_id = dbaccess.dbaccess_id " ;
| > $result = mysql_query($sql, $db) ;
| > $access_level = $result ;
| >
| > // generate page content according to the user's access level
| > switch ($access_level) {
| > case $access_level > 2 :
| > // generate HTML + PHP page giving user
| > // ability to SELECT, INSERT, UPDATE, or
| > // DELETE from tables.  Finish page, then
| > break ;
| > case $access_level > 1 :
| > // generate HTML + PHP page giving user
| > // ability to SELECT or INSERT from/to
| > // tables.  Finish page, then
| > break ;
| > case $access_level > 0 :
| > // generate HTML + PHP page giving user
| > // ability to SELECT from tables.
| > // Finish page, then
| > break ;
| > default :
| > // print "You cannot access this
| > // information." Finish page.
| > } ;
| >
| > Sure, the question is really quick (whether or not ENUM returns an
| > integer or string), but now that I think about it, does it really matter
| > for the purposes of my example here?  Wouldn't this PHP code be able to
| > take a string or an integer as an argument to the "switch" statement?
| >
| > Thanks for any advice anyone can give!
| >
| >
| > Erik
| >
| >
| > -
| > 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: copy table

2002-01-04 Thread Roger Baklund

* Bogdan Stancescu
> No, I mean the type of the fields. When you create a table you
> have to define the field types -- char, varchar, stuff like
> that. Does your code take care of that?

It seems like it does:

mysql> use test
Database changed
mysql> create table test4 (a char(8),b int(9));
Query OK, 0 rows affected (0.37 sec)

mysql> insert into test4 values ('asd',1);
Query OK, 1 row affected (0.04 sec)

mysql> create table test5 select * from test4;
Query OK, 1 row affected (0.07 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> desc test5;
+---+-+--+-+-+---+--
---+
| Field | Type| Null | Key | Default | Extra | Privileges
|
+---+-+--+-+-+---+--
---+
| a | char(8) | YES  | | NULL|   |
select,insert,update,references |
| b | int(9)  | YES  | | NULL|   |
select,insert,update,references |
+---+-+--+-+-+---+--
---+
2 rows in set (0.06 sec)

I don't know if this is _allways_ the case... you can do a regular CREATE
TABLE and use INSERT ... SELECT if there is a problem with CREATE ...
SELECT.

> Thanks for the links!

Your welcome! :)

--
Roger


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

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




Re: copy table

2002-01-04 Thread Bogdan Stancescu

No, I mean the type of the fields. When you create a table you have to define
the field types -- char, varchar, stuff like that. Does your code take care of
that?

Thanks for the links!

Bogdan

Roger Baklund wrote:

> * Bogdan Stancescu
> > I'm curious about this issue too - does the third line in your
> > code take care of the table structure as well?!
> >
> > I'm also wondering how one could duplicate a whole database (for
> > backup purposes in my case).
>
> > Roger Baklund wrote:
> > > create database new_db;
> > > use new_db;
> > > create table new_table select * from old_db.old_table;
>
> I suppose that by 'table structure' you mean the order of the fields, in my
> experience the order is maintained.
>
> The backup question:
>
> http://www.mysql.com/doc/D/i/Disaster_Prevention.html >
> http://www.mysql.com/doc/m/y/mysqldump.html >
> http://www.mysql.com/doc/m/y/mysqlhotcopy.html >
> http://www.mysql.com/doc/B/a/Backing_up.html > (For InnoDb)
>
> --
> Roger
>
> -
> 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: copy table

2002-01-04 Thread Roger Baklund

* Bogdan Stancescu
> I'm curious about this issue too - does the third line in your
> code take care of the table structure as well?!
>
> I'm also wondering how one could duplicate a whole database (for
> backup purposes in my case).

> Roger Baklund wrote:
> > create database new_db;
> > use new_db;
> > create table new_table select * from old_db.old_table;

I suppose that by 'table structure' you mean the order of the fields, in my
experience the order is maintained.

The backup question:

http://www.mysql.com/doc/D/i/Disaster_Prevention.html >
http://www.mysql.com/doc/m/y/mysqldump.html >
http://www.mysql.com/doc/m/y/mysqlhotcopy.html >
http://www.mysql.com/doc/B/a/Backing_up.html > (For InnoDb)


--
Roger


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

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




Re: copy table

2002-01-04 Thread Bogdan Stancescu

I'm curious about this issue too - does the third line in your code take care
of the table structure as well?!

I'm also wondering how one could duplicate a whole database (for backup
purposes in my case).

Bogdan

Roger Baklund wrote:

> * saraswathy saras
> > how to copy table from one database to another database,is it possible.
>
> If the table type is MyIsam, you can copy the tables on the OS level.
>
> You can also execute some commands like these:
>
> create database new_db;
> use new_db;
> create table new_table select * from old_db.old_table;
>
> You would also need to add any indexes defined for old_table to new_table.
>
> --
> Roger
>
> -
> 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: copy table

2002-01-04 Thread Roger Baklund

* saraswathy saras
> how to copy table from one database to another database,is it possible.

If the table type is MyIsam, you can copy the tables on the OS level.

You can also execute some commands like these:

create database new_db;
use new_db;
create table new_table select * from old_db.old_table;

You would also need to add any indexes defined for old_table to new_table.

-- 
Roger

-
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




copy table

2002-01-04 Thread saraswathy saras

hi,

how to copy table from one database to another database,is it possible.
Please help me.


Thanks in advance


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.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: query

2002-01-04 Thread Javier Gonzalo Gloria Medina


Hi Nathan :

 Thanks for the help look, I read the php.net manual and use the
mysql_num_rows(); function, and I write down this script, did you think
is good enough.

Thank.




Untitled Document






 " target=new_window>..:: Edit








_
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




Editing field length causing grief.

2002-01-04 Thread Floyd Baker



Hello..

I am having a problem reconfiguring a field. 

This menu select puts $type into a varchar(6) field.

Type:
 $type
 Regula
 Servic
 Open
 
 
The record and field is loaded and everything works fine until I try
to change it to varchar(7).
 
After I edit the field to 7 characters, I get an error:

 Warning: Supplied argument is not a valid MySQL result resource in 
 f:/localhost/company_input.php3 on line 19

when it tries to pull the record.

There are two tables using the same script and the table that was not
changed to 7 characters continues to work.  So is it safe to say it is
the record that is bad and not the script?

What is happening to the field and/or record which causes it to crash
and more over, when I return it to varchar(6), it doesn't want to go
back to normal as it should.  

I have been refreshing, restarting Apache and mySQL and *sometimes* it
starts to work again but I haven't been able to figure out what's
going wrong and why.  Once it's been changed it gets damaged in some
way that's hard to correct.

This is running on win32.

TIA for any fix or ideas.

Floyd

--


-
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 client exits with core dump segmentation fault

2002-01-04 Thread bill

>Description:
##  After building mysql and installing the GRANT tables I start the daemon
##  and then try to run the mysql client to alter the GRANT tables to a 
##  useful configuration. Subcommands like connect and use seem to work
##  ok, but if I try entering anything else, even a single character, I get
##  a core dump. Following is screen output from a session run via gdb:

watts:/usr/local/mysql/bin $ gdb mysql
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
 ...
(gdb) run -uroot -p mysql
Starting program: /usr/local/mysql/bin/mysql -uroot -p mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.47-log

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

mysql> show table

Program received signal SIGSEGV, Segmentation fault.
0xe0002fa0 in ?? () from (unknown load module)
(gdb) q
The program is running.  Exit anyway? (y or n) y

##  If I then try to shutdown the server, which is PID 46736:

watts:/usr/local/mysql/bin $ ps
   PIDTTY  TIME CMD
 43818 pts/22  0:00 sh safe_mysqld --log
 46736 pts/22  0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql
 53986 pts/22  0:00 -ksh
 58540 pts/22  0:00 ps
watts:/usr/local/mysql/bin $ mysqladmin -uroot -p shutdown
Enter password:

##  mysqladmin just sits at this point until I break out.

^CWarning;  Aborted waiting on pid file: '/u/dev/mysql/watts.pid' after 54 seconds

##  I then try shutting down again, this time apparently with success, but 

watts:/usr/local/mysql/bin $ mysqladmin -uroot -p shutdown
Enter password:
watts:/usr/local/mysql/bin $
watts:/usr/local/mysql/bin $
watts:/usr/local/mysql/bin $ ps
   PIDTTY  TIME CMD
 43818 pts/22  0:00 sh safe_mysqld --log
 46736 pts/22  0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql
 53986 pts/22  0:00 -ksh
 57260 pts/22  0:00 ps

## the process is still there.

## Following is the contents of the log file:

/usr/local/mysql/libexec/mysqld, Version: 3.23.47-log, started with:
Tcp port: 3306  Unix socket: /var/mysql/sock/mysql.sock
Time Id CommandArgument
020104 19:37:23   1 Connect root@localhost on mysql
  1 Query   show databases
  1 Query   show tables
  1 Field List  columns_priv 
  1 Field List  db 
  1 Field List  func 
  1 Field List  host 
  1 Field List  tables_priv 
  1 Field List  user 
020104 19:39:28   2 Connect root@localhost on 
  2 Query   SHOW VARIABLES LIKE 'pid_file'
  2 Shutdown   
020104 19:40:27   3 Connect root@localhost on 
  3 Query   SHOW VARIABLES LIKE 'pid_file'
  3 Shutdown   

## ... and of the error log:

020104 19:36:59  mysqld started
Warning: One can only use the --user switch if running as root
/usr/local/mysql/libexec/mysqld: ready for connections
020104 19:40:27  mysqld: Got error 9 from select
020104 19:40:27  /usr/local/mysql/libexec/mysqld: Normal shutdown

020104 19:40:28  /usr/local/mysql/libexec/mysqld: Shutdown Complete


>How-To-Repeat:
This happens consistently. You don't need to use an actual SQL command to 
crash the client
any string that is not a subcommand of the client seems to do it
>Fix:


>Submitter-Id:  
>Originator:
>Organization:
 
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:  
>Severity:  <[ non-critical | serious | critical ] (one line)>
>Priority:  <[ low | medium | high ] (one line)>
>Category:  mysql
>Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release:   mysql-3.23.47 (Source distribution)

>Environment:

System: AIX watts 3 4 00600079C400
IBM rs/6000 7025-F30 
AIX 4.3.3.0  Because I had read that there were problems with AIX's libc.a I 
tried applying the
following fixes after first encountering the above problem. I did not rebuild 
after applying the
fixes because I didn't know if it was necessary or useful. 
bos.rte.bind_cmds.4.3.3.75.bff
bos.rte.libc.4.3.3.75.bff
bos.rte.libc.4.3.3.79.bff
bos.rte.libpthreads.4.3.3.75.bff
bos.rte.libpthreads.4.3.3.77.bff

Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gcc
I used the GNU make program instead of IBM's - or thought I did. Does the above path 
indicate
what was actually used or simply the default?

GCC: Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc -pipe -mcpu=

Re: OK - Simple Timestamps problem getting the better of me!

2002-01-04 Thread Paul DuBois

My response below is incorrect, with regard to the NULL behavior.  MySQL
will insert the current time and date for a TIMESTAMP only for the first
column *if* you omit the columns from the INSERT statement.  If you set
the column to NULL explicitly, MySQL should set any TIMESTAMP to the current
date and time.  Dunno why that doesn't work for David, it works for me.

Thanks to BD for pointing out my brain-lapse. :-)


At 18:45 -0600 1/4/02, Paul DuBois wrote:
>At 23:41 + 1/4/02, David Ayliffe wrote:
>>I have created a test table with:
>>
>>CREATE TABLE TimeTest (
>>Time1 TIMESTAMP(4),
>>Time2 TIMESTAMP(8),
>>Time3 TIMESTAMP(10),
>>Time4 TIMESTAMP(12),
>>Time5 TIMESTAMP(14));
>>
>>This works fine!  No problemo
>>
>>Now ALL I am trying to do is insert the current time and date into each
>>field in the table!!  That's all.
>>I'm not new to MySQL or its operation but this has really got the better
>>of me.  Maybe its because its 11:40PM after a day of work but can
>>someone please tell me how I can insert a row of current time and date
>>into a table with different column definitions!
>>
>>I have tried:
>>INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);
>>
>>I have tried NOW, 'NULL'.
>
>NOW() would work better than NOW.
>
>NULL will insert the current date and time only into the *first*
>TIMESTAMP column.
>
>http://www.mysql.com/doc/D/A/DATETIME.html
>
>>
>>Please
>>
>>
>>Thanks
>>DA
>
>


-
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 if() when using float?

2002-01-04 Thread Roger Baklund

Hi,

there seems to be some bugs when using floating point constants and user
variables with the if() function. Is this known bugs? I have searched for
it, but not found anything... is it fixed... I have tested it on
3.23.30-gamma on win2k and 3.23.39 on solaris, I don't have access to any
newer installation. Maybe someone could test it on 4.0.x?

mysql> select if(0.4,'true','false'),if(0.5,'true','false');
+++
| if(0.4,'true','false') | if(0.5,'true','false') |
+++
| false  | true   |
+++
1 row in set (0.00 sec)

This is as expected: 0.4 is rounded down to 0, and evaluates as false, while
0.5 is rounded up to 1, and evaluates as true. (This is mentioned on http://www.mysql.com/doc/C/o/Control_flow_functions.html >)

mysql> select @a:=0.4,@b:=0.5,if(@a,'true','false'),if(@b,'true','false');
+-+-+---+---+
| @a:=0.4 | @b:=0.5 | if(@a,'true','false') | if(@b,'true','false') |
+-+-+---+---+
| 0.4 | 0.5 | false | false |
+-+-+---+---+
1 row in set (0.01 sec)

In this case I would expect @b to be true... I suspect the problem is it is
beeing converted to the string '0.5', which again is truncated to the
integer 0:

mysql> select if('0.9','true','false');
+--+
| if('0.9','true','false') |
+--+
| false|
+--+
1 row in set (0.01 sec)

The string '0.9' is obviously not recognized as a floating point number...

mysql> select @a:='A',@b:='B',if(@a,'true','false'),if(@b,'true','false');
+-+-+---+---+
| @a:='A' | @b:='B' | if(@a,'true','false') | if(@b,'true','false') |
+-+-+---+---+
| A   | B   | false | false |
+-+-+---+---+
1 row in set (0.00 sec)

...and string values are always false (except '1','2','2a' and so on!), only
integers seems to work as user variables for the if function:

mysql> select @a:=0,@b:=1,if(@a,'true','false'),if(@b,'true','false');
+---+---+---+---+
| @a:=0 | @b:=1 | if(@a,'true','false') | if(@b,'true','false') |
+---+---+---+---+
| 0 | 1 | false | true  |
+---+---+---+---+
1 row in set (0.00 sec)

Floating point expressions are also buggy:

mysql> select if(0.4+0.4,'true','false'),if(0.5-0.4,'true','false');
+++
| if(0.4+0.4,'true','false') | if(0.5-0.4,'true','false') |
+++
| false  | true   |
+++
1 row in set (0.00 sec)

In this case I would expect the first expression to be true and the second
false. It seems that each of the operands in the expression is evaluated
instead of the result... expressions containing a floating point number
above 0.5 seems to return true, expressions containing a floating point
number below 0.5 seems to return false...:

mysql> select if(0.5-0.4-0.1,'true','false'),if(0.4*10,'true','false');
++---+
| if(0.5-0.4-0.1,'true','false') | if(0.4*10,'true','false') |
++---+
| true   | false |
++---+

(if(0.5-0.5) is false, though...)

--
Roger


-
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: OK - Simple Timestamps problem getting the better of me!

2002-01-04 Thread Paul DuBois

At 23:41 + 1/4/02, David Ayliffe wrote:
>I have created a test table with:
>
>CREATE TABLE TimeTest (
>Time1 TIMESTAMP(4),
>Time2 TIMESTAMP(8),
>Time3 TIMESTAMP(10),
>Time4 TIMESTAMP(12),
>Time5 TIMESTAMP(14));
>
>This works fine!  No problemo
>
>Now ALL I am trying to do is insert the current time and date into each
>field in the table!!  That's all. 
>
>I'm not new to MySQL or its operation but this has really got the better
>of me.  Maybe its because its 11:40PM after a day of work but can
>someone please tell me how I can insert a row of current time and date
>into a table with different column definitions!
>
>I have tried:
>INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);
>
>I have tried NOW, 'NULL'.

NOW() would work better than NOW.

NULL will insert the current date and time only into the *first*
TIMESTAMP column.

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


>
>Please
>
>
>Thanks
>DA


-
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: 3-letter stop words in FULLTEXT

2002-01-04 Thread Chris Lott

> Is there some way to turn off the default 4-letter
> minimum length for words in the FULLTEXT index in mysql
> 3.23.41-nt ?

from: http://www.mysql.com/doc/F/u/Fulltext_Fine-tuning.html 

> Minimal length of word to be indexed is 
> defined by MySQL variable ft_min_word_length.
> Change it to the value you prefer, and rebuild 
> your FULLTEXT indexes. 

How is full-text working for you otherwise? Is it excruciatingly slow to
generate indexes and optimize tables as some have said?

c
--
Chris Lott

-
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: OK - Simple Timestamps problem getting the better of me!

2002-01-04 Thread Bogdan Stancescu

You may try an "INSERT INTO TimeTest set Time5='2002-1-2'" and see if at
least Time1 gets populated...

In the worst case you can INSERT INTO TimeTest (now(), now(), now(), now(),
now());

David Ayliffe wrote:

> NO, not originally but I have now and it seems to make no difference!
> Any other ideas?
>
> -Original Message-
> From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
> Sent: 05 January 2002 00:12
> To: David Ayliffe
> Cc: 'MySQL'
> Subject: Re: OK - Simple Timestamps problem getting the better of me!
>
> Did you define the columns as NOT NULL?
>
> Bogdan
>
> David Ayliffe wrote:
>
> > I have created a test table with:
> >
> > CREATE TABLE TimeTest (
> > Time1 TIMESTAMP(4),
> > Time2 TIMESTAMP(8),
> > Time3 TIMESTAMP(10),
> > Time4 TIMESTAMP(12),
> > Time5 TIMESTAMP(14));
> >
> > This works fine!  No problemo
> >
> > Now ALL I am trying to do is insert the current time and date into
> > each field in the table!!  That's all.
> >
> > I'm not new to MySQL or its operation but this has really got the
> > better of me.  Maybe its because its 11:40PM after a day of work but
> > can someone please tell me how I can insert a row of current time and
> > date into a table with different column definitions!
> >
> > I have tried:
> > INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);
> >
> > I have tried NOW, 'NULL'.
> >
> > Please
> >
> > Thanks
> > DA
> >
> > -
> > 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: OK - Simple Timestamps problem getting the better of me!

2002-01-04 Thread David Ayliffe

NO, not originally but I have now and it seems to make no difference!
Any other ideas?

-Original Message-
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Sent: 05 January 2002 00:12
To: David Ayliffe
Cc: 'MySQL'
Subject: Re: OK - Simple Timestamps problem getting the better of me!


Did you define the columns as NOT NULL?

Bogdan

David Ayliffe wrote:

> I have created a test table with:
>
> CREATE TABLE TimeTest (
> Time1 TIMESTAMP(4),
> Time2 TIMESTAMP(8),
> Time3 TIMESTAMP(10),
> Time4 TIMESTAMP(12),
> Time5 TIMESTAMP(14));
>
> This works fine!  No problemo
>
> Now ALL I am trying to do is insert the current time and date into 
> each field in the table!!  That's all.
>
> I'm not new to MySQL or its operation but this has really got the 
> better of me.  Maybe its because its 11:40PM after a day of work but 
> can someone please tell me how I can insert a row of current time and 
> date into a table with different column definitions!
>
> I have tried:
> INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);
>
> I have tried NOW, 'NULL'.
>
> Please
>
> Thanks
> DA
>
> -
> 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: OK - Simple Timestamps problem getting the better of me!

2002-01-04 Thread Bogdan Stancescu

Did you define the columns as NOT NULL?

Bogdan

David Ayliffe wrote:

> I have created a test table with:
>
> CREATE TABLE TimeTest (
> Time1 TIMESTAMP(4),
> Time2 TIMESTAMP(8),
> Time3 TIMESTAMP(10),
> Time4 TIMESTAMP(12),
> Time5 TIMESTAMP(14));
>
> This works fine!  No problemo
>
> Now ALL I am trying to do is insert the current time and date into each
> field in the table!!  That's all.
>
> I'm not new to MySQL or its operation but this has really got the better
> of me.  Maybe its because its 11:40PM after a day of work but can
> someone please tell me how I can insert a row of current time and date
> into a table with different column definitions!
>
> I have tried:
> INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);
>
> I have tried NOW, 'NULL'.
>
> Please
>
> Thanks
> DA
>
> -
> 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: Crazy mysql statements.. what if..

2002-01-04 Thread Roger Baklund

* Roger Davenport
> I'm trying to do the impossible I think but what I'd like to do is join
> two tables, using the "colname" results from "a" table to lookup a
> column named "colname" in b...  here we go.

I don't think you can do that, but...

> suppose we have
>
> table a:
>   id  colname
>   0   price1
>   1   price2
>   2   price3
>
> table b
>   itemprice1  price2  price3
>   x   1.502.503.50
>   y   2.503.504.50
>
> what I'd like to do, is
>
> select b.`a.colname` from a, b where a.id=0 and b.item="x";

...how do you know a.id=0? If you mean something like this:

  select b.`a.colname` from a, b where a.id=$id and b.item="$item";

...why not determine the colname in the script, and use this:

  select b.$colname from b where b.item="$item";

Anyhow, if you really need to determine this in the query (per row), you
could do it using a double if():

select
  if(@a=0,
b.price1,
if(@a=1,
  b.price2,
  b.price3)) as price
  from b
  where b.item="$item";

This statement selects price1 if @a=0, price2 if @a=1, otherwise price3. The
field is named "price" in any case. (This is a illustration, pointless
because @a is predefined.)

Instead of "@a=0" and "@a=1" you would probably put in some other criteria,
like "customer.discount_code in ('r1','r2','a1')" or
"report.type='pricelist'".

IF is very usefull, CASE is an alternative, both are described here:

http://www.mysql.com/doc/C/o/Control_flow_functions.html >

--
Roger


-
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




OK - Simple Timestamps problem getting the better of me!

2002-01-04 Thread David Ayliffe

I have created a test table with:

CREATE TABLE TimeTest (
Time1 TIMESTAMP(4),
Time2 TIMESTAMP(8),
Time3 TIMESTAMP(10),
Time4 TIMESTAMP(12),
Time5 TIMESTAMP(14));

This works fine!  No problemo

Now ALL I am trying to do is insert the current time and date into each
field in the table!!  That's all.  

I'm not new to MySQL or its operation but this has really got the better
of me.  Maybe its because its 11:40PM after a day of work but can
someone please tell me how I can insert a row of current time and date
into a table with different column definitions!

I have tried:
INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);

I have tried NOW, 'NULL'.

Please



Thanks 
DA




-
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




query

2002-01-04 Thread Javier Gonzalo Gloria Medina

Hi:

 I have the next question when i program in asp a query to a database
and the query doesn´t returns info you use the while not eof, and then
you can control what will appear en the html page ok. 

There is something or a code that do the same in php4 

Thanks.



_
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




problems making mysql v3.23.47 on NetBSD

2002-01-04 Thread Dan

after running a simple ./configure --prefix=/usr/local/mysql and then
running gmake I get this error:

gmake[3]: Entering directory `/root/mysql-3.23.47/sql'
c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\
"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share
/mysql\"" -DHAVE_CONFIG_H
-I../mit-pthreads/include -I./../include -I./../regex -I. -I../include -I..
-I.-O3 -DDBUG_OFF   -fno-implicit-templates -fno-exceptions -fno-rtti -D
unix -c mysqld.cc
mysqld.cc: In function `void * handle_connections_sockets(void *)':
mysqld.cc:2314: implicit declaration of function `int select(...)'
gmake[3]: *** [mysqld.o] Error 1
gmake[3]: Leaving directory `/root/mysql-3.23.47/sql'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/root/mysql-3.23.47/sql'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/mysql-3.23.47'
gmake: *** [all-recursive-am] Error 2
bash-2.05a#

it's complaining about this line (mysqld.cc:2314):

if (select((int) max_used_connection,&readFDs,0,0,0) < 0)

I'm running NetBSD 1.5.2.  Thanks for any help.

Dan



-
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




3.21.33b mysql_install_db

2002-01-04 Thread fil krohnengold


Am I crazy, or should there be some CREATE TABLE statements
somewhere in the mysql_install_db script?  It keeps dying on me
with: 

  Starting mysqld demon with databases from /usr/local/mysql/data
  ERROR 1017 at line 3: Can't find file: 'db.frm' (errno: 2)
  The grant tables was not installed. 

Line 3 being the HERE statement in the shell script: 

  ./bin/mysql mysql 
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Crazy mysql statements.. what if..

2002-01-04 Thread Roger Davenport

I'm trying to do the impossible I think but what I'd like to do is join
two tables, using the "colname" results from "a" table to lookup a
column named "colname" in b...  here we go.

suppose we have

table a:
id  colname
0   price1
1   price2
2   price3

table b
itemprice1  price2  price3
x   1.502.503.50
y   2.503.504.50

what I'd like to do, is 

select b.`a.colname` from a, b where a.id=0 and b.item="x";

which should result in 1.50 (a.id=0, a.colname="price1", b.item="x",
b.price1)

I know.. crazy.  Not normal.  can I do it though?  I don't even know
what to call it.. otherwise I could look it up.  (The formal name is
probably "Illegal SQL!")

Please reply directly, as I am not a member of the list.
Roger


-
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: Search tough question

2002-01-04 Thread Colin Faber

How about using a fulltext index on the field then using a LIKE wild 
card limiting.

Example:

SELECT blah FROM tbl WHERE MATCH (ftindex_col) AGAINST ('Neil Young')
AND col LIKE "Neil Young%";

This will find only items with Neil or Young AND ^Neil Young, Playing 
around with this formula will allow you to control what type of 
results you receive.



Stephen Griffiths wrote:
> 
> Hi people,
> 
> I think this is a tough question, or it could be pretty easy. I have
> this text file which has a line that has 'someartist - some song'. I use
> php to open the file and read the line and I now pass this line into the
> mysql query. (lets use $string as the var). Here's the problem.
> 
> I have an Artist field that has a few entries like 'Artist a', 'artist
> b', 'foobar asrtist' blah blah. What I want to is the mysql to search
> through the artist field to find the closest match to $string. For
> example, if my Artist field contained 'Neil Young' and $string contained
> 'Neil Young - Let's Roll', it would have 'Neil Young' as the closest
> match in it's result set.
> 
> E-mail me if you need more info or don't get what I'm asking. Hopefully
> you people can help me. :)  If isn't "SELECT * from Artist_tbl WHERE
> Artist LIKE '%$string%"; either  ;)   Hope someone can understand my
> gibberish and help me out :)
> 
> Thanxs
> 
> --
> 
> Steve Griff
> 
> 
> mailto: [EMAIL PROTECTED]|  http://www.stevegriff.com
> 
> Live CDR Trading: Beck, Neil Young, Frank Zappa, Radiohead, Ry Cooder,
>   Bowie, Xtc, Nirvana & More.
> E-Mail me for any music trade!
> 
> -
> 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

-- 
Colin Faber
(303) 859-1491
fpsn.net, 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




RE: JOIN question

2002-01-04 Thread Gary . Every

You can use count(*) as only one of the selects

SELECT count(*), usernames.user, usernames.pass FROM usernames where
condition=TRUE

-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 3:35 PM
To: 'Rick Emery'; [EMAIL PROTECTED]
Subject: RE: JOIN question


rick,

thanks for the reply.  that does give me a count but i also need all the
data from usernames table.  i need user, ask, pass, etc., then a count like
you said.

this is what i am looking for
++-+-+-+
| user | ask  | pass | pictures |
++-++--+
| 189  | 222 | F   | 6 ( the count)
++-++--+

??

matt


-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:32 PM
To: 'Boex,Matthew W.'; [EMAIL PROTECTED]
Subject: RE: JOIN question


How about:
mysql>  select count(*) from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;

-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:09 PM
To: [EMAIL PROTECTED]
Subject: JOIN question



howdy,

i have a table, pictures,  with usernames and pictures like below.

mysql> select * from pictures;
+--+---+
| user | pictures   |
+--+---+
| 189  | aftermath189.jpg  |
| 189  | OSEIiod189.jpg |
| 189  | Isla_de_la_vida_1024189.jpg  |
| 189  | energynew189.jpg|
| 189  | emblem189.jpg  |
| 189  | small_oasis189.jpg  |
+--+---+

i have another table, usernames, with a ton of columns, name, date, address,
etc...

what i want to do is select all the columns from usernames based on the
state, and if they have a picture, give me a yes or no.  here is what i have
so far...

mysql>  select usernames.user,ask,pass,pictures.user from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;
++-+-+---+
| user | ask  | pass | user |
++-+++
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
++-+++

since this user has six pictures( they can have from 0 to 6), it gives me 6
lines of output.  what i am looking for is just one line of output.
something like below...
++-+-+-+
| user | ask  | pass | pictures |
++-++--+
| 189  | 222 | F   | (something that says yes or no, 1 or 0,
anything)   |
++-++--+

i need all of the requested columns from usernames, and just one from
pictures.  is this possible?

matt

-
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: ms acess to mysql-More information

2002-01-04 Thread Dan Crawford

I received similar messages to the first two in your e-mail, and setting 
the host field appropriately in the mysql.user table resolved it.

I didn't receive any error messages like the last two in your message.  
What version of myODBC, MySQL, and Access are you running?

Dan Crawford
Integrated Network Strategies


> Thanks for the help so far.
> 
> The specific error messages I get are:
> 
> 
> SQLDriverConnect returned: SQL_ERROR=-1
> dbc:  szSqlState = "S1000", *pfNativeError = 1130, *pcbErrorMsg = 
108,
> *ColumnNumber = -1, *RowNumber = -1
>   
MessageText = "[TCX][MyODBC]Host
> 'jackson-24-159-79-100.midtn.chartertn.net' is not allowed to connect
> to this MySQL server"
> 
> dbc:  szSqlState = "S1000", *pfNativeError = 1130, *pcbErrorMsg = 
108,
> *ColumnNumber = -1, *RowNumber = -1
>   
MessageText = "[TCX][MyODBC]Host
> 'jackson-24-159-79-100.midtn.chartertn.net' is not allowed to connect
> to this MySQL server"
> 
> dbc:  szSqlState = "01000", *pfNativeError = 0, *pcbErrorMsg = 
140,
> *ColumnNumber = -1, *RowNumber = -1
>   
MessageText = "[Microsoft][ODBC Driver Manager] The driver
>   
doesn't
>support the version of ODBC behavior that the application requested (see
>SQLSetEnvAttr)."
> 
> dbc:  szSqlState = "01000", *pfNativeError = 0, *pcbErrorMsg = 
140,
> *ColumnNumber = -1, *RowNumber = -1
>   
MessageText = "[Microsoft][ODBC Driver Manager] The driver
>   
doesn't
>support the version of ODBC behavior that the application requested (see
>SQLSetEnvAttr)."
> 
> 
> It seems to me that the first 2 have to do with the permissions in
> setup, but that's only a guess.
> The bottom 2 I expect I could work on the settings strings on my end?
> 
> Any logic to my guesses???
> 
> 
> -Original Message-
> From: Dan Crawford [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 1:24 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: ms acess to mysql
> 
> 
> I successfully upsized a small Access 2000 database to MySQL this
> weekend. It was a little tricky, and I had to do some manual altering
> of the table structures after I upsized, but I eventually got it to
> work.
> 
> Are you getting any kind of error message that might shed some light on
> the issue?
> 
> Dan Crawford
> Integrated Network Strategies
> 
>> My question too...
>>
>> Matter of fact, I found a ODBC driver for M$<->MySQL access, i.e.,
>> Visual C++/Visual Basic/Access, but can't get it to work. Anybody have
>> any experience with this?
>>
>> I know about the "Port 3306", I know about the wildcard permissions to
>> access MySQL from any domain, but still can't get it to work...
>>
>>
>> Thanks in Advance
>>
>> Norm McLeod
>> Digital Signature & Public PKI key attached 
>>
>>
>>
>> -Original Message-
>> From: Duncan Hill [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, January 04, 2002 12:45 PM
>> To: Investor
>> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>> Subject: Re: ms acess to mysql
>>
>>
>> On Fri, 4 Jan 2002, Investor wrote:
>>
>>> Has anyone converted data in MS Access to Mysql?
>>>
>>> I would think this is possible!!
>>
>> "ODBC".
>>
>> (sql,mysql,database)
>>
>> --
>>
>> Sapere aude
>> My mind not only wanders, it sometimes leaves completely.
>> Never attribute to malice that which can be adequately explained by
>> stupidity.
>>
>>
>> -
>> 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 P

Search tough question

2002-01-04 Thread Stephen Griffiths

Hi people,

I think this is a tough question, or it could be pretty easy. I have
this text file which has a line that has 'someartist - some song'. I use
php to open the file and read the line and I now pass this line into the
mysql query. (lets use $string as the var). Here's the problem.

I have an Artist field that has a few entries like 'Artist a', 'artist
b', 'foobar asrtist' blah blah. What I want to is the mysql to search
through the artist field to find the closest match to $string. For
example, if my Artist field contained 'Neil Young' and $string contained
'Neil Young - Let's Roll', it would have 'Neil Young' as the closest
match in it's result set. 

E-mail me if you need more info or don't get what I'm asking. Hopefully
you people can help me. :)  If isn't "SELECT * from Artist_tbl WHERE
Artist LIKE '%$string%"; either  ;)   Hope someone can understand my
gibberish and help me out :)

Thanxs


-- 

Steve Griff
  

mailto: [EMAIL PROTECTED]|  http://www.stevegriff.com

Live CDR Trading: Beck, Neil Young, Frank Zappa, Radiohead, Ry Cooder, 
  Bowie, Xtc, Nirvana & More. 
E-Mail me for any music trade!




-
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: JOIN question

2002-01-04 Thread Boex,Matthew W.

rick,

thanks for the reply.  that does give me a count but i also need all the
data from usernames table.  i need user, ask, pass, etc., then a count like
you said.

this is what i am looking for
++-+-+-+
| user | ask  | pass | pictures |
++-++--+
| 189  | 222 | F   | 6 ( the count)
++-++--+

??

matt


-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:32 PM
To: 'Boex,Matthew W.'; [EMAIL PROTECTED]
Subject: RE: JOIN question


How about:
mysql>  select count(*) from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;

-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:09 PM
To: [EMAIL PROTECTED]
Subject: JOIN question



howdy,

i have a table, pictures,  with usernames and pictures like below.

mysql> select * from pictures;
+--+---+
| user | pictures   |
+--+---+
| 189  | aftermath189.jpg  |
| 189  | OSEIiod189.jpg |
| 189  | Isla_de_la_vida_1024189.jpg  |
| 189  | energynew189.jpg|
| 189  | emblem189.jpg  |
| 189  | small_oasis189.jpg  |
+--+---+

i have another table, usernames, with a ton of columns, name, date, address,
etc...

what i want to do is select all the columns from usernames based on the
state, and if they have a picture, give me a yes or no.  here is what i have
so far...

mysql>  select usernames.user,ask,pass,pictures.user from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;
++-+-+---+
| user | ask  | pass | user |
++-+++
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
++-+++

since this user has six pictures( they can have from 0 to 6), it gives me 6
lines of output.  what i am looking for is just one line of output.
something like below...
++-+-+-+
| user | ask  | pass | pictures |
++-++--+
| 189  | 222 | F   | (something that says yes or no, 1 or 0,
anything)   |
++-++--+

i need all of the requested columns from usernames, and just one from
pictures.  is this possible?

matt

-
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: Mysql, innodb, linux problems

2002-01-04 Thread Chambon

Hello,

As recommended I upgrade from  3.23.39 to 3.23.47
and now everything works very well

Intensive insert with simultaneous update and several simultaneous select
on the same table works perfectly on InnoDB tables

Regards
--
Bernard CHAMBON
IN2P3 / CNRS (Centre de Calcul de LYON)
email:  mailto:[EMAIL PROTECTED]
Tel :   04 72 69 42 18



-
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: ENUM -- integers or strings?

2002-01-04 Thread Erik Price

There's no data in the database yet, so I haven't tested this code.  I 
don't want to use the mysql CLI client to input data b/c the data is 
spread out over a number of tables, rather, I'm writing PHP pages that 
provide a means to populate the database in an organized way.  But until 
the PHP is done, I can't test... conundrum?

Erik


On Friday, January 4, 2002, at 03:07  PM, Rick Emery wrote:

> What happened when you experimented?  What were your results?
>
> -Original Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: ENUM -- integers or strings?
>
>
> A quick question --
>
> If I have a table with an ENUM column, and the possible values are ("0",
> "1", "2", "3"), does the number qualify as an integer or a string?
>
> I am working in PHP4 and intend to compare this value as such:
>
> // dbaccess.access_level is ENUM("0", "1", "2", "3") column
> // $user_id has been established already
>
>  // get the access level for the user based on their ID
> $sql = "  SELECT dbaccess.access_level
>   FROM dbaccess, users
>   WHERE $user_id = users.user_id
>   AND users.dbaccess_id = dbaccess.dbaccess_id " ;
> $result = mysql_query($sql, $db) ;
> $access_level = $result ;
>
> // generate page content according to the user's access level
> switch ($access_level) {
>   case $access_level > 2 :
>   // generate HTML + PHP page giving user
>   // ability to SELECT, INSERT, UPDATE, or
>   // DELETE from tables.  Finish page, then
>   break ;
>   case $access_level > 1 :
>   // generate HTML + PHP page giving user
>   // ability to SELECT or INSERT from/to
>   // tables.  Finish page, then
>   break ;
>   case $access_level > 0 :
>   // generate HTML + PHP page giving user
>   // ability to SELECT from tables.
>   // Finish page, then
>   break ;
>   default :
>   // print "You cannot access this
>   // information." Finish page.
> } ;
>
> Sure, the question is really quick (whether or not ENUM returns an
> integer or string), but now that I think about it, does it really matter
> for the purposes of my example here?  Wouldn't this PHP code be able to
> take a string or an integer as an argument to the "switch" statement?
>
> Thanks for any advice anyone can give!
>
>
> Erik
>
>
> -
> 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: SubSelect Workaround

2002-01-04 Thread Mr. psm996

>
>database,sql,query,table
>Can someone please tell me why this won't work.
>
>if (defined($res)){
>   my $stmt = qq{select distinct symbol from portfolio where $res};
>   my $sth = $dbh->prepare($stmt);
>   $sth->execute();
>
>   my $portsymbols = "";
>
>   while ($sth->fetchrow) {
>   $portsymbols .= "'$_',";
>   }
>
>   # remove comma at the end
>
>   $portsymbols =~ s/,$//;
>   $portsymbols = "(".$portsymbols.")";  # close the symbol list with quote
>   }
>
>   # get the symbols
>   $stmt  = qq{select distinct p.symbol, i.name
>from portfolio p, stockinfo i
>where p.symbol = i.symbol };
>   $stmt .= qq{and p.symbol in $portsymbols } if (defined($res));
>   $stmt .= "order by symbol";
>
>Thanks.
>
>
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
>




_
Send and receive Hotmail on your mobile device: http://mobile.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




Newbie Question - Long Queries

2002-01-04 Thread Bill Pierson

Greetings all,
I'm new to the list, and I'm somewhat new to MySQL.
I have a somewhat simple question that I hope someone can help me with.

I'm designing a database for a job search. There are a little over 10,000
entries in the db.
I need to query the database to accomplish a few results, one of which is a
little perplexing to me.

Just a little background as to how it works -
The person can choose a county and a basic job description, and I make the
query string dependant on what they choose. For example, if they choose one
specific county or select "all counties," it sets the query appropriately.
The problem that I have is - if there are 7 counties, I've got the string
saying:
select * from jobs where (county='county1' or description like '%county1%'
or title like '%county1%') or (county='county2' or description like
'%county2%' or title like '%county2%')  etc, and if they choose a
specific keyword it then throws that into the query.

The computer is a dual P3 1GZ w/1.5GB's of RAM - RedHat 7.2 - PERL DBI - it
takes over 3 seconds to complete queries like that, and I know that I can
get it faster.

Any suggestions would be appreciated sincerely.
Thanks,
--Bill


-
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: JOIN question

2002-01-04 Thread Rick Emery

How about:
mysql>  select count(*) from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;

-Original Message-
From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:09 PM
To: [EMAIL PROTECTED]
Subject: JOIN question



howdy,

i have a table, pictures,  with usernames and pictures like below.

mysql> select * from pictures;
+--+---+
| user | pictures   |
+--+---+
| 189  | aftermath189.jpg  |
| 189  | OSEIiod189.jpg |
| 189  | Isla_de_la_vida_1024189.jpg  |
| 189  | energynew189.jpg|
| 189  | emblem189.jpg  |
| 189  | small_oasis189.jpg  |
+--+---+

i have another table, usernames, with a ton of columns, name, date, address,
etc...

what i want to do is select all the columns from usernames based on the
state, and if they have a picture, give me a yes or no.  here is what i have
so far...

mysql>  select usernames.user,ask,pass,pictures.user from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;
++-+-+---+
| user | ask  | pass | user |
++-+++
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
++-+++

since this user has six pictures( they can have from 0 to 6), it gives me 6
lines of output.  what i am looking for is just one line of output.
something like below...
++-+-+-+
| user | ask  | pass | pictures |
++-++--+
| 189  | 222 | F   | (something that says yes or no, 1 or 0,
anything)   |
++-++--+

i need all of the requested columns from usernames, and just one from
pictures.  is this possible?

matt

-
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




Date formating

2002-01-04 Thread Jesse Shy

I am push a couple of date fields to mysql via the myODBC driver, however
the fields are in there original format as JUN01/01 and the like. Right now
these fields are type CHAR and I cant do any calculations on them. Is there
a built in function to make this a legitimate date or am I stuck munging it
with Perl and reinserting it into date fields?


-
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




JOIN question

2002-01-04 Thread Boex,Matthew W.


howdy,

i have a table, pictures,  with usernames and pictures like below.

mysql> select * from pictures;
+--+---+
| user | pictures   |
+--+---+
| 189  | aftermath189.jpg  |
| 189  | OSEIiod189.jpg |
| 189  | Isla_de_la_vida_1024189.jpg  |
| 189  | energynew189.jpg|
| 189  | emblem189.jpg  |
| 189  | small_oasis189.jpg  |
+--+---+

i have another table, usernames, with a ton of columns, name, date, address,
etc...

what i want to do is select all the columns from usernames based on the
state, and if they have a picture, give me a yes or no.  here is what i have
so far...

mysql>  select usernames.user,ask,pass,pictures.user from usernames INNER
JOIN pictures ON usernames.user=pictures.user where state = "Delaware" order
by ask limit 25;
++-+-+---+
| user | ask  | pass | user |
++-+++
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
| 189  | 222 | F   | 189  |
++-+++

since this user has six pictures( they can have from 0 to 6), it gives me 6
lines of output.  what i am looking for is just one line of output.
something like below...
++-+-+-+
| user | ask  | pass | pictures |
++-++--+
| 189  | 222 | F   | (something that says yes or no, 1 or 0,
anything)   |
++-++--+

i need all of the requested columns from usernames, and just one from
pictures.  is this possible?

matt

-
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: ENUM -- integers or strings?

2002-01-04 Thread Rick Emery

What happened when you experimented?  What were your results?

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 2:03 PM
To: [EMAIL PROTECTED]
Subject: ENUM -- integers or strings?


A quick question --

If I have a table with an ENUM column, and the possible values are ("0", 
"1", "2", "3"), does the number qualify as an integer or a string?

I am working in PHP4 and intend to compare this value as such:

// dbaccess.access_level is ENUM("0", "1", "2", "3") column
// $user_id has been established already

 2 :
// generate HTML + PHP page giving user
// ability to SELECT, INSERT, UPDATE, or
// DELETE from tables.  Finish page, then
break ;
case $access_level > 1 :
// generate HTML + PHP page giving user
// ability to SELECT or INSERT from/to
// tables.  Finish page, then
break ;
case $access_level > 0 :
// generate HTML + PHP page giving user
// ability to SELECT from tables.
// Finish page, then
break ;
default :
// print "You cannot access this
// information." Finish page.
} ;

Sure, the question is really quick (whether or not ENUM returns an 
integer or string), but now that I think about it, does it really matter 
for the purposes of my example here?  Wouldn't this PHP code be able to 
take a string or an integer as an argument to the "switch" statement?

Thanks for any advice anyone can give!


Erik


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

2002-01-04 Thread Walter D. Funk

Thanks for your answer,

I´ve created a TEMPORARY table and it seems to work well for my purpose,
the only doubt I still have is, if the table gets automatically deleted when
the user
closes the connection, or should I do something within my script to avoid a
stack overflow?
if there are too many simultaneous connections which create several
temporary tables is it posible to
knock down the server?

thanks in advance

- Original Message -
From: "David Yahoo" <[EMAIL PROTECTED]>
To: "Walter D. Funk" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 3:45 PM
Subject: Re: UNION


> You have to search for "create temporary" table then make
> severals
> insert into this_table as select 
>
> Note that the temporary table are thread local I think so only the current
> connexion can see it.
>
>
>
>
> > HI,
> >
> > I found a very usefull function in Mysql (to combine the result of many
> > SELECTS in one result set ), which is UNION
> > SELECT 
> > UNION [ALL]
> > SELECT 
> >   [UNION
> >SELECT ...]
> >
> > the problem is, that it was implemented in version 4.0 and above;
> > anyone can tell me if there is a way to re-phrase the same query but
> > for an older engine, like 3.23.33
> >
> > best regards
> > Walter D. Funk
> >
> >
> >
> > -
> > 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




ENUM -- integers or strings?

2002-01-04 Thread Erik Price

A quick question --

If I have a table with an ENUM column, and the possible values are ("0", 
"1", "2", "3"), does the number qualify as an integer or a string?

I am working in PHP4 and intend to compare this value as such:

// dbaccess.access_level is ENUM("0", "1", "2", "3") column
// $user_id has been established already

 2 :
// generate HTML + PHP page giving user
// ability to SELECT, INSERT, UPDATE, or
// DELETE from tables.  Finish page, then
break ;
case $access_level > 1 :
// generate HTML + PHP page giving user
// ability to SELECT or INSERT from/to
// tables.  Finish page, then
break ;
case $access_level > 0 :
// generate HTML + PHP page giving user
// ability to SELECT from tables.
// Finish page, then
break ;
default :
// print "You cannot access this
// information." Finish page.
} ;

Sure, the question is really quick (whether or not ENUM returns an 
integer or string), but now that I think about it, does it really matter 
for the purposes of my example here?  Wouldn't this PHP code be able to 
take a string or an integer as an argument to the "switch" statement?

Thanks for any advice anyone can give!


Erik


-
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: ms acess to mysql-More information

2002-01-04 Thread Investor

Are you using the myodbc drivers for mysql?


--- Norman McLeod <[EMAIL PROTECTED]> wrote:
> Thanks for the help so far.
> 
> The specific error messages I get are:
> 
> 
> SQLDriverConnect returned: SQL_ERROR=-1
> dbc:  szSqlState = "S1000", *pfNativeError = 1130,
> *pcbErrorMsg = 108,
> *ColumnNumber = -1, *RowNumber = -1
>   
>MessageText = "[TCX][MyODBC]Host
> 'jackson-24-159-79-100.midtn.chartertn.net' is not
> allowed to connect to
> this MySQL server"
> 
> dbc:  szSqlState = "S1000", *pfNativeError = 1130,
> *pcbErrorMsg = 108,
> *ColumnNumber = -1, *RowNumber = -1
>   
>MessageText = "[TCX][MyODBC]Host
> 'jackson-24-159-79-100.midtn.chartertn.net' is not
> allowed to connect to
> this MySQL server"
> 
> dbc:  szSqlState = "01000", *pfNativeError = 0,
> *pcbErrorMsg = 140,
> *ColumnNumber = -1, *RowNumber = -1
>   
>MessageText = "[Microsoft][ODBC Driver
> Manager] The driver doesn't
> support the version of ODBC behavior that the
> application requested (see
> SQLSetEnvAttr)."
> 
> dbc:  szSqlState = "01000", *pfNativeError = 0,
> *pcbErrorMsg = 140,
> *ColumnNumber = -1, *RowNumber = -1
>   
>MessageText = "[Microsoft][ODBC Driver
> Manager] The driver doesn't
> support the version of ODBC behavior that the
> application requested (see
> SQLSetEnvAttr)."
> 
> 
> It seems to me that the first 2 have to do with the
> permissions in setup,
> but that's only a guess.
> The bottom 2 I expect I could work on the settings
> strings on my end?
> 
> Any logic to my guesses???
> 
> 
> -Original Message-
> From: Dan Crawford [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 1:24 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: ms acess to mysql
> 
> 
> I successfully upsized a small Access 2000 database
> to MySQL this weekend.
> It was a little tricky, and I had to do some manual
> altering of the table
> structures after I upsized, but I eventually got it
> to work.
> 
> Are you getting any kind of error message that might
> shed some light on the
> issue?
> 
> Dan Crawford
> Integrated Network Strategies
> 
> > My question too...
> >
> > Matter of fact, I found a ODBC driver for
> M$<->MySQL access, i.e.,
> > Visual C++/Visual Basic/Access, but can't get it
> to work. Anybody have
> > any experience with this?
> >
> > I know about the "Port 3306", I know about the
> wildcard permissions to
> > access MySQL from any domain, but still can't get
> it to work...
> >
> >
> > Thanks in Advance
> >
> > Norm McLeod
> > Digital Signature & Public PKI key attached
> 
> >
> >
> >
> > -Original Message-
> > From: Duncan Hill [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 04, 2002 12:45 PM
> > To: Investor
> > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: ms acess to mysql
> >
> >
> > On Fri, 4 Jan 2002, Investor wrote:
> >
> >> Has anyone converted data in MS Access to Mysql?
> >>
> >> I would think this is possible!!
> >
> > "ODBC".
> >
> > (sql,mysql,database)
> >
> > --
> >
> > Sapere aude
> > My mind not only wanders, it sometimes leaves
> completely.
> > Never attribute to malice that which can be
> adequately explained by
> > stupidity.
> >
> >
> >
>
-
> > 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
> 


=
Regards,

Investorclb

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.

RE: ms acess to mysql-More information

2002-01-04 Thread Norman McLeod

Thanks for the help so far.

The specific error messages I get are:


SQLDriverConnect returned: SQL_ERROR=-1
dbc:szSqlState = "S1000", *pfNativeError = 1130, *pcbErrorMsg = 108,
*ColumnNumber = -1, *RowNumber = -1

MessageText = "[TCX][MyODBC]Host
'jackson-24-159-79-100.midtn.chartertn.net' is not allowed to connect to
this MySQL server"

dbc:szSqlState = "S1000", *pfNativeError = 1130, *pcbErrorMsg = 108,
*ColumnNumber = -1, *RowNumber = -1

MessageText = "[TCX][MyODBC]Host
'jackson-24-159-79-100.midtn.chartertn.net' is not allowed to connect to
this MySQL server"

dbc:szSqlState = "01000", *pfNativeError = 0, *pcbErrorMsg = 140,
*ColumnNumber = -1, *RowNumber = -1

MessageText = "[Microsoft][ODBC Driver Manager] The driver doesn't
support the version of ODBC behavior that the application requested (see
SQLSetEnvAttr)."

dbc:szSqlState = "01000", *pfNativeError = 0, *pcbErrorMsg = 140,
*ColumnNumber = -1, *RowNumber = -1

MessageText = "[Microsoft][ODBC Driver Manager] The driver doesn't
support the version of ODBC behavior that the application requested (see
SQLSetEnvAttr)."


It seems to me that the first 2 have to do with the permissions in setup,
but that's only a guess.
The bottom 2 I expect I could work on the settings strings on my end?

Any logic to my guesses???


-Original Message-
From: Dan Crawford [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 1:24 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: ms acess to mysql


I successfully upsized a small Access 2000 database to MySQL this weekend.
It was a little tricky, and I had to do some manual altering of the table
structures after I upsized, but I eventually got it to work.

Are you getting any kind of error message that might shed some light on the
issue?

Dan Crawford
Integrated Network Strategies

> My question too...
>
> Matter of fact, I found a ODBC driver for M$<->MySQL access, i.e.,
> Visual C++/Visual Basic/Access, but can't get it to work. Anybody have
> any experience with this?
>
> I know about the "Port 3306", I know about the wildcard permissions to
> access MySQL from any domain, but still can't get it to work...
>
>
> Thanks in Advance
>
> Norm McLeod
> Digital Signature & Public PKI key attached 
>
>
>
> -Original Message-
> From: Duncan Hill [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 12:45 PM
> To: Investor
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: ms acess to mysql
>
>
> On Fri, 4 Jan 2002, Investor wrote:
>
>> Has anyone converted data in MS Access to Mysql?
>>
>> I would think this is possible!!
>
> "ODBC".
>
> (sql,mysql,database)
>
> --
>
> Sapere aude
> My mind not only wanders, it sometimes leaves completely.
> Never attribute to malice that which can be adequately explained by
> stupidity.
>
>
> -
> 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: Connection problems

2002-01-04 Thread Rick Emery

It does appear that MYSQL has not been compiled in.  Execute the "phpinfo()"
function in a script to determine if MYSQL is in there.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 1:14 PM
To: [EMAIL PROTECTED]
Subject: Connection problems


Hi,

I try to connect to MySQL on a server (not my own, it's a shared server)
with the following PHP script:


I always get the error:
"Fatal error: Call to undefined function: mysql_connect() ".

Normally this means that PHP is not correctly configured with MySql. My
service provider confirms that everything is working correctly. Other
(non-mysql) php scripts do work.

I also run the script phpinfo() and I don't find Mysql settings. I only find
in the configure command : "--with-mysql=shared".

Can please someone help?  Is my provider not telling the truth or must I
connect in a different way? Do I have to put some files or directories in my
root?

Best regards,
Erik



-
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




ms access to mysql, anyone familar with this?

2002-01-04 Thread Investor

I need to convert ms access to mysql.

Has anyone done this successfully ??

thanks

=
Regards,

Investorclb

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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: ms acess to mysql

2002-01-04 Thread Dan Crawford

I successfully upsized a small Access 2000 database to MySQL this weekend.  
It was a little tricky, and I had to do some manual altering of the table 
structures after I upsized, but I eventually got it to work.

Are you getting any kind of error message that might shed some light on the 
issue?

Dan Crawford
Integrated Network Strategies

> My question too...
> 
> Matter of fact, I found a ODBC driver for M$<->MySQL access, i.e.,
> Visual C++/Visual Basic/Access, but can't get it to work. Anybody have
> any experience with this?
> 
> I know about the "Port 3306", I know about the wildcard permissions to
> access MySQL from any domain, but still can't get it to work...
> 
> 
> Thanks in Advance
> 
> Norm McLeod
> Digital Signature & Public PKI key attached 
> 
> 
> 
> -Original Message-
> From: Duncan Hill [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 12:45 PM
> To: Investor
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: ms acess to mysql
> 
> 
> On Fri, 4 Jan 2002, Investor wrote:
> 
>> Has anyone converted data in MS Access to Mysql?
>>
>> I would think this is possible!!
> 
> "ODBC".
> 
> (sql,mysql,database)
> 
> --
> 
> Sapere aude
> My mind not only wanders, it sometimes leaves completely.
> Never attribute to malice that which can be adequately explained by
> stupidity.
> 
> 
> -
> 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




Connection problems

2002-01-04 Thread auguse

Hi,

I try to connect to MySQL on a server (not my own, it's a shared server)
with the following PHP script:


I always get the error:
"Fatal error: Call to undefined function: mysql_connect() ".

Normally this means that PHP is not correctly configured with MySql. My
service provider confirms that everything is working correctly. Other
(non-mysql) php scripts do work.

I also run the script phpinfo() and I don't find Mysql settings. I only find
in the configure command : "--with-mysql=shared".

Can please someone help?  Is my provider not telling the truth or must I
connect in a different way? Do I have to put some files or directories in my
root?

Best regards,
Erik



-
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: ms acess to mysql

2002-01-04 Thread Investor


I found an article at
www.devshed.com/Server_Side/MySQL/ODBC/page1.html


about access and mysql




--- Duncan Hill <[EMAIL PROTECTED]> wrote:
> On Fri, 4 Jan 2002, Investor wrote:
> 
> > Has anyone converted data in MS Access to Mysql?
> > 
> > I would think this is possible!!
> 
> "ODBC".
> 
> (sql,mysql,database)
> 
> -- 
> 
> Sapere aude
> My mind not only wanders, it sometimes leaves
> completely.
> Never attribute to malice that which can be
> adequately explained by stupidity.
> 
> 
>
-
> 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
> 


=
Regards,

Investorclb

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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: ms acess to mysql

2002-01-04 Thread Norman McLeod

My question too...

Matter of fact, I found a ODBC driver for M$<->MySQL access, i.e., Visual
C++/Visual Basic/Access, but can't get it to work. Anybody have any
experience with this?

I know about the "Port 3306", I know about the wildcard permissions to
access MySQL from any domain, but still can't get it to work...


Thanks in Advance

Norm McLeod
Digital Signature & Public PKI key attached 



-Original Message-
From: Duncan Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 12:45 PM
To: Investor
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: ms acess to mysql


On Fri, 4 Jan 2002, Investor wrote:

> Has anyone converted data in MS Access to Mysql?
>
> I would think this is possible!!

"ODBC".

(sql,mysql,database)

--

Sapere aude
My mind not only wanders, it sometimes leaves completely.
Never attribute to malice that which can be adequately explained by
stupidity.


-
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: Watchdog für mysql in Perl?

2002-01-04 Thread Gary . Every

I use a simple script that does the following:

--- snip ---
mysql -e "SELECT * from table_name limit 1" db > 2>/tmp/filename
x=`cat /tmp/filename`
if [ "$x" = "" ]
then
do_nothing=1
else
## There's an issue!
echo "ERROR!"
fi
--- end snip ---

Using the re-direct of stderr is the key. the "2>/tmp/filename" sends all
error output to the /tmp/filename file. If there are no errors, the file
will be empty.

I run it as a cron job every ten minutes, and if there is an error, it pages
me.
Keeps me in the know!

-Original Message-
From: Sascha Kettner [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 5:53 AM
To: [EMAIL PROTECTED]
Subject: Watchdog für mysql in Perl?


Hi!

Short question: i want to have a perl watchdog telling me when executed
if my sql-server is running and if anything is allright with it. So if i
get any errormessage i can restart the server by remote. Has someone
done this allready? Any hint?

Thanks again and best regards

Sascha Kettner


-
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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: ms acess to mysql

2002-01-04 Thread Duncan Hill

On Fri, 4 Jan 2002, Investor wrote:

> Has anyone converted data in MS Access to Mysql?
> 
> I would think this is possible!!

"ODBC".

(sql,mysql,database)

-- 

Sapere aude
My mind not only wanders, it sometimes leaves completely.
Never attribute to malice that which can be adequately explained by stupidity.


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

2002-01-04 Thread David Yahoo

You have to search for "create temporary" table then make
severals
insert into this_table as select 

Note that the temporary table are thread local I think so only the current
connexion can see it.




> HI,
>
> I found a very usefull function in Mysql (to combine the result of many
> SELECTS in one result set ), which is UNION
> SELECT 
> UNION [ALL]
> SELECT 
>   [UNION
>SELECT ...]
>
> the problem is, that it was implemented in version 4.0 and above;
> anyone can tell me if there is a way to re-phrase the same query but
> for an older engine, like 3.23.33
>
> best regards
> Walter D. Funk
>
>
>
> -
> 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




compile problem under SuSE 7.3

2002-01-04 Thread Thomas Spahni

Hi,

I loaded a fresh hardware with SuSE 7.3 and find myself unable
to compile MySQL database any more. What happens?

I unpack mysql-3.23.47 and do

./configure

which stops at some point:

checking for inline... inline
checking for off_t... yes
checking for st_rdev in struct stat... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of char... 1
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking size of off_t... 0
configure: error: MySQL needs a off_t type.

The same thing happens when using or not using some options and/or
compiler flags with
./configure.

The log file says:

In file included from configure:6797:
/usr/include/stdlib.h: In function `atoi':
/usr/include/stdlib.h:362: `__constnptr' undeclared (first use in this function)
/usr/include/stdlib.h:362: (Each undeclared identifier is reported only once
/usr/include/stdlib.h:362: for each function it appears in.)
/usr/include/stdlib.h: In function `atol':
/usr/include/stdlib.h:367: `strtoconstnptr' undeclared (first use in this functi
/usr/include/stdlib.h:367: parse error before `)'
/usr/include/stdlib.h: In function `atoll':
/usr/include/stdlib.h:374: `strtocconstnptr' undeclared (first use in this funct
/usr/include/stdlib.h:374: parse error before `)'
configure: failed program was:
#line 6793 "configure"
#include "confdefs.h"
#include 
#include 
#if STDC_HEADERS
#include 
#include 
#endif
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(off_t));
  exit(0);
}


Obviously it fails in a common system include file, namely stdlib.h, at
this point:

/*
 *  ISO C99 Standard: 7.20 General utilities
 */

#ifndef _STDLIB_H
#include 

  

/* Convert a string to a floating-point number.  */
extern double atof (__const char *__nptr) __THROW __attribute_pure__;
/* Convert a string to an integer.  */
extern int atoi (__const char *__nptr) __THROW __attribute_pure__;
/* Convert a string to a long integer.  */
extern long int atol (__const char *__nptr) __THROW __attribute_pure__;

  

#ifdef __USE_EXTERN_INLINES
/* Define inline functions which call the internal entry points.  */

  

extern __inline double
atof (__const char *__nptr) __THROW
{
  return strtod (__nptr, (char **) NULL);
}
extern __inline int
atoi (__const char *__nptr) __THROW
{
  return (int) l (__constnptr, (char **) NULL, 10);
}
extern __inline long int
atol (__const char *__nptr) __THROW
{
  return strtoconstnptr, (char **) NULL, 10);
}

  

#endif /* Optimizing and Inlining.  */



Compile option __USE_EXTERN_INLINES may be set from features.h at this
point (grep finds no other file *.h where it is defined):

features.h:
/* Decide whether we can define 'extern inline' functions in headers.  */
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
# define __USE_EXTERN_INLINES   1
#endif

What goes wrong here? Am I missing some prerequisite include file? Or can
I turn off 'extern inline' in some way? I do not know if my installation
is broken or I don't get the options right.

TIA for any help.
Thomas Spahni


-
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: Changing part of field

2002-01-04 Thread Carl Troein


Greg Peretti writes:

> I have a database that has a emailaddress field. A large number of the
> entries are from home.com, Excite's ISP. Since Excite is out of
> business, Comcast is converting them all to comcast.net next month.
> 
> Is there a simple way to change all home.coms to comcast.nets while
> retaining the front part of each email address in our database?
> 
> A link to the pertinent section of the manual would be most helpful.

String functions: http://www.mysql.com/doc/S/t/String_functions.html
Something like this should work:

UPDATE t1 SET email = CONCAT(SUBSTRING_INDEX(email, '@', 1),
   '@comcat.net') WHERE email LIKE '[EMAIL PROTECTED]'

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
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




ms acess to mysql

2002-01-04 Thread Investor

Hi, I am new to mysql and this list.



Has anyone converted data in MS Access to Mysql?

I would think this is possible!!


What would you recommend to enter data into Mysql, For
example if someone entering the data is not mysql
proffecient.  Could they enter data into a form or
something, then I could transfer the data at another
time.

I would greatly appreciate comments and pointers on
accomplishing this task 

=
Regards,

Investorclb

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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




Data corruption issue

2002-01-04 Thread ORBZ

I'm experiencing data corruption with the latest version of
MySQL:

ares% mysql -V
mysql  Ver 11.15 Distrib 3.23.47, for pc-linux-gnu (i686)

Compiled with:

ares% gcc --version
2.95.4

I'm running MySQL as:
/usr/local/libexec/mysqld --datadir=/home/mysql -O key_buffer_size=160M -O 
record_buffer=8M --log-slow-queries -O max_connections=500 -O wait_timeout=3600 
--memlock

After a single run of mysqld, with a normal shutdown (using
mysqladmin shutdown), myisamchk returns table errors on a
table that was clean before server startup:

ares# myisamchk -r hosts
- recovering (with sort) MyISAM-table 'hosts.MYI'
Data records: 723198
- Fixing index 1
Found wrong stored record at 357315468
Found block with too small length at 357317132; Skipped
Found link that points at 949761822580875360 (outside data file) at 357317428
Found link that points at 4402937561443737713 (outside data file) at 357318064
myisamchk: warning: Duplicate key for record at   33045928 against record at   10929792
myisamchk: warning: Duplicate key for record at  395117248 against record at  313463120
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
Data records: 723195
myisamchk: warning: 2 records have been removed

Sometimes this corruption causes mysqld to lose track of the
fields in the 'hosts' table, returning messages about it being
a fieldless table.

Anyone have any ideas what I can do to fix this?

-- 
ORBZ

-
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: Changing part of field

2002-01-04 Thread Michael Stassen


You want to change any occurrences of [EMAIL PROTECTED] to [EMAIL PROTECTED] in
column emailaddress, right?  Assuming your table is named 'mytable', it
looks to me like you could use

  UPDATE mytable
  SET emailaddress=REPLACE(emailaddress,'@home.com','@comcast.net');

See  for string
function documentation.

Note that 'comcast.net' is 3 chars longer than 'home.com'.  I mention that
only because if length('[EMAIL PROTECTED]') + 3 is greater than
the length of the emailaddress column, the extra will be lopped off at the
end in this update.  I don't imagine that will be a problem, though.

Michael

On Fri, 4 Jan 2002, Robert Lucier wrote:

> I don't think you can do it with a single command. One fairly easy way
> is to run a command to generate the sql that will do the update. So
> your first statement will be something like:
> 
> select concat( 'update  
> set emailaddress=''', emailaddress, 
> '''where =', 
>  
> substituting  and  with your values.
> Output the results of that query to a file. Use your favorite text
> editor to do the actual replacement of the email address domain. Use
> mysql to run that file as a sql script. Update complete.
> 
> --- Greg Peretti <[EMAIL PROTECTED]> wrote:
> > I have what I hope is a simple problem, but being somewhat a novice
> > at
> > MySQL, it is a bit beyond me.
> > 
> > I have a database that has a emailaddress field. A large number of
> > the
> > entries are from home.com, Excite's ISP. Since Excite is out of
> > business, Comcast is converting them all to comcast.net next month.
> > 
> > Is there a simple way to change all home.coms to comcast.nets while
> > retaining the front part of each email address in our database?
> > 
> > A link to the pertinent section of the manual would be most helpful.
> > 
> > --
> > 
> > Greg Peretti
> > web developer
> > www.abqjournal.com
> > (505) 823-3888
> > 

Michael Stassen
University Information Technology Services
Indiana University Bloomington
[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: further compile problems on Solaris 2.6

2002-01-04 Thread fil krohnengold

At Fri, 04 Jan 2002 15:34:33 +0200, [EMAIL PROTECTED] wrote...
: > from 3.23.47 to 46, 45, and 44 - my compile is getting stuck at
: > the same place for all of them.  
: > 
: > : Making all in libmysql
: > : make[2]: Entering directory `/local/src/mysql-3.23.47/libmysql'
: > : /bin/sh ../libtool --mode=link gcc  -O3 -DDBUG_OFF
: > : -DHAVE_RWLOCK_T  -o libmysqlclient.la -rpath /usr/local/lib/mysql
: > [...]
: > : rm -fr .libs/libmysqlclient.la .libs/libmysqlclient.* \
: > : .libs/libmysqlclient.*
: > 
: 
: Your problem is probably badly built or installed compiler. 
: 
: Try finding binary version of 2.95.3 for 2.6  and install it properly,
: with LD_LIBRARY_PATH pointing to the correct locations.

I wish it were as easy as a botched gcc install.  But it's not.
I just tried using the pre-compiled binary from ftp.ibiblio.org
for 2.95.2 with identical reslts.  

-fil
--
fil krohnengold
network systems administrator
american museum of natural history
[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: Changing part of field

2002-01-04 Thread Robert Lucier

I don't think you can do it with a single command. One fairly easy way
is to run a command to generate the sql that will do the update. So
your first statement will be something like:

select concat( 'update  
set emailaddress=''', emailaddress, 
'''where =', 
 and  with your values.
Output the results of that query to a file. Use your favorite text
editor to do the actual replacement of the email address domain. Use
mysql to run that file as a sql script. Update complete.

--- Greg Peretti <[EMAIL PROTECTED]> wrote:
> I have what I hope is a simple problem, but being somewhat a novice
> at
> MySQL, it is a bit beyond me.
> 
> I have a database that has a emailaddress field. A large number of
> the
> entries are from home.com, Excite's ISP. Since Excite is out of
> business, Comcast is converting them all to comcast.net next month.
> 
> Is there a simple way to change all home.coms to comcast.nets while
> retaining the front part of each email address in our database?
> 
> A link to the pertinent section of the manual would be most helpful.
> 
> --
> 
> Greg Peretti
> web developer
> www.abqjournal.com
> (505) 823-3888
> 
> ---
> 
> The web of our life is of a mingled yarn, good and ill together.
> -  William Shakespeare
> 
> 
> 
> -
> 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
> 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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




Changing part of field

2002-01-04 Thread Greg Peretti

I have what I hope is a simple problem, but being somewhat a novice at
MySQL, it is a bit beyond me.

I have a database that has a emailaddress field. A large number of the
entries are from home.com, Excite's ISP. Since Excite is out of
business, Comcast is converting them all to comcast.net next month.

Is there a simple way to change all home.coms to comcast.nets while
retaining the front part of each email address in our database?

A link to the pertinent section of the manual would be most helpful.

--

Greg Peretti
web developer
www.abqjournal.com
(505) 823-3888

---

The web of our life is of a mingled yarn, good and ill together.
-  William Shakespeare



-
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




UNION

2002-01-04 Thread Walter D. Funk

HI,

I found a very usefull function in Mysql (to combine the result of many
SELECTS in one result set ), which is UNION
SELECT 
UNION [ALL]
SELECT 
  [UNION
   SELECT ...]

the problem is, that it was implemented in version 4.0 and above;
anyone can tell me if there is a way to re-phrase the same query but
for an older engine, like 3.23.33

best regards
Walter D. Funk



-
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




3-letter stop words in FULLTEXT

2002-01-04 Thread Stephen Simons

Is there some way to turn off the default 4-letter
minimum length for words in the FULLTEXT index in mysql
3.23.41-nt ?
 
I am running a database of a fixed set of texts (about
150MB) of a religious nature and the 4-letter minimum
length setting makes it impossible to search for "God"
among other things.
 
Thanks,
 
Steve Simons

Stephen R. Simons
Software Development
The Academy of the New Church
STAIRS Project - www.theheavenlydoctrines.org
Email: [EMAIL PROTECTED]
Phone: (215) 914-4852


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

2002-01-04 Thread Simon Green

Ok...
If all you need is all the offices to have a copy the main database this
should work. But if you need two way replication this is harder.
Two way replication can be done in a loop but there can be problems with
being out of sync!

V4.1 should be able to do full two way replication.

Hope this helps

Simon

-Original Message-
From: Remco Ploeg [mailto:[EMAIL PROTECTED]]
Sent: 04 January 2002 16:14
To: Mysql (E-mail)
Subject: replication


The following question. We have got several office in Europe. Now I want to
use 1 database in Rotterdam (main) en several other in the other countries
(spain, france, portugal, belgium and germany). Know I want to synchronize
those databases of the other offices with the 'big' database (mysql) in
Rotterdam. Can I do that with Replication? 


Rotterdam (mysql)
databases:  1.rdm
2.belgium
f3.rance
4.port
5.germ


France(mysql)   Belgium(mysql)  France(mysql) Portugal(mysql) Germany(mysql)
these database must synchronize with the correspondenting database in
Rotterdam, so france=france portugal=port.
Can I do that with mysql. And do somebody have a got document how to do
that, because I tried with the mysql help but when I do that, it does not
replicate with the 2 test databases (there are connected but not
synchronizing)

Thanks in advance,

Remco Ploeg
The Netherlands

-
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: Watchdog für mysql in Perl?

2002-01-04 Thread Erik Price

Well, you could use a shell script to run "mysqladmin status".

I.e. this bash script:

#! /bin/bash

# mystatus.sh is really just a simple alias for a
# longer command.

# Usage: 'mystatus.sh PASSWORD'

# replace values of $my_hostname and $my_username if needed
my_hostname='localhost'
my_username='root'
my_password="${1}"
export my_hostname my_username my_password

# execute the command
/usr/local/mysql/bin/mysqladmin -h $my_hostname -u $my_username \
 --password=$my_password status

# end of file

I tested this out with variables corresponding to my own system, I'm 
running RH Linux with MySQL 3.23.46.  You don't even have to replace the 
values in the "variables" section of the script with your own, if your 
MySQL server is on the localhost.  The setup as is takes the password 
from STDIN, so it's not stored anywhere (though I don't know how to 
write a script that "hides" the password as you type it [yet]).  I'm 
sure that you could do a better script than this in Perl, which I don't 
yet know.

I'm still learning how to write bash scripts (this is my second one that 
does anything useful) so if this code is amateurish, sorry.

Erik





On Friday, January 4, 2002, at 06:52  AM, Sascha Kettner wrote:

> Hi!
>
> Short question: i want to have a perl watchdog telling me when executed
> if my sql-server is running and if anything is allright with it. So if i
> get any errormessage i can restart the server by remote. Has someone
> done this allready? Any hint?
>
> Thanks again and best regards
>
> Sascha Kettner
>
>
> -
> 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: load data local infile

2002-01-04 Thread Douglas Potter

Yes the data is consistent firstname, lastname, address, city... The
data is sent to me in eight different files every day.  I want to import
the data into a mysql database and set a field that is not included in
the txt file.  The files are sent to me already organized by region and
would like to have "load data local infile" or the like, set a field for
each region for each file as it is imported.




-
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




replication

2002-01-04 Thread Remco Ploeg

The following question. We have got several office in Europe. Now I want to use 1 
database in Rotterdam (main) en several other in the other countries (spain, france, 
portugal, belgium and germany). Know I want to synchronize those databases of the 
other offices with the 'big' database (mysql) in Rotterdam. Can I do that with 
Replication? 


Rotterdam (mysql)
databases:  1.rdm
2.belgium
f3.rance
4.port
5.germ


France(mysql)   Belgium(mysql)  France(mysql) Portugal(mysql) Germany(mysql) these 
database must synchronize with the correspondenting database in Rotterdam, so 
france=france portugal=port.
Can I do that with mysql. And do somebody have a got document how to do that, because 
I tried with the mysql help but when I do that, it does not replicate with the 2 test 
databases (there are connected but not synchronizing)

Thanks in advance,

Remco Ploeg
The Netherlands

-
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: duplicating column

2002-01-04 Thread Rick Emery

If you want the two tables to remain separate, for normalization purposes,
you can use JOINs:

SELECT * FROM tableA LEFT JOIN tableB USING(id);

The above statement will retrieve all the information for each id in both
tables.  Yet, the tables may be managed separately.
This is especially valuable to prevent wasted space.  For example, tableA
may have thousands of rows, but tableB has only a few which are "connected"
to tableA via the "id" field.

-Original Message-
From: P.Agenbag [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 4:58 PM
To: mysql
Subject: duplicating collumn


Hi
I have two tables, one contains a persons name and an ID number. The 
other table contains the ID number and another field. Is there a way of 
moving this collumn to the first table to corrlate with the ID's, ie, 
table 1 must now contains name, ID and another field that is specific to 
the person. The two tables are not chronological ie. the 1st entry in 
the one table is not nescessarily the first in the second table...



-
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: MySQL and COM+

2002-01-04 Thread Todd Williamsen

I think I read something about COM+.  The statement I read said it is
compatible, but I don't know about MSTDC, I would think that MSTDC would be
a Microsoft propriotary interface.
- Original Message -
From: "Patryk Choroś" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 8:42 AM
Subject: MySQL and COM+


> Hi!
>
> Have anyone of you used mysql and com+? is it possible to get com+/mstdc
> transactions to work with mysql?
>
> TIA
>
> Patryk
>
>
> -
> 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: duplicating collumn

2002-01-04 Thread Dibo Chen

Michael Brunson wrote:
> 
> On Fri, 04 Jan 2002 00:58:19 +0200, "P.Agenbag"
> <[EMAIL PROTECTED]> wrote:
> 
> | Hi
> | I have two tables, one contains a persons name and an ID number. The
> | other table contains the ID number and another field. Is there a way of
> | moving this collumn to the first table to corrlate with the ID's, ie,
> | table 1 must now contains name, ID and another field that is specific to
> | the person. The two tables are not chronological ie. the 1st entry in
> | the one table is not nescessarily the first in the second table...
> 
> CREATE TABLE t3 (
>ID ...,
>pn ...,
>af ... );
> INSERT INTO t3 (ID,pn,af)

Above lines can be replaced/shortened, I think, as
CREATE TABLE t3  (followed by following lines)

>SELECT t1.ID, t1.pn, t2.af
>FROM t1 LEFT JOIN t2 USING ID;
> ALTER TABLE t1 RENAME t1_old;
> ALTER TABLE t3 RENAME t1;
> 
> Thanks,
> Michael
> --
> Michael Brunson  504.473.6643
> [EMAIL PROTECTED] ICQ: 83163789
>   ---   Intercosmos Media Group, Inc.  ---
>   www.intercosmos.comwww.directnic.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

-
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 on AIX RS6000

2002-01-04 Thread Dave Butler

You may need an updated version of zlib:

http://freeware.bull.net/download/aix43/zlib-1.1.3.2.exe

--
database,sql,query,table


-
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: Command Line Editing Mode

2002-01-04 Thread Jörgen Winqvist

Hi,

This $HOME/.inputrc gets you "vi-mode" in mysql and other programs that 
uses readline.

set editing-mode vi
set show-all-if-ambiguous On # after TAB is pressed

Regards
Jörgen

Quentin Bennett wrote:

>Hi,
>
>Using the mysql CLI, I have discovered that 
>
>ESC-Return Return
>
>will put the CLI editor in to 'vi' mode, and allow me to use my 'normal' ksh
>editing keys, available in ksh after "set -o vi".
>
>Because I am more familiar with the vi editing keys, and they are more
>powerful than the standard MySQL CLI keys (including the ability to search
>through the history), I would prefer to use these all the time without
>having to remember the Esc Return Return sequence. Is there a way of doing
>this, or is this an un-documented feature?
>
>3.23.40 on Solaris 2.6 x86
>
>Thanks
>
>Quentin Bennett
>Transport Systems Division
>Infinity Solutions 
>web http:\\www.infinity.co.nz
>mailto:[EMAIL PROTECTED]
>Phone : +64 9 358 9720
>Fax : +64 9 309 4142
>
>
>The information contained in this email is privileged and confidential
>and intended for the addressee only. If you are not the intended 
>recipient, you are asked to respect that confidentiality and not 
>disclose, copy or make use of its contents. If received in error 
>you are asked to destroy this email and contact the sender immediately. 
>Your assistance is appreciated.
>
>-
>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: SSH tunnel MySQL traffic..

2002-01-04 Thread Heo, Jungsu Mr.

Hi~

I have trouble with ssh tunneling.

I run this command as you told.

[wertyu@inos ~]$ ssh -L 12345:localhost:3306 localhost
Secure connection to localhost refused; reverting to insecure method.
Using rsh.  WARNING: Connection will not be encrypted.
localhost: Connection refused

what's the problem?

should I run sshd deamon? if then, how to configure sshd deamon?

Thank you for advanced answer!

ps. I installed MySQL 4.0 SSL connection support.
But I cannot find any MySQL Client which support SSL connection.
although MySQL 4.0 support SSL connection, still ssh tunneling required?
Thank you!
 

Homepage = http://www.nnr.or.kr/inos/
ICQ # = 123534385
Member of DSN(database.sarang.net), NNR(nnr.or.kr)



--MIME Multi-part separator--


-
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: Updating tables via cron

2002-01-04 Thread zb

Hi!

On Thu, 3 Jan 2002, Webmaster wrote:

>   I tried to search the archives for this but I can't find it.  (Not saying 
> it isn't there just I could not find it.)  I have a table that tracks 
> events on a monthly and daily basis.  Currently I am resetting the 
> appropriate fields to 0 on a daily and monthly basis (not fun).  Is there a 
> way to set a command in the cron table to do this for me 
> automatically?  Here are the details.
> 
> db name: activity
> daily field name: dr (needs to be reset to 0)
> monthly field name: mr (same as above)

test crontab entry:

* * * * * /usr/local/mysql/bin/mysql -e "use activity; update table_name
set dr=0"

Additionally the user of the cron should have a file ~/.my.cnf
to avoid giving the password in crontab:


[client]
password=your_password


>   I know how to tell cron the date/time I want an event to trigger, but I 
> don't know the syntax of the command to send.  Any help would be appreciated.

This one was easy :-)

> Thanks,
> David

HTH.

Regards, Zoltan


-
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, innodb, linux problems

2002-01-04 Thread Heikki Tuuri

Bernard,

please upgrade to 3.23.47. There were several hang bugs in 3.23.39.

Regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB


>Hello,
>
>Hope it is a good place for the following question
>
>I use Mysql (3.23.39) and InnoDB tables on Linux (2.2.17-14smp)
>and I got deadlock (In suppose it is a deadlock) when I do intensive work.
>
>intensive work = one insert + one update + 2 selects
> (simultaneously, with 4 differents processes, on the same
table)
>
>
>I got deadlock = My processes went down (after the timeout I had set)
> and if I try an interactive request on the table (like
select count(*) from ...
> I never got the answer.
>



-
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 and COM+

2002-01-04 Thread Patryk Choroś

Hi!

Have anyone of you used mysql and com+? is it possible to get com+/mstdc
transactions to work with mysql?

TIA

Patryk


-
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: Misc Question [University of Alberta, Canada]

2002-01-04 Thread Olivier Beutels

Dear Roman Eisner, 

>Hello. I'm not sure where to submit bugs, so I'll do it here. It's not
>that major, but I thought I'd let you know

The normal place to report bugs and problems is [EMAIL PROTECTED]  

>In mysql, on Linux, I have a table, say "TempTable".
>So, I type 
>Drop table Temp
>and hit "Tab", then it autocompletes for me, and the statement
>becomes
>Drop table TempTable
>Ok. So, after I drop this table, if I type 
>Drop table temp
>and hit "Tab", then it autocompletes again to 
>Drop table TempTable.
>This is kind of annoying. this table is gone, so I dont want it
>autocompleted to that table.

Best Regards,

Olivier Beutels,

 --
For technical support contracts, go to https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Olivier Beutels
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Account Manager
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
   <___/   www.mysql.com   GSM: +358 50 571 0528 

-
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: C programming to connect mysql

2002-01-04 Thread Gerald Clark

The manual and the sources for the clients are a good place to start.

Kaming wrote:

> Hi all,
> 
> Do anyone know that how to write a C programming to connect to mysql??
> Many thanks.
> 
> Kaming.
> 
> 
> 
> 
> 
> -
> 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: Mysql ++, Inserts

2002-01-04 Thread Sinisa Milivojevic

Joshua Angolano writes:
> Can, you send insert statements through standard SQL, instead of using
> special structures? Here is an example:
> 
> 
> String loc;
> loc="home";
> Query query = con.query(); 
> query << "insert into loacation (user_location) values('"< query.execute();
> 
>  
> Assuming of course that con is a type of Connection.
> 
> 

And what is wrong with this:

query << "insert into %5:table values (%0q, %1q, %2, %3, %4q)";
query.parse();
// set up the template query I will use to insert the data.  The
// parse method call is important as it is what lets the query
// know that this is a template and not a literal string

query.def["table"] = "stock";
// This is setting the parameter named table to stock.

query.execute ("Hamburger Buns", 56, 1.25, 1.1, "1998-04-26");
query.execute ("Hotdogs' Buns"   ,65, 1.1 , 1.1, "1998-04-23");
query.execute ("Dinner Roles"  , 75,  .95, .97, "1998-05-25");
query.execute ("White Bread"   , 87, 1.5, 1.75, "1998-09-04");


No specialized structs ...


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




mysqldump Solaris 2.8 tables option

2002-01-04 Thread despotopoulos yannis

Hello,

i am using mysqldump (v 8.17 mysql version 3.23.43)
on Solaris 2.8
I am trying to get a backup of only ONE table of my database,
using the following commands

./mysqldump -u root -p -n --add-drop-table --databases LBS --tables LOG_DATA
./mysqldump -u root -p -n --add-drop-table LBS LOG_DATA
./mysqldump -u root -p -n --add-drop-table --tables LBS LOG_DATA
./mysqldump -u root -p LBS LOG_DATA

all of them are either dumping the whole LBS db or
provide an error (... 1049: Unknown database '--tables' ...)
though on  another linux box work fine!!

any help would be appreciated
thanx
./ydes


-
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, innodb, linux problems

2002-01-04 Thread Bernard Chambon

Hello,

Hope it is a good place for the following question

I use Mysql (3.23.39) and InnoDB tables on Linux (2.2.17-14smp)
and I got deadlock (In suppose it is a deadlock) when I do intensive work.

intensive work = one insert + one update + 2 selects
 (simultaneously, with 4 differents processes, on the same table)


I got deadlock = My processes went down (after the timeout I had set)
 and if I try an interactive request on the table (like select 
count(*) from ...
 I never got the answer.


 If I do a  'mysqladmin processlist', I see about 10 threads of 
insert/update/select
 worst, if I do a  'mysqladmin kill ...' to kill some thread,  nothing 
happens


The only way to recover, is to kill the mysqld processes and restart mysql


Thank you for your help

-- 
Bernard CHAMBON
IN2P3 / CNRS (Centre de Calcul de LYON)
Tél :   04 72 69 42 18 
http://www.in2p3.fr/CC

-
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]: Mysql reconnect hang

2002-01-04 Thread Sinisa Milivojevic

Peter Zaitsev writes:
> Hello Sinisa,
> 
> Wednesday, January 02, 2002, 6:21:59 PM, you wrote:
> 
> 
> No. This happens then mysql is completely restarted.
> I Understand this should not happen but somehow it does.
> 
> 
> -- 
> Best regards,
>  Petermailto:[EMAIL PROTECTED]
 

Try building your clients statically and see if it repeats ...

It is rather strange .. 

-- 
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: further compile problems on Solaris 2.6

2002-01-04 Thread Sinisa Milivojevic

fil krohnengold writes:
> 
> I have no pride - I'll use a binary if I can find a recent one
> for 2.6 - I just can't seem to find any.  I've tried backing up
> from 3.23.47 to 46, 45, and 44 - my compile is getting stuck at
> the same place for all of them.  
> 
> : Making all in libmysql
> : make[2]: Entering directory `/local/src/mysql-3.23.47/libmysql'
> : /bin/sh ../libtool --mode=link gcc  -O3 -DDBUG_OFF
> : -DHAVE_RWLOCK_T  -o libmysqlclient.la -rpath /usr/local/lib/mysql
> [...]
> : rm -fr .libs/libmysqlclient.la .libs/libmysqlclient.* \
> : .libs/libmysqlclient.*
> 
> Does this have anything to do with why I can't find 3.23.x
> binaries for solaris 2.6?  
> 
> using gcc2.95.3.  
> 
> Thanks -
> 
> -fil
> --
> fil krohnengold
> network systems administrator
> american museum of natural history
> [EMAIL PROTECTED]
> 

No, most people build MySQL on 2.6 without any major problem. 

You can not find binaries for 2.6  as we do not have direct access to
ane because there are fewer and fewer systems with 2.6, as it is two
versions behind.

Your problem is probably badly built or installed compiler. 

Try finding binary version of 2.95.3 for 2.6  and install it properly,
with LD_LIBRARY_PATH pointing to the correct locations.

-- 
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: 3.23.47 compile problems with sun's forte compiler

2002-01-04 Thread Sinisa Milivojevic

Quentin Bennett writes:
> Hi,
> 
> >From the cc(1) man page for Forte Developer 6.2
> 
>   These predefinitions are valid in all modes:
>__sun
>__unix
>__SUNPRO_C=0x530
>__`uname -s`_`uname -r`
>__sparc (SPARC)
>__sparcv9 (SPARC with -xarch=v9|v9a)
>__i386 (x86)
>__BUILTIN_VA_ARG_INCR
>__SVR4
> 
> __SUNPRO_C looks like it might be a good one to try for. Version 5.2 had
> 
>__SUNPRO_C=0x500
> 
> HTH
> 
> Quentin


Yes,  __SUNPRO_C looks fine to me too ...

-- 
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: Command Line Editing Mode

2002-01-04 Thread Fulko Hew

Quentin Bennett <[EMAIL PROTECTED]> wrote:

> Using the mysql CLI, I have discovered that 
> 
> ESC-Return Return
> 
> will put the CLI editor in to 'vi' mode, and allow me to use my 'normal' ksh
> editing keys, available in ksh after "set -o vi".

Cool... Thanks...  I didn't know that.
Now I can use it without getting frustrated.  :-))

---
Fulko Hew,   Voice:  905-681-5570
Senior Engineering Designer, Fax:905-681-5556
SITA (Burlington)Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

-
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: Updating tables via cron

2002-01-04 Thread DL Neil

David,
Was this question addressed?

> I tried to search the archives for this but I can't find it.  (Not saying
> it isn't there just I could not find it.)  I have a table that tracks
> events on a monthly and daily basis.  Currently I am resetting the
> appropriate fields to 0 on a daily and monthly basis (not fun).  Is there a
> way to set a command in the cron table to do this for me
> automatically?  Here are the details.
>
> db name: activity
> daily field name: dr (needs to be reset to 0)
> monthly field name: mr (same as above)
>
> I know how to tell cron the date/time I want an event to trigger, but I
> don't know the syntax of the command to send.  Any help would be appreciated.

Cron will allow you to put together shell scripts and work in other ways to achieve 
this. Will leave details to
you/your system/your preferences.

MySQL has a "batch mode". Once you know the terminology, a search of the manual will 
yield a ton of material.
Check out: 3.6  Using mysql in Batch Mode for
shell> mysql < batch-file
(you will probably need to study this to work out a more sophisticated command line 
than that)
For example:
shell> mysql database < script.sql > output.tab
which appears in section: 4.8.2  The Command-line Tool

The DuBois book discusses batch mode and gives a shell script example on p76.

Welling and Thomson discuss "file redirection" somewhat in passing on p195 and use it 
extensively, eg to set up
new db/tbl definitions (if they detail it elsewhere I've failed to note it).

Regards,
=dn



-
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: Replication between MSSQL and mySQL

2002-01-04 Thread steffen


The idea was to have an exact replica which is always up to date. They will
be networked, but is this really the only solution? I had pictured
something like a trigger in the MSSQL that could push-replicate to the
mySQL. The mySQL would then only update the changed data in the MSSQL.

Med venlig hilsen/Best regards

Steffen Tang



   
 
Steve  
 
Rapaport To: [EMAIL PROTECTED] 
 
   Subject: Re: Replication between MSSQL 
and mySQL   
   
 
03-01-2002 
 
17:50  
 
Please 
 
respond to 
 
steve  
 
   
 
   
 




Anything is possible, this will depend on your situation.

If you just want to replicate the data once, you can dump it all
in text format (say, tab-separated fields, CRLF-separated records)
onto a few CDs, and import them into MySQL using mysqlimport.


If you have the two machines networked, it's that much easier, but you
will still export to text and import to mysql.

If you want the replication to run continuously, so that the mysql
version is usually up-to-date, you can still use the same method but
it will require a bit of scripting and will be clumsy, use a lot
of disk, etc.

But it's all possible.

-steve


> We have a SQL2000 database (about 15GB) and we want to develop some
> webapplications to present the content. We dont want to use the current
> DB-server but insted make a replica to run the application on, i.e. a new
> server. Would it be possible to replicate the SQL2000 to a mySQL server?
> (One of the reasons for this is that we have a rather large Sun-server
> which we are not using for anything)



--
Steve Rapaport
World Citizen


-
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: assigning root password

2002-01-04 Thread Joshua Angolano

After an install, you should be able to connect to Mysql as root without
a password. Example: mysql - u root. Then SET PASSWORD FOR root@"%" =
PASSWORD('biscuit'); That will set the root password for any host to
biscuit. To set the password for root@localhost SET PASSWORD FOR
root@localhost = PASSWORD('biscuit');

-Original Message-
From: plainfield [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 04, 2002 5:46 AM
To: [EMAIL PROTECTED]
Subject: assigning root password

Hello,

I have installed mysql source distribution. Now I tried assigning the
root password 
for mysql. I tried with " mysqladmin -u root password 'password' " and I
also tried
" mysql  -u  root  mysql"  so that I can insert the password for the
root user. Both of 
these are giving same error.

"cannot connect to root@localhost (Using password 'yes') "

Before issuing these commands I had started the mysql server "safemysqld
&".

Please let me know the possible solutions to this.

Regards,
Prakash 



-
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




Mysql ++, Inserts

2002-01-04 Thread Joshua Angolano

Can, you send insert statements through standard SQL, instead of using
special structures? Here is an example:


String loc;
loc="home";
Query query = con.query(); 
query << "insert into loacation (user_location) values('"
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysql replication

2002-01-04 Thread Remco Ploeg

Goodmorning,
I have two machines running mysql (win nt) They are running now, in the slave data 
dir, i see that the slave is connected to the master:

Slave: connected to master [EMAIL PROTECTED], replication started in log 'FIRST' at 
postition 305

But when I insert data into the master, the slave does not update that. Do I have to 
use a command to do that.
This is my ini file of the master:
#This File was made using the WinMySQLAdmin 1.3 Tool
#14-12-2001 13:24:25

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
log-bin
server-id=1
basedir=C:/mysql
#bind-address=60.0.1.219
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=root
password=xxx

And this is the slave:
[WinMySQLAdmin]
Server=C:/MYSQL/bin/mysqld-opt.exe
user=root
password=xx

[mysqld]
master-host=50.0.1.219
master-user=repl
master-password=x
server-id=2
basedir=C:/MYSQL
#bind-address=50.0.1.138
datadir=C:/MYSQL/data
#language=C:/MYSQL/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M


Do you know what is wrong?

thanks in advance,

Remco Ploeg
The Netherlands


-
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




Watchdog für mysql in Perl?

2002-01-04 Thread Sascha Kettner

Hi!

Short question: i want to have a perl watchdog telling me when executed
if my sql-server is running and if anything is allright with it. So if i
get any errormessage i can restart the server by remote. Has someone
done this allready? Any hint?

Thanks again and best regards

Sascha Kettner


-
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




assigning root password

2002-01-04 Thread plainfield

Hello,

I have installed mysql source distribution. Now I tried assigning the
root password 
for mysql. I tried with “ mysqladmin –u root password ‘password’ “ and I
also tried
“ mysql  -u  root  mysql”  so that I can insert the password for the
root user. Both of 
these are giving same error.

“cannot connect to root@localhost (Using password ‘yes’) “

Before issuing these commands I had started the mysql server “safemysqld
&”.

Please let me know the possible solutions to this.

Regards,
Prakash 



-
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: problem with mysql connection

2002-01-04 Thread Carl Troein


naveed abdul writes:

> Can't connect to local Mysql server through socket 
> '/var/run/mysql/mysql.sock'

Along with that you get an error code which you should look
up (using perror). Without knowing what the error is it's
sort of hard to tell you what to do about it, but the
most common problems seem to be that mysqld is not running or
just plain old messed up file permissions.

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
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: MyODBC leaking handles...

2002-01-04 Thread Jens Collin

Venu,

I really look forward to the update.
Thanks for following up!

Regards,
___

Jens A. Collin
Envox Technical System Developer

Envox Group
Söder Mälarstrand 43
118 25 Stockholm
Sweden

Office: +46 (0)8 56 256 000
Fax   : +46 (0)8 56 256 050

[EMAIL PROTECTED]
http://www.envox.com
___
 

-Original Message-
From: Venu [mailto:[EMAIL PROTECTED]]
Sent: den 3 januari 2002 18:38
To: Jens Collin
Cc: [EMAIL PROTECTED]
Subject: RE: MyODBC leaking handles...


Hi,

> -Original Message-
> From: Jens Collin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 02, 2002 11:44 PM
> To: '[EMAIL PROTECTED]'
> Cc: [EMAIL PROTECTED]
> Subject: RE: MyODBC leaking handles...
>
>
> Hi again,
>
> From what I can see, when the driver is unloaded (I guess when my
> application is shut down) it releases all handles again. But the init
> shouldn't take 800.000 handles over time right? :)
>

There was a leak in the server and some part of driver in 2.50.39
w.r.t. loading and unloading.

The server side got the fixes from 4.0.1 or 3.23.48 versions, and
driver will have from 2.50.40 or 3.51.01 onwards.

The 3.51 driver will be released shortly. Keep tuned to
[EMAIL PROTECTED] for the release announcement.

Regards, Venu
--
For technical support contracts, go to https://order.mysql.com
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Mr. Venu <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/  California, USA
   <___/  www.mysql.com


>
> -Original Message-
> From: Venu [mailto:[EMAIL PROTECTED]]
> Sent: den 19 december 2001 20:01
> To: Jens Collin; [EMAIL PROTECTED]
> Subject: RE: MyODBC leaking handles...
>
>
> Hi,
>
> > -Original Message-
> > From: Jens Collin [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 19, 2001 3:05 AM
> > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> > Subject: RE: MyODBC leaking handles...
> >
> >
> > Hi again,
> >
> > Some more information;
> > OS: Windows 2000 Professional, SP2a + all patches
> > mySQL 3.32.46 (windows version)
> > myODBC 2.50.37
> >
> > I open then database, do a select, close the recordset and finally close
> the
> > database.
> > This results in 2 handles increase. (Notised in windows task manager)
> > If I loop this test, the handles counter just goes through the roof.
over
> > 800.000 handles over one night!
> > I have done the exact same test with MS SQL Server 7.0 and 2000, no
> missing
> > handles.
> > This works for oracle's drivers as well.
> >
> > I guess that a trace can be useful? However, I should upload it to your
> FTP
> > right? (If I read the manual right :))
> > I'll be happy to assist you with any data needed, just let me know what
to
> > send.
> >
>
> Thanks for the feedback. I will look into it immediately. When
> I tested with PURIFY, I couldn't find any leaks. Let me do a
> cross check again.
>
> Another small note, might be useful. There are some open
> resources allocated for the driver during the initialization,
> and will be freed only upon termination or unloading of
> driver from memory. So, does this happen even after
> terminating the application in the proper sequence of
> calls ?
>
> No need of any trace right now, if needed I will ask you.
>
> Regards, Venu
> --
> For technical support contracts, go to https://order.mysql.com
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /   Mr. Venu <[EMAIL PROTECTED]>
>  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Developer
> /_/  /_/\_, /___/\___\_\___/  California, USA
><___/  www.mysql.com
>
>
>
> >
> >
> >
> > -Original Message-
> > From: Venu [mailto:[EMAIL PROTECTED]]
> > Sent: den 18 december 2001 19:38
> > To: Jens Collin; [EMAIL PROTECTED]
> > Subject: RE: MyODBC leaking handles...
> >
> >
> > Hi,
> >
> > > -Original Message-
> > > From: Jens Collin [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, December 18, 2001 4:22 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: MyODBC leaking handles...
> > >
> > >
> > > Hi all,
> > >
> > > This is my first post in this forum. I've tried to find something in
the
> > > documentation but failed.
> > > I cannot find out why the ODBC driver is leaking 1 handle for each
> request
> > > that I do!
> > > It doesn't matter if I close it or whatever I do.
> > > Anyone that knows what to do?
> > > Any hints or tips?
> >
> > Recently we found the leaks in the initialization
> > towards UNIX, and fixed them from driver and server,
> > but we didn't find any thing from Windows (The Unix
> > fixes will be there for 2.50.40 and 3.51.01)
> >
> > >
> > > Windows 2000 Professional
> > > MySQL 3.23
> > > MyODBC 2.50.39
> >
> > Can you be more specific on this, please ? If you can send the
> > leaks statistics, it will be a great help.
> >
> > Regards, Venu
> > --
> > For technical support contracts, go to https://order.mysql.com
> >__  ___ ___   __
> >   /  |/  /_ __/ __/ __ \/ /