PDA

View Full Version : same database 2 scripts with username


Mihai
02-12-2008, 02:15 AM
hi.
I have 2 php scripts that use the same DB,
and i want to mash this scripts togheder but i have problems because both of this scripts are registering users. One with the functions name $id and $pass , and the second one function test_users $id ( username ).
My questions is how to use the same id for both, were first $id= test_users - $id ?
Do i have to modifie in SQL ?

Mihai
02-12-2008, 02:17 AM
SELECT COUNT( * ) AS `Rows` , `id`
FROM `test_users`
GROUP BY `id`
ORDER BY `id`
LIMIT 0 , 30

first script uses this SQL

and the second
member_id mediumint(8) UNSIGNED ZEROFILL No auto_increment
login varchar(20) latin1_swedish_ci No
enabled enum('yes', 'no') latin1_swedish_ci No yes
password varchar(20) latin1_swedish_ci No
email varchar(150) latin1_swedish_ci No
displayname varchar(25) latin1_swedish_ci No
newsletter enum('yes', 'no') latin1_swedish_ci No yes
ipaddr varchar(16) latin1_swedish_ci No

in my database i have test_users that is been used by a script that registers users and a second one member_id that is been used by a diferent script.
Hope this helps. If not please tell me what info you need.
if you need some info i have right now phpmyadmin open and i can copy anything you need.
Thank you.