In my continuing attempt to make a user module for my CMS work, I keep
running into errors with the folowing query, which makes no sense to me
at all:
INSERT IGNORE INTO mos_comprofiler(id,user_id) SELECT id,id FROM mos_users";
where mos_comprofiler is a new parallel User DB and mos_users is the
original database of users. This first query is supposed to work when
there is a id column in mos_users. However, my mos_users table has a
user_id column insted.
So I then altered the above to read:
INSERT IGNORE INTO mos_comprofiler(id,user_id) SELECT id,user_id FROM
mos_users";
so that it would parse the user-id column instead of id - but it didn't
work.
I then ran the following query:
INSERT IGNORE INTO mos_comprofiler(id,user_id) SELECT id,user_id FROM
test_users";
where test_users is a standard table of users with the normal id field.
The query fails and phpmyadmin says: #1054 - Unknown column 'user_id' in
'field list'.
To my eyes, the query doesn't seem to make sense -- or the syntax being
used is arcane, I'm not sure which. Any ideas how I can make this query
work for a mos_users table that has the field user_id insted of id?
August