hi!
The application is a password-username-location-type store. The types are web,mysql,
and entries for different computers to I can see all usernames/passwords on certain
computers ....
I would like to make myIsam tables into innodb to provide foreign keys, but I have a
'missing link'
I need to insert 'broken reference' items into another table, to complete the
cycle/circle ....
I need to move items from hash.lokation into location.location .....
mysql> select hash.username as 'hash-username',hash.lokation as 'broken reference',
location.location
-> as 'missing item'
-> from hash left join location on location.location=hash.lokation where
location.location is null;
+---------------+-------------------+--------------+
| hash-username | broken reference | missing item |
+---------------+-------------------+--------------+
| joeofcle | staroffice | NULL |
| eunjin | www | NULL |
| joe | www2 | NULL |
| root | www2 | NULL |
| daz | pop | NULL |
| joeofsa | www.vbulletin.com | NULL |
| spiegel | directvinternet | NULL |
| eunjin | lt.sirfsup | NULL |
| root | rfi-mysql2 | NULL |
| david | sirfsup.com | NULL |
| webuser | rfi-mysql2 | NULL |
.....
CREATE TABLE passwd (
id mediumint not null auto_increment primary key,
FOREIGN KEY category_idx(type) REFERENCES category(type) ON DELETE SET NULL
) TYPE=INNODB
select hash.username as uname, hash.password as pass, hash.lokation as location,
location.location as type, hash.email
from hash,location
where hash.lokation = location.location;
(the foreign key reference is on a third table, the category table, but I can only get
there through
the location table, the one with the nulls)
it would seem to call for some kind of array/loop insert, how can I do that without
using a sub-select?
i can't do a insert into location (location) values ( select ... as above
how can I do this so that the following create table statement will work?
thanks,
joe
--
Joe Speigle | [EMAIL PROTECTED]
---------------------------------------------------------------------
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