Ok, if I understood correctly you have two tables one just logs IP addresses
and usernames and another having user information, correct?
 If thats the case, just alter your users table to add an IP column (and
user name column as well if needed) and use INSERT INTO ... SELECT ...
syntax to populate the IP column in users tables with the values in IP
table..
See: http://www.mysql.com/doc/I/N/INSERT_SELECT.html  for this.
 And in your PHP script just have both of your insert statements to insert
to the users table consistently.
  However this may ended up making your users table have a lot of NULL
values if hte number of records in both tables don't match.
Gurhan

-----Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 5:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Any way to do this with a minimum of queries?


I log IP addresses on my site, along with the persons username.  Right now,
they are logged in a seperate table, but I would like to store them in my
users table now.  I can't start my ip logging again, since the list of ips
is also used for a hit counter.   What is a good way (if there is one) to
transfer those ips with a minimum of queries?  I use a mysql database.
Thanks!

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to