[ale] foreign key?

David S. Jackson deepbsd at earthlink.net
Fri Jan 25 11:48:31 EST 2002


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.






More information about the Ale mailing list