Delete

2001-08-04 Thread Eric Fegraus

Hello,
I just checked the list for answer to this question and looks like there
hasn't been one. I have a similar problem, I want to delete a record
from a table where the value of the field is equal to the value of a
field in another table. 

delete from table1 where table1.column = table2.column;

Any thoughts?

Thanks,
Eric

-Original Message-
From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 1:30 PM
To: [EMAIL PROTECTED]
Subject: Delete


Hi, im trying to delete a record from a table where the value of a field
must be equal to the value of a field of another table.I
know
this is wrong but I need to show you what I mean. I think I'm missing a
very
important select statement to join them...can
anyone
help me out?


Delete from table1 where table1.value = table2.value



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

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




Searching records ?'s

2001-07-06 Thread Eric Fegraus

Hi Everyone,

I'm writing a script using perl for a search function.  I have a large
text column that I want to scan for certain words. I do something like
the following:

select * from table_name where column_1 LIKE %word1% AND column_1 LIKE
%word2%;

In this situation, words like 'tree' will return 'streets'. 

How can I find exact matches while still scanning the entire record? Are
there any MySQL REGEX's that might help out.  I'm considering indexing
the entire column and compare my query against it but wanted to see if
there were any other solutions out there.  

Thanks!
Eric

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

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




LIKE

2001-07-02 Thread Eric Fegraus

Hi Everyone,

Does this make sense:
select * from table_name where column_1 LIKE %word1% OR %word2%;

yeilds 1 record but...

select * from table_name where column_1 LIKE %word2% OR %word1%;

yields 0 records.  

I'm scanning a VARCHAR column trying to return records that contain or
word1 and word2. Same thing occurs when I replace OR with AND.  The
search words appear appear in the column as:
 word1 followed by word2.  

Am I using the LIKE incorrectly? Does MySQL have to match the first LIKE
operator before the second?

Much thanks,

Eric

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

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

2001-04-11 Thread Eric Fegraus

The redhat 7 mysql version doesn't work correctly...i.e. the mysql.h is
missing.  The solution is to re-install with the a tarball from the
mysql site..  :(

eric


-Original Message-
From: Gordon Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 5:29 AM
To: [EMAIL PROTECTED]
Subject: Mysql and Perl DBI




I am running Redhat 7 and mysql and I have tried to install Msql-Mysql
DBI
module But I get errors when I do a make.

Can any one help

Gordon



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

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




Perl-MySql DBD Errors

2001-04-04 Thread Eric Fegraus


Hello,

I have redhat 7.0 with Mysql Ver 8.8 Distrib 3.23.22-beta.  This was the
Mysql version that came on the redhat cd's.  Perl and the Perl DBI are
installed and working correctly.  MySql seems to be working correctly as
well(i.e. no problems with permissions, created db's, tables, etc).
However, I can't install the mysql::DBD...I grabbed this from the Mysql
site,
Msql-Mysql-modules-1.2215.tar.  For the life of me I can't find the
mysql.h file that it keeps asking for?  Any ideas where this is...is it
a bug with this version.  

Thanks in advance!

Eric



-Original Message-
From: Gerald Clark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 10:23 AM
To: Chris Becker
Cc: [EMAIL PROTECTED]
Subject: Re: Perl - DBD:DBI Errors


Chris Becker wrote:
 
 I checked my RH6.2 install cd's and found zlib-1.1.3-6.src.rpm, I went
to
 install the package with the following command and get the following
error:
 
 rpm -ivh zlib-1.1.3-6.src.rpm
 Unable to open /usr/lib/rpm/rpmrc for reading: No such file or
directory.
 
 When I originally installed the os I selected a custom install and
checked
 every option provided.  Why can I not use the rpm utility?  Do I need
to
 install that?  I have an rpm entry in the man pages???  I am logged in
as
 root.
 
 Please help, and...
 
 Thanks Again,
 ChrisB
 
 -Original Message-
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
 Behalf Of Gerald Clark
 Sent: Wednesday, March 28, 2001 9:26 AM
 To: Chris Becker
 Cc: [EMAIL PROTECTED]
 Subject: Re: Perl - DBD:DBI Errors
 
 You don't have zlib on your machine.
 Check your 6.2 CD.
 
 Chris Becker wrote:
 
  I'm having trouble installing the perl module DBD specifically.  I
found
 on
  my CPAN cd the DBD module Msql-Mysql-modules-1.2208, tried to
install it
 and
  got errors, I discovered I needed DBI installed first.  So I found
 DBI-1.13
  and did the following:
 
  perl Makefile.PL
  make
  make test
 
  Made 100 connections in 0 wallclock secs...
  test.pl done
 
  DBI seemed to install ok.  Then I found DBD
Msql-Mysql-modules-1.2210 and
  did the following:
  perl Makefile.PL
  select 1) MySQL only
  n - for install perl emulation
  then
  make
  make test
 
  then get output from make test:
  ...install_driver(mysql) failed: Can't load
  '../blib/arch/auto/DBD/mysql/mysql.so' for  module DBD::mysql:
  ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress
at
  /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169.
  at (eval 1) line 3
  at t/00base.t line 38
  dubious
   Test returned status 255 (wstat 65280, 0xff00)
  Undefined subroutine Test::Harness::WCOREDUMP called at
  /usr/lib/perl5/5.00503/
  Test/Harness.pm line 288.
  make[1]: *** [test_dynamic] Error 255
  make[1]: Leaving directory
'/perlmods/Msql-Mysql-modules-1.2210/mysql'
  make:  *** [test] Error\ 2
 
  after the above errors even i tried executing the 'make install'.
Then I
  tried a sample perl file using the 'use DBI' function to test the
perl
  module install w/ MySQL, and when I execute I get the same error:
 undefined
  symbol: uncompress at blah blah blah...
 
  Please Help.  What am I doing wrong?  Do I need to do an un-install
before
  trying to re-install DBD?  Should I blow out Perl altogether and
 reinstall?
  Has anyone seen this before?
 
  Thanks in advance,
 
  Chris Becker
 

That is a source RPM.
Your looking in the wrong directory.
look on RedHat/RPMS

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

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