Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
merging user and password tables.. how?
Old 06-20-2007, 06:40 PM merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
I'm about to install a system for my site which closely resembles myspace. I need to merge my forum user tables with the myspace login. How can I go about achieving this?

And please don't tell me I have to merge the user tables or edit the login script, I know that! Tell me exactly how and what I need to do
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
 
Register now for full access!
Old 06-20-2007, 06:50 PM Re: merging user and password tables.. how?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Uh, if you want step by step instructions, you're going to have to provide a hell of a lot more detail. With what you've said so far, the answer is "Add a column to one of the tables, and write a query to populate it."
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-20-2007, 06:56 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
ok tell me exactly what you need and I'll provide you with what you need to know. I'm new to all of this
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 06-20-2007, 07:36 PM Re: merging user and password tables.. how?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
What type of database are these tables stored in, what's the schema for the two tables ( if possible, put the DDL create table statements in here ), and what's it should look like when finished? Does it matter which table you new column ends up in?

Is there a particular reason you aren't using a view? Do the two fields need to be written in the same table?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-20-2007, 08:05 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
wow, you're talkin in a language I barely know. I want my users to be able to take their forum password and e-mail address and login to the new homepage. I guess I want the myspace login and forum login to be the same table so that when someone registers through the forums or vice versa, the homepage, it automatically makes a user login for the forums and homepage.

it's MySql 5.. ummmm yeah, I can't really provide anymore unless you explain in newb talk lol
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 06-20-2007, 08:44 PM Re: merging user and password tables.. how?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
The problem is that while everybody knows SQL and can tell you the answer to questions that are strictly about that (If I have a field that's null and I, well, something like that), but out of all the members of this forum, only you know how your database is set up.

You're asking for specific instructions on how to make changes to the blueprints, but you're asking people who've never seen the blueprints before. We can tell you all about pens and markers, but we can't tell you which room is which.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-20-2007, 09:16 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
^^ True.. how much do you think it would cost someone to do this? Cuz I don't know how to answer unless you break it down which you already have and I still don't get :P
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 06-21-2007, 01:15 PM Re: merging user and password tables.. how?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
It's really not that hard, you shouldn't have to pay for it. Even if you do, you'll still have to deal with tech problems as you get your developer logged into the database. Maybe better to do this yourself?

Let's take a step or two back. What is it you're actually trying to achieve here?

I have a feeling you don't actually have to move the data around. I think a simple query to "see" both pieces ( user name and password ) together is probably all you need. But if you could walk through what you want to happen here people can give you better advice. I tend to take the weekends off from surfing the net, and spend time with the wife, but I can help out today and tomorrow, and there are lots of other bright folks in here.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-22-2007, 06:29 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
^ the words you speak are comforting. OK, I want it that the forums user tables are shared with the myspace user tables. So when someone signs up to the forums (www.offthaave.com/forums) the e-mail (or possibly username) and password they enter when they register there can carry over and be able to login here ( sneak peek **********) and vice versa. When someone signs up from the soon to be new homepage, I want them to be able to log into the forums with it...

So that would mean when one signs up through either the soon to be myspace clone or the forums, it automatically makes a universal user that can login to either, using the same info .... get me? Anything else you need to know?
__________________

Please login or register to view this content. Registration is FREE

Last edited by offthaave; 07-01-2007 at 08:40 PM..
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 06-22-2007, 06:37 PM Re: merging user and password tables.. how?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Okay, that makes sense. In your database, it sounds like you have two tables for membership. Do you know what these tables are called, and what fields they have in them?

I'm almost sure MySql 5 supports union queries. Probably the easiest way to accomplish what you want to do would be to write one of these that will list out both of your tables as if they were one big table, and use this query so you have all the information consolidated, but we don't have to actually move records around to different places. We could do that, too, but this may be a little easier, and part of the idea of using a database is to store the data once, and then use queries to look at it in different ways.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-22-2007, 07:10 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
well for the myspace login, I believe (by looking at it now) that the fields are:

"otaspace > user"


"offthaav_forums > user"


there is a long list for the forums user table... So does this help or what else do you need?
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 06-22-2007, 07:38 PM Re: merging user and password tables.. how?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Do you have an interface where you can type (or better yet, paste) in SQL queries and see the results from them?

This is just a for starters, but try running this query - although you may need to edit the table names if I'm reading them wrong?

SELECT userid FROM "otaspace > user"
UNION SELECT user FROM "offthaav_forums > user"

Run that, and have a look at the output. It should automatically filter out any user ID codes that are in both tables, which probably isn't what you want. It does that for distinct row values, not for just one particular field. You can turn that off by saying UNION ALL SELECT blah blah blah. Or just by adding more fields until it's unique.

SELECT userid, password FROM "otaspace > user"
UNION SELECT user, password FROM "offthaav_forums > user"

Then, once you've added in all the fields you could possibly want, either you can save the query as a view in the database, or take all the results from the query and paste them into a brand new table. The UNION will automatically pull and merge the results from both tables into the query output, so then all that's left is to update other parts of your app to refer to whichever table you put the answer into.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-22-2007, 09:02 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
wow..... gonna have to read that over a few times to try to see what you're telling me to do hahaha
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 07-01-2007, 08:38 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
alright, I've installed a different service that fits my needs.. www.offthaave.com/testing2 . I tried to search for that line a code you pasted by hitting "Search" up top by "Import" and "Export" and the rest. I got this error.

Quote:
Error

SQL query:
SELECT *
FROM `members`
WHERE SELECT member_id
FROM "avespace > members"
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT member_id FROM "avespace > members"
LIMIT 0, 30' at line 1
oh yeah, with the new service, the tables are different. Instead of "user > userid", it's "members > memberid". What should I do now? Does that matter?
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 07-04-2007, 05:31 PM Re: merging user and password tables.. how?
Average Talker

Posts: 19
Name: Haha Why??
Location: Chicago
Trades: 0
yeah so no more help? L. Newbie? Anyone? ::Ghost Town:: (tumble weed)
__________________

Please login or register to view this content. Registration is FREE
offthaave is offline
Reply With Quote
View Public Profile Visit offthaave's homepage!
 
Old 07-05-2007, 06:16 AM Re: merging user and password tables.. how?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
MySql should be

avespace.members
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to merging user and password tables.. how?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.59430 seconds with 12 queries