nightfox
Nov 21 2005, 11:30 PM
I am intergrading this Private Messaging system into my website so that my members can login and access their PMs through the seprate PM software without loging in twice and registering twice since if I left it as is, that is what they would have to do... All I really need is 1 single table to be combined without damaging my few member's accounts (they are all friends, but I don't want to tell them that I was playing with the database and lost your account information...  ) Since I don't know much about SQL, and with my luck, if I tried this, SOMETHING would go wrong, can some one combine these two tables into ONE single table? thanks!! This is from the Private Message System, take note that some rows (e.g. email, etc.) are the same in both! By the way, I copied this strait from the installdata.php file so I don't know if this is correct or not... CODE `id` int(10) unsigned NOT NULL auto_increment, `user` text, `pass` text, `email` text, `name` text, `timeoffset` text NOT NULL, `count` int(10) NOT NULL default '0', `emailnot` text NOT NULL, `nots` text NOT NULL, `inmemlist` text NOT NULL, `showmail` text NOT NULL, `timestamp` int(10) NOT NULL default '0', PRIMARY KEY (`id`) This is my code, I removed user emails and MD5 encrypted passwords for security, I can easily replace them because I have a back-up for once the two are combined. The SQL below is what I'll use to restore the database once the two are combined, NAME below is the person's username, NAME (in the SQL) above is their REAL name and USER is their user name CODE -- -- Table structure for table `users` --
CREATE TABLE `users1` ( `id` int(16) NOT NULL auto_increment, `name` varchar(25) NOT NULL default '', `pass` varchar(75) NOT NULL default '', `active` int(1) NOT NULL default '0', `activation` varchar(100) NOT NULL default '', `icq` varchar(16) NOT NULL default '', `aim` varchar(40) NOT NULL default '', `yim` varchar(40) NOT NULL default '', `msnm` varchar(75) NOT NULL default '', `email` varchar(75) NOT NULL default '', `sitename` varchar(45) NOT NULL default '', `url` varchar(75) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=16;
-- -- Dumping data for table `users` --
INSERT INTO `users1` VALUES (3, 'USERNAME', 'PASSWORD-MD5', 1, '495c13caedb92061204b3e56d5ce506e824', '', '', '', '', '.com', '', ''); INSERT INTO `users1` VALUES (10, 'USERNAME', 'PASSWORD-MD5', 1, '923bfeefc6559f58a568ee39fc9f41e2344', '', '', '', '', '.com', '', ''); INSERT INTO `users1` VALUES (6, 'USERNAME', 'PASSWORD-MD5', 1, 'b6604b6deb693b09050c68e3605f7326855', '', '', '', '', '.com', '', ''); INSERT INTO `users1` VALUES (13, 'USERNAME', 'PASSWORD-MD5', 1, '5f826043b92d3f202f5dd98e5bee6b68394', '', '', '', '', '.com', '', ''); INSERT INTO `users1` VALUES (8, 'USERNAME', 'PASSWORD-MD5', 1, '4db1533bd02f5b057a1d9adb6d5fbd35685', '', '', '', '', '.com', '', ''); INSERT INTO `users1` VALUES (15, 'USERNAME', 'PASSWORD-MD5', 1, 'ceade8756dd352bb836fe498ad360483945', '', '', '', '', '.com', '', ''); INSERT INTO `users1` VALUES (14, 'USERNAME', 'PASSWORD-MD5', 1, '652e7d6c4441cbfeed516787a000a103869', '', '', '', '', '.com', '', '');
Thanks a whole lot! I was sitting looking at the two SQL tables clueless on how to combine them! Thanks!!! [N]F
Reply
Houdini
Nov 22 2005, 02:51 PM
That appears to be the users table from the PMsys which only has three tables all prefixed with pms_ so you have pms_log, pms_messages and pms_users the first code you displayed. Are both the databases in the same satabase or are they sperate, the only difference being the prefix, you could take your origional database and add the tables pms_... to it then you are not having to query different databases, so first make sure that you have that done, just do an export from the pms database andadd it to your then a set of queries can be set up depending on whether they are using the PM or the normal site. I gave you that link for the PMsys in an earlier post and would like to help you get it working the way you want without a bunch of acrobatics with the database on your part.
Reply
nightfox
Nov 22 2005, 11:51 PM
QUOTE(Houdini @ Nov 22 2005, 10:51 AM) That appears to be the users table from the PMsys which only has three tables all prefixed with pms_ so you have pms_log, pms_messages and pms_users the first code you displayed. Are both the databases in the same satabase or are they sperate, the only difference being the prefix, you could take your origional database and add the tables pms_... to it then you are not having to query different databases, so first make sure that you have that done, just do an export from the pms database andadd it to your then a set of queries can be set up depending on whether they are using the PM or the normal site. I gave you that link for the PMsys in an earlier post and would like to help you get it working the way you want without a bunch of acrobatics with the database on your part. The tables are in the same DATABASE, but the user TABLES need to be combined! I do not want my members to have to register and sign up twice as I think that is stupid for a module on the main site. [N]F
Reply
Houdini
Nov 23 2005, 12:25 AM
I guess what I was trying to say is that the prefix in the case of the PMsys (consista of three tables) and your regular database it may or may not have a a prefix it might just be users, you would use a join either left join, inner join or outer join depending on what you are wanting from the database. The dump in the second part of the code you have provided only lets me know that it was pulled from your database by whatever name but with no prfeix because that was the part of the overall database. The second database has no prefix, but the first is a query to create the database but what is missing is the first part which would let you know what is different about the database. Here is a link to help with joins in SQL http://www.plus2net.com/sql_tutorial/sql_inner_join.phpSince some of the code is missing then it would be hard to show a proper join and then how to use the data.
Reply
nightfox
Nov 26 2005, 02:28 AM
Thanks, I'll take a look at it when I have time. [N]F
Reply
Recent Queries:--
combing info from two different databases - 2.63 hr back. (1)
-
combine 2 mysql tables with same foreign key - 23.02 hr back. (1)
-
combining 2 sql express databases - 28.75 hr back. (1)
-
combining databases - 69.13 hr back. (1)
-
sql query for combining three tables into a single table - 79.27 hr back. (1)
-
combining 2 different database - 84.72 hr back. (1)
-
combine 2 databases into single table - 117.66 hr back. (1)
-
"combining databases" microsoft sql server - 117.86 hr back. (1)
-
combining databases into one - 124.29 hr back. (1)
Similar Topics
Keywords : combining, databases, mess
- Databases
(2)
Free Graphical Tools For Databases
(7) There are a lot of different free software in Internet, but I have found only couple of free
graphical tools for database adminiatration. On another hand, MySQL is free for non commercial
usage. That's way it will be nice to have any good free GUI for this database. I remember the
time, when one of MySQL-Front versions was for free, but now it is opened only for testing period.
There is also free version of Toad, which is not full Toad, but it looks also very well - However, I
am not going to use Oracle (wchich is quite expensive commercial tool) on my desktop. The....
All About Databases
Info, for you! (3) QUOTE Hi, I noticed there were a lot of questions in all of the database topics, so i went
around the internet using different sources, and have some information that will answer your
questions and help you understand databases. I hope this helps, and if you have any other questions
which arent answered below, please send a message asking. Thankyou. In computing, a database can be
defined as a structured collection of records or data that is stored in a computer so that a program
can consult it to answer queries. The records retrieved in answer to queries become i....
Examining Databases At A Whole Glance
SQL-92 specification (7) Most of us using databases or doing data minings are not aware of SQL-92 specification seemingly
these days. SQL-92 specifiaction is the SQL database query language standard. Oracle,mysql
postgresql,mssql and DB2 - most widely recognized SQL database programs - are all closely related to
SQL-92 specification for the use of query nevertheless how they implemented SQL-92 specification
features inside in the program. Implementation of SQL-92 specification features are applied in the
order of Oracle, postgresql and mysql. These databases might have specific database query....
How Do You Make Large Databases?
(14) In a game I'm working on, I would like to have a database of actors/actresses. I'm not sure
exactly how to do this. I'm pretty sure with the hosting here, I can only have 99 databases.
I'm a little lost as to how to make it. Can all the actors/actresses be put on one database
with the specific things I want to include (i.e. how well the do in each genre)? I'm new to
Mysql and just need some help as to where to start.....
(help With Sql And Php)retrive Datas From Realted Tables And Display Them!
Please help me to diplay datas by combining 3 tables! (4) Hi all.. Please help me to write the SQL Query for the following requirement! Im having 3
MySQL tables Sales_users Sales_products Sales_details 1st Table (Sales_users) contains unique
userID and username for the users! 2nd Table (Sales_products) Contains unique Product ID,
product Name and Product Description! 3rd Table (Sales_details) contacins unique Sales ID,
Product ID (Foreign Key), FromUser (Foreign Key) and ToUser (Foreign Key) Sales_users
User_id name 1 ....
Ms Databases
(6) Hello, I can make my own MS Access database, but can anyone tell me how to make a password gate
that checks the user info with the database? Olie122333 /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />....
Can You Make Your Own MySQL Databases?
Im an idoit (7) Can you make your own MySQL database or do they have to be bought or found from a free site i really
need help on this guys please reply or send me a PM when you have the time because i need so much
help with this atm /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"
/> thankyou very much regards Morex Gaming owner Jarvis....
Copy Databases In phpMyAdmin
(3) i have just got hosting here on astahost and i have to copy my databases from my old server... is
there an easy way of doing this? in phpmyadmin? thanx in advance you know lol /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> ....
How To Setup SMF Databases?
(4) does anyone know how to set up a database for a SMF forum.....
What Is A Database How Do I Use One?
: Information about Databases and how to get use them efficiently (7) Hello All Let's start off by talking about what a database is and how it would be efficient
in using it. It wasn't until about a year and half ago now that I was first introduced to this
new age of Database. I discovered a lot of neat things and even learned about databases the very
long way. A database is exactly how it sounds its data that has a base. The base being the place
where you store all your data. If you have ever been to a library perhaps you have used the Index to
search for an author, this is a database of authors. Ever seen a rolodex on someo....
Updating A Database's Tables
(10) Is there an "easy" way to update a database's tables? Like for instance, I have my own
custom-coded member login system. Whenever I add a new feature that needs a database, I manually
have to download, update and upload the database. Is there an easy way I can do this?
THANKS!!! F....
Unexpected Database Crashes
sometimes my astahost databases are down (0) Sometimes some of my astahost databases are down. After a couple of hours or a couple of day they
are up again. Sometimes all of them are down at the same time, sometimes some of them are up and the
other ones are down. The symptom is that when I connect to the forum I have an error message, saying
"Parse error: parse error, unexpected '\"', expecting ',' or ';' in
/home/../../.../../index.php on line 25" It's not an error in my phpbb because it used to work
correctly. So, what happends ? I suppose that the databases crash if the astahost....
Creating Databases
from programs (4) I jsut went throught PC magazine today and i found out that you can actually create a database using
Microsoft Access and Excel. And computers and servers online can actually use these databases and
conduct queries with them. I've always though of databases as MYSQL, Microsoft SQL server and so
on. So it is possible to store data to a Microsoft Access database and manipulate it online?....
Migrating Databases
Migrating from MSSQL Server to MySQL (2) How to migrate my database from SQL Server to MySQL?....
Remote Databases
How to allow remote connections? (4) I am currently in a big-problem. I am trying to use a MySQL database on another host, and I am
hosting my forums, on another host, and I am trying to install the forums but the error that comes,
says that the remote connection canot be allowed. Can anyone help me on how to resolve this issue
and proceed further, or should I just wait for astahost.com to get an account? All suggestions
welcome! /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> ....
Hosting A Server On Database
I'm a total noob at databases (6) Well this might be in the wrong place or I might have no clue what im talking about but I heard
something. Is it possible to host like a .exe server such as a macromedia multiuser server on a
database such as MySQL or any other databases? I have a friend that said he did it but I think he is
lying. Thanks in advance!....
Need Advice On Creating Online Music Database
ps - dont know anything about databases! (6) I need to create a database of around 1000 music albums that I can put on my site, with the ability
to search the database according to several different criteria. Being a complete and total NOOB to
the world of databases, can anyone point me in the direction of some software that will let me
create a good-looking and functional database, but that isn't too complicated for me to
use?! Sounds like a tall order I know, be grateful if anyone can help though. Thanks!
Topic edited to reflect content better. ....
The Best Database
databases (41) te best database for my is sql server yukon for you?....
Free Databases
mysql,postgresql,SAPDB,sybase,DB2 (14) this website offers Database hosting for free. Jus signup and u get u r own database .. it supports
mysql, postgresql, sapdb, sybase, db2 CODE http://freesql.org from the webpage QUOTE
This service is, and will remain, totally free. I have receive hundreds of Thank you emails from
all over the world telling me that having this service available has allowed them to practice and
learn without the burden of having to run their own server. ....
Looking for combining, databases, mess
|
|
Searching Video's for combining, databases, mess
|
advertisement
|
|