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 ?
php function
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: php function
Your explanation was a bit confusing.. can you post some code?
Re: php function
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
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
Re: php function
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.
Mihai
Hope this helps. If not please tell me what info you need.
Mihai
Re: php function
if you need some info i have right now phpmyadmin open and i can copy anything you need.
Thank you.
Thank you.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: php function
Why don't you just rewrite the script? Doesn't seem very practical trying to mash two pieces of code together.
I still am very confused as to what you are talking about?
You have a table test_users?
And you have two different scripts inserting into this table?
Also, please use the edit button instead of multiple posts in a row.
I still am very confused as to what you are talking about?
Just want to clarify some things..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.
Mihai
You have a table test_users?
And you have two different scripts inserting into this table?
Also, please use the edit button instead of multiple posts in a row.
Re: php function
i have a DB medieval were one table created from a php script made "members_id", and i installed a new script on the same database that created a new table "test_id", and i want to instert some functions from one script in to other, but i does not work because both of the scripts require to log in order to use thouse funtions. So my questions is how can i do this.
Or if you want i can point were on my website.
http://www.cetatea.info/
And the second script is on http://www.cetatea.info/index2.php
hope this helps
Or if you want i can point were on my website.
http://www.cetatea.info/
And the second script is on http://www.cetatea.info/index2.php
hope this helps
Re: php function
So .... are you asking how to open two databases at the same time to copy records from one to the other?
EDIT: Or maybe, how to allow logins from either table?
EDIT: Or maybe, how to allow logins from either table?
Re: php function
in order for me to use both scripts i will have to put my users to sign twice in two diferent Id pass box-forms.
So if i want to use one script without them ( my users ) to log twice i just have to ask one function to copy the other value, or do i have to point one value as equal as the other?
So if i want to use one script without them ( my users ) to log twice i just have to ask one function to copy the other value, or do i have to point one value as equal as the other?