Regular expresion replace possibility?

2003-07-21 Thread Dean Householder
Is it possible to run a query that will just alter text possibly using a regular 
expression?  I have about 250 rows that I want to strip quotes out of.  Does anyone 
know of an easy way to do this?

Dean

Re: Regular expresion replace possibility?

2003-07-21 Thread Dean Householder
Worked like a charm!  I couldn't find anything about this in MySQL docs
though... Neither before I knew what to search for nor after.  What's up
with that?

Dean


- Original Message -
From: Mike Hillyer [EMAIL PROTECTED]
To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 1:53 PM
Subject: RE: Regular expresion replace possibility?


UPDATE mytable SET mytext = REPLACE(mytext,'','');

Assuming you wised to strip a double quote, modify to suit.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Dean Householder [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 21, 2003 2:49 PM
 To: [EMAIL PROTECTED]
 Subject: Regular expresion replace possibility?


 Is it possible to run a query that will just alter text
 possibly using a regular expression?  I have about 250 rows
 that I want to strip quotes out of.  Does anyone know of an
 easy way to do this?

 Dean


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


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



Joining multiple tables results not complete

2003-02-19 Thread Dean Householder
I am perplexed trying to retrieve all the rows I need in the query I'm
doing.

I have a table with keeping track of people using ID numbers as the primary
key and another table with coupon numbers and a reference to the first
table.  But not all the second table is going to have correlating matches to
the first table.  So, in other words not all people have a coupon number
entered into the database.

I run the query:

SELECT table1.id, table2.coupon FROM table1, table2 WHERE
table1.id=table2.person_id;

I expect back a report of the 213 rows in table1 and their matching coupon #
if they have one.  Instead, I get 174 rows and THEIR matching coupons but no
results from the others.  I want to write a query that will return the id's
from table1 and the table2 coupon regardless of whether the table2.person_id
matches table1.id.

How do I do this?

Thanks,
Dean


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

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 to access MySQL via MySQLFront

2003-01-13 Thread Dean Householder
The problem is with the new glibc-2.2.5-40 package released on October 3,
2002. Apparently its a known issue, and people are aware of it. The best
solution I've seen so far is to role back to a previous version of this
package, and its dependencies.

If you are a redhat member, you have access to the errata information, as
well as, the previous versions of updated binary rpms. (so you don't have to
recompile anything)

I downloaded glibc-2.2.5-39, and associated files. To role back the rpm, use
the following command:

(This was the command I used)
rpm -U --oldpackage --force filename

(I think you can simplify the command to:)
rpm -Uvh --oldpackage filename
(but I haven't tried it)

MySQL-Front now seems to work fine for me.

Hope this helps,
Dean Householder

http://mysqlfront.venturemedia.de/index.php?act=STf=8t=434


- Original Message -
From: David Rayroud [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 7:14 AM
Subject: Problem to access MySQL via MySQLFront


 Hi,

 Here is my configuration :
 Linux SME Server 5.6 bêta 7
 Mysql 3.23.49

 I try to access to Mysql via a client programm nammed MysqlFront. I have
 defined an user like this :
 Username : blank
 Host :  .domain_name.ch
 Password : blank

 When I try to connect to MySQL, this error message come :

 MySQL - Error
 Connection failed:
 2013 - Lost connection to MySQL server during query

 But I try to put into /etc/hosts

 IP mypc.domain_name.ch mypc

 and I retry to connect to MySQL via MySQLFront, and all is OK.


 I will not declare all of the PC into /etc/hosts. Is there a solution ? I
 browse the MySQL Documentation but I didn't find something.


 Thank you for your help and excuse for my poor English.

 David Rayroud


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

 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




Accessing new columns within the WHERE condition

2002-08-01 Thread Dean Householder

Okay, I thought I'd done this before but maybe not.  I can't figure it out
now.

What I want to do is:

SELECT column AS something FROM table WHERE something  5

Basically I'm creating a new column called something and I want to use it to
compare with in the WHERE condition.  Is this possible?

Ultimately I want to have MySQL calculate the age of people and also put a
condition on it.  I am using a very old fashioned web language which doesn't
have a lot of power.  I could do this in PHP if I could only use it.  But I
need MySQL to do it.

Any thoughts?

Also what is the name of this that I am doing, creating a new column.  Is it
a dynamic column or something?


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

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




basic query question

2002-02-19 Thread Dean Householder

I'm fairly new to MySQL, so if anyone could help me I'd really appreciate
it!

What I'm trying to do is join two pictures in a database to each other.  My
database holds info about people with variables:

id, lname, fname, engagedto, pic

The engagedto field contains the id of the person they are engaged to.  I'm
trying to print the people that are engaged to each other next to each
other.  I've played with the join command and a little with group but don't
really understand how these work...  If anyone could point me in the right
direction regarding how to query the database to return these records
connected to each other, I would really appreciate it!

Thanks so much

Dean


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

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: basic query question

2002-02-19 Thread Dean Householder

Okay, so I do this and all I end up with is

+-+---+-+---+
| id  | lname | fname   | engagedto |
+-+---+-+---+
| 131 | Hallows   | Samuel  | 131   |
| 273 | Simmons   | Maria   | 273   |
| 221 | Papa  | Sharla  | 221   |
|  18 | Biehl | Ruth| 18|
| 302 | Vance | Alicia  | 302   |
| 123 | Goettl| Christopher | 123   |
|  78 | Ellsworth | Morgan  | 78|
| 204 | Millet| David   | 204   |
+-+---+-+---+
8 rows in set (0.00 sec)

The returning query doesn't seem very helpful.
I guess what I want is mysql to return the results with each person they are
engaged to in order.

I added the p1.id and p1.engagedto fields.

mysql select p1.id, p1.lname, p1.fname, p1.engagedto, p2.engagedto from
members p1, members p2 where p1.id = p2.engagedto;
+-+---+-+---+---+
| id  | lname | fname   | engagedto | engagedto |
+-+---+-+---+---+
| 131 | Hallows   | Samuel  | 18| 131   |
| 273 | Simmons   | Maria   | 78| 273   |
| 221 | Papa  | Sharla  | 123   | 221   |
|  18 | Biehl | Ruth| 131   | 18|
| 302 | Vance | Alicia  | 204   | 302   |
| 123 | Goettl| Christopher | 221   | 123   |
|  78 | Ellsworth | Morgan  | 273   | 78|
| 204 | Millet| David   | 302   | 204   |
+-+---+-+---+---+
8 rows in set (0.01 sec)

This at least shows me the info I had in my original table.  If I looked at
it I could see that id# 131 should match up with id# 18 and such.  I guess
I'm looking for a query that will match these to up either in the same row
or one after another.

Any help is SOOO appreciated!

Dean

- Original Message -
From: Roger Karnouk [EMAIL PROTECTED]
To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, February 19, 2002 12:17 PM
Subject: RE: basic query question


you will have to join the table with itself
and reference it as if it is two tables.
this might be slow however so you might want to make some
specific indexes to speed it up.

This Query will return all the people who are engaged
and a picture of their fiancé:

select p1.lname, p1.fname, p1.pic, p2.pic
from people p1, people p2
where p1.id = p2.engagedto;

this query will return people whether they are engaged or not:
select p1.lname, p1.fname, p1.pic, p2.pic
from people p1 left join people p2 on (p1.id = p2.engagedto);

-Original Message-
From: Dean Householder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: basic query question


I'm fairly new to MySQL, so if anyone could help me I'd really appreciate
it!

What I'm trying to do is join two pictures in a database to each other.  My
database holds info about people with variables:

id, lname, fname, engagedto, pic

The engagedto field contains the id of the person they are engaged to.  I'm
trying to print the people that are engaged to each other next to each
other.  I've played with the join command and a little with group but don't
really understand how these work...  If anyone could point me in the right
direction regarding how to query the database to return these records
connected to each other, I would really appreciate it!

Thanks so much

Dean


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

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: basic query question

2002-02-19 Thread Dean Householder

Thank you all so much for helping me with this query.  It works!  Best of
all, now I understand how to join tables and such!  Thanks again!

- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Dean Householder' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, February 19, 2002 1:04 PM
Subject: RE: basic query question


You're very close:

mysql select p1.lname, p1.fname, p2.lname as engaged_lname, p2.fname as
engaged_fname from members p1, members p2 where p1.id = p2.engagedto;

but the REAL question is What do you want out of the query?

-Original Message-
From: Dean Householder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 1:53 PM
To: Roger Karnouk; [EMAIL PROTECTED]
Subject: Re: basic query question


Okay, so I do this and all I end up with is

+-+---+-+---+
| id  | lname | fname   | engagedto |
+-+---+-+---+
| 131 | Hallows   | Samuel  | 131   |
| 273 | Simmons   | Maria   | 273   |
| 221 | Papa  | Sharla  | 221   |
|  18 | Biehl | Ruth| 18|
| 302 | Vance | Alicia  | 302   |
| 123 | Goettl| Christopher | 123   |
|  78 | Ellsworth | Morgan  | 78|
| 204 | Millet| David   | 204   |
+-+---+-+---+
8 rows in set (0.00 sec)

The returning query doesn't seem very helpful.
I guess what I want is mysql to return the results with each person they are
engaged to in order.

I added the p1.id and p1.engagedto fields.

mysql select p1.id, p1.lname, p1.fname, p1.engagedto, p2.engagedto from
members p1, members p2 where p1.id = p2.engagedto;
+-+---+-+---+---+
| id  | lname | fname   | engagedto | engagedto |
+-+---+-+---+---+
| 131 | Hallows   | Samuel  | 18| 131   |
| 273 | Simmons   | Maria   | 78| 273   |
| 221 | Papa  | Sharla  | 123   | 221   |
|  18 | Biehl | Ruth| 131   | 18|
| 302 | Vance | Alicia  | 204   | 302   |
| 123 | Goettl| Christopher | 221   | 123   |
|  78 | Ellsworth | Morgan  | 273   | 78|
| 204 | Millet| David   | 302   | 204   |
+-+---+-+---+---+
8 rows in set (0.01 sec)

This at least shows me the info I had in my original table.  If I looked at
it I could see that id# 131 should match up with id# 18 and such.  I guess
I'm looking for a query that will match these to up either in the same row
or one after another.

Any help is SOOO appreciated!

Dean

- Original Message -
From: Roger Karnouk [EMAIL PROTECTED]
To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, February 19, 2002 12:17 PM
Subject: RE: basic query question


you will have to join the table with itself
and reference it as if it is two tables.
this might be slow however so you might want to make some
specific indexes to speed it up.

This Query will return all the people who are engaged
and a picture of their fiancé:

select p1.lname, p1.fname, p1.pic, p2.pic
from people p1, people p2
where p1.id = p2.engagedto;

this query will return people whether they are engaged or not:
select p1.lname, p1.fname, p1.pic, p2.pic
from people p1 left join people p2 on (p1.id = p2.engagedto);

-Original Message-
From: Dean Householder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: basic query question


I'm fairly new to MySQL, so if anyone could help me I'd really appreciate
it!

What I'm trying to do is join two pictures in a database to each other.  My
database holds info about people with variables:

id, lname, fname, engagedto, pic

The engagedto field contains the id of the person they are engaged to.  I'm
trying to print the people that are engaged to each other next to each
other.  I've played with the join command and a little with group but don't
really understand how these work...  If anyone could point me in the right
direction regarding how to query the database to return these records
connected to each other, I would really appreciate it!

Thanks so much

Dean


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

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

Is there an MSSQL limit function?

2002-02-16 Thread Dean Householder

I want to run a query like:

select * from table order by rand() limit 3

in MySQL it would work but I need to run it in MSSQL.  I've been searching
for a limit function in MSSQL and I can't find a way to do it.  I'm
experienced with MySQL but know nothing about MSSQL.  If someone could point
me in the right direction I would really appreciate it!

Thanks,
Dean




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

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