[ale] foreign key?

Russell Hogg russellh at x-soft.com
Fri Jan 25 11:54:14 EST 2002


OH

Guess I should scroll down

>>
PS.  Oh yeah, I'm using mysql 3.22 on debian 2.2.
>>

sheesh..
Russ


_________________________________________
russellh at x-soft.com


-----Original Message-----
From: David S. Jackson [mailto:deepbsd at earthlink.net] 
To: ale at ale.org
Sent: Friday, January 25, 2002 11:49 AM
To: ale at ale.org; kplug-list at kernel-panic.org; mysql at lists.mysql.com
Subject: [ale] foreign key?

Hi,

I'm trying to update the values of Contact_ID and
Volunteer_ID in a table called Contributors.  The layout for
Contributors is

+----------------+--------------+------+-----+---------+----------------+
| Field          | Type         | Null | Key | Default | Extra
|
+----------------+--------------+------+-----+---------+----------------+
| Contributor_ID | tinyint(3)   |      | PRI | 0       |
auto_increment |
| Name           | varchar(100) |      |     |         |
|
| Street_Address | varchar(50)  | YES  |     | NULL    |
|
| City           | varchar(20)  | YES  |     | NULL    |
|
| State          | varchar(5)   | YES  |     | NULL    |
|
| Zip            | mediumint(8) | YES  |     | NULL    |
|
| Contact_ID     | tinyint(3)   | YES  |     | NULL    |
|
| Volunteer_ID   | tinyint(3)   | YES  |     | NULL    |
|
+----------------+--------------+------+-----+---------+----------------+

I'm using the command:

 update Contributors set Contact_ID = "1", Volunteer_ID = '13'
 where Name = "Somebody Lastname";

After having issued the command, I get 

Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

But then when I select * in Contributors where Name = "Somebody
Lastname";	The values haven't been updated.  They remain 0
and 0.

What gives?  Is this a foreign key problem?

TIA.


PS.  Oh yeah, I'm using mysql 3.22 on debian 2.2.

-- 
David S. Jackson                        dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The other day I... uh, no, that wasn't me.
		-- Steven Wright

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be

sent to listmaster at ale dot org.

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list