Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,163,074 members, 7,852,648 topics. Date: Thursday, 06 June 2024 at 10:44 PM |
Nairaland Forum / Science/Technology / Webmasters / Connect Two Tables (621 Views)
CSS Vs Tables / How Do I Connect Two Different Applet Together / CSS Vs Tables (2) (3) (4)
Connect Two Tables by Nobody: 5:30pm On Aug 10, 2011 |
is there any idea i can connect two tables in this query define('DB_SERVER', 'localhost'); define('DB_PORT', '3306'); define('DB_USERNAME', '-----'); define('DB_PASSWORD', '-----'); define('DB_NAME', 'selling'); define('TABLE_PREFIX', 'ioline _'); define('DB_USERTABLE', 'sales'); (i want to connect another table to sales called buy) |
Re: Connect Two Tables by Nobody: 10:22pm On Aug 10, 2011 |
use join or inner join. |
Re: Connect Two Tables by Nobody: 3:00am On Aug 11, 2011 |
table 1 - sales fields : saleid, product, amount table 2 - order; orderid, saleid, timeoforder assuming saleid is the same in both tables, you can say something like: select sales.product,sales.amount, order.orderid from sales,order where sales.saleid=order.orderid and order.orderid= 5; //simplemente eh? |
Re: Connect Two Tables by Nobody: 3:32pm On Aug 12, 2011 |
its more like the config file being used to connect to database define('DB_SERVER', 'localhost'); define('DB_PORT', '3306'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', 'xxxxxxx'); define('DB_NAME', 'market'); define('TABLE_PREFIX', 'cath_'); define('DB_USERTABLE', 'member'); want to join these with guest define('DB_USERTABLE_NAME', 'name'); ok now i have another table called guest how do i go about it |
Re: Connect Two Tables by Nobody: 4:30pm On Aug 12, 2011 |
Lemme explain the kinda stuff you are asking to you. There are so many ways of joining tables together: Inner joins, outer joins, left outer join. . . , . . cartesian join. The type of join you use depends on what you are looking for. |
Re: Connect Two Tables by Nobody: 3:35pm On Aug 13, 2011 |
actually the script given is used to connect to database with one user table i want to connect to the same database with the with two user table using the given the code below define('DB_SERVER', 'localhost'); define('DB_PORT', '3306'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', 'xxxxxxx'); define('DB_NAME', 'market'); define('TABLE_PREFIX', 'cath_'); define('DB_USERTABLE', 'member'); want to join these with guest define('DB_USERTABLE_NAME', 'name'); |
Re: Connect Two Tables by Nobody: 9:28pm On Aug 13, 2011 |
Your questions are not clear. Sorry, that is all the help i can give - based on your question. Lookup joining mysql tables on google |
(1) (Reply)
Browsing Problem / My Updated Portfolio / Cheapest Website
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8 |