Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Bob Cohen
Here's my question.  I wrote this query:

Select * FROM name WHERE last LIKE d AND choice1=2 OR choice2=2 OR
choice3=2;
   
What I'm looking for are records that satisfy the LIKE d condition
But then, Only one of the three other conditions need be true:
choice1=2
choice2=2
choice3=2

I want to cover the possibilities, e.g.,

choice1=2
choice2=1
choice3=1

choice1=1
choice2=2
choice3=whatever

Or
choice1=1
choice2=1
choice3=2

Does this make sense?  The query I've written doesn't seem quite right.
Because of the AND following the LIKE d condition, it seems like all
the records will have to have choice2 equaling 2.

Some help clarifying this issue would be appreciated.  Thanks.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Stupid Newbie Query Help with AND and OR logical operators

2004-05-08 Thread Bob Cohen
Thanks to Bernard, Sunmaia, and Ingo!  I knew the query wasn't quite
right.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Remove a RPM Installation

2004-03-02 Thread Bob Cohen
 Please how can I remove a RPM installation. I used 
 MySQL-server-4.1.1-1.i386.rpm to install MySQL, but how can I 
 delete it.

shell rpm -e MySQL-server-4.1.1-1 should do the job, assuming that
MySQL-server-4.1.1-1 is the correct name.  You can verify the package
name by typing shell rpm -qa | grep -i my*.  That'll give you the exact
names of all the mysql rpms installed on your system.  

Check out http://www.linuxhomenetworking.com/linux-hn/rpm.htm for a
great tutorial on using rpm.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Upgrade from 3.23.x to 4.0.18

2004-02-20 Thread Bob Cohen
Quick question.  I just did an upgrade from source from 3.23.x to
4.0.18.  A few things came up.

1. chown -R mysql var causes my RedHat 7.3 to complain.

chown: getting attributes of `var': No such file or directory

2. Stopped mysql by typing 

 shell service mysql stop

3. Tried to start using /usr/local/mysql/bin/mysqld_safe --user=mysql


[EMAIL PROTECTED] mysql]# touch: creating `/usr/local/mysql/var/narsil.err':
No such file or directory
chown: getting attributes of `/usr/local/mysql/var/narsil.err': No such
file or directory
Starting mysqld daemon with databases from /usr/local/mysql/var
/usr/local/mysql/bin/mysqld_safe: /usr/local/mysql/var/narsil.err: No
such file or directory
/usr/local/mysql/bin/mysqld_safe: /usr/local/mysql/var/narsil.err: No
such file or directory
tee: /usr/local/mysql/var/narsil.err: No such file or directory
040220 13:04:57  mysqld ended
tee: /usr/local/mysql/var/narsil.err: No such file or directory

Typing ps -aux | grep my displays:

mysql32238  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32240  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32241  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32242  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32243  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32244  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32245  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32246  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32247  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/
mysql32248  0.0  2.3 54068 11836 ?   S13:04   0:00
/usr/local/mysql/

So it would appear that the mysql daemon is running but now I can't
access the databases with the mysql client e.g., mysql -u root -p.

Help would be most graciously appreciated.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RegExp Help

2004-01-21 Thread Bob Cohen
Sorry for the newbie question.
[Begin]$Groveling_non-programmer_string_of_excuses[End].  I imported a
bunch of records into a table.  One of the fields came through bracketed
in double quotes, e.g., field data.  I want remove the double quotes
but not the data bracketed within. E.g., field data to field data.

Here's my stab at the SQL:

UPDATE 02093_xdir_links
SET title *
WHERE title REGEXP[]*[];

Will this work?.  Is there a better way? Did I get it right?  Normally
I'd just experiment but this is a live database.

Thanks in advance.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RegExp Help

2004-01-21 Thread Bob Cohen
 you should be able to use STR_REPLACE.
   DOH.  Sorry, there is NO STR_REPLACE its just REPLACE.
   jd
 
 update 02093_xdir_links SET title = REPLACE(*,,title);

Thank you very much for responding.  Sorry to be dense but will this SQL
find only those records with data in the TITLE field that are bracketed
in double quotes and remove ONLY the quotes?

E.g., Change the record from:

Id  Title   Address City
State   Zip
1   Joe   1313 Mockingbird Lane   TransylvaniaPA
02098
^

To:

Id  Title   Address City
State   Zip
1   Joe 1313 Mockingbird Lane   TransylvaniaPA
02098
^^^

To my untrained eye it looks like the REPLACE, as you wrote it above,
searches the title field for anything e.g., *.  And replaces it with
nothing .

Thanks.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Importing Data into MySQL

2003-12-19 Thread Bob Cohen
Sorry in advance for the dumb newbie question but . . . I'm using a
content management system and want to avoid the hassle of entering data
by hand when I've already got it in a delimited text file.  I get the
basic concept of using mysqlimport.  However, the source file's data
doesn't match the target file's structure.  Of particular concern for me
is that the target table has record id files the would need to be
incremented.

I get the task on the conceptual level.  E.g., map the incoming columns
with the appropriate fields in the target table and increment the record
id number.  I'm a web designer not a programmer. I'm not at all sure how
to accomplish this task. Though I would like to learn.

Any help would be appreciated.  Thanks.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



HELLLLP! Databases No Longer Accessible

2003-12-15 Thread Bob Cohen
I seem to be locked out.  The trouble started when I deleted the Any
user while in phpMyAdmin.  After doing that, I reloaded MySQL. 

MySQL seems to load from the command line using the command mysqld_safe,
except the command prompt doesn't return unless I hit control Z.  Once I
^Z myself back to the command line, I can access MySQL via only one
username. And when I exit as root, the stopped jobs message appears.
When I exit all the way, MySQL unloads and the Web sites become
inaccessible.  I tried following the procedures Paul DuBois' book MYSQL,
including bypassing the GRANT tables.  I know I must be missing
something basic.  Help would be appreciated!

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: HELLLLP! Databases No Longer Accessible

2003-12-15 Thread Bob Cohen
I don't really know exactly what happened.  As luck would have it, I had
a username with all privileges that WOULD connect.  Using that, in
combination with shutting down and restarting MySQL, I reorganized the
user database and now things work.  Thanks.

Bob Cohen
b.p.e.Creative
http://www.bpecreative.com
Design and production services for the web
Put creative minds to work for you


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]