alin19 Posted March 17, 2008 Share Posted March 17, 2008 i'm using phpmyadmin would this work? table 1: CREATE TABLE `ion` (`id` INT( 2 ) NOT NULL ,`test` VARCHAR( 2 ) NOT NULL ,PRIMARY KEY ( `id` ) ) table 2: CREATE TABLE `ion2` (`id_test` INT( 2 ) NOT NULL ,`id` VARCHAR( 2 ) NOT NULL ,PRIMARY KEY ( `id` )) Link to comment https://forums.phpfreaks.com/topic/96566-how-can-i-conect-2-tables-in-mysql/ Share on other sites More sharing options...
lemmin Posted March 17, 2008 Share Posted March 17, 2008 You might want to be more specific on what you are trying to do. The tables aren't automatically connected, if you create a common field, you use that field to link between the two tables when pulling the data. Link to comment https://forums.phpfreaks.com/topic/96566-how-can-i-conect-2-tables-in-mysql/#findComment-494193 Share on other sites More sharing options...
alin19 Posted March 17, 2008 Author Share Posted March 17, 2008 i wish to make some conexion, when inserting in a table some values, some of them to be also inserted in the second one, the same with the update, can you explain to me how can i pull the the data when i have the 2 tables linked? table 1 table2 id nume id prenume with: select * from 'table 1' i will get nume and prenume? Link to comment https://forums.phpfreaks.com/topic/96566-how-can-i-conect-2-tables-in-mysql/#findComment-494200 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.