954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP+mysql database connection problem

I summarised my problem by a simple example,anyone plzz ans this...then I will be able to understand my problem.......:

Suppose in a database named "DATABASE"..there is a table called "XYZ"..it has 4 rows named "T1,T2,T3,T4"..one primary key named "T_id"..now what I want that to access this same table via different ids from different location but with same primary key..so I have to put some different ids also,so I give "key1_id,key2_id"..so now I have these rows in my table:
"T_id,key1_id,key2_id,T1,T2,T3,T4"

I am giving a screenshot of the table structure:
http://img11.imageshack.us/img11/4717/82031836.jpg


Now what will be the code for (add/edit/del) for these rows..I means how to access this same table via different ids from different location but with same primary key

tanmoy_india
Newbie Poster
18 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

post your table structure

Aamit
Posting Whiz
342 posts since Apr 2008
Reputation Points: 3
Solved Threads: 15
 

I added a screenshot of the table..........what I want is..onetime I access(add/edit.del) all the rows "T1,T2,T3,T4" by the Primary key T_id and key1_id....also separately access(add/edit.del) all the rows "T1,T2,T3,T4" by the Primary key T_id and key2_id............plzz tell the code

tanmoy_india
Newbie Poster
18 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

post your sample data and what you want to display...
so i can help you to write query

Aamit
Posting Whiz
342 posts since Apr 2008
Reputation Points: 3
Solved Threads: 15
 

Table structure:
http://img11.imageshack.us/img11/4717/82031836.jpg

I posted some data:
http://img149.imageshack.us/img149/7929/66701273.jpg

I want that..the primary key will be auto incremented..also the number will be copied to the corresponding key-id(which I will redirect)..after that it will refer to that column and add the data..also i need its edit & del code...

tanmoy_india
Newbie Poster
18 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

Can you explain what you are doing (not the table structure)? That way we can make sure the table setup is correct and there is not an easier way.

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 
post your sample data and what you want to display... so i can help you to write query

please read post correctly... http://img149.imageshack.us/img149/7929/66701273.jpg

what you want to display...????

is it any category and products data ...using key1_id,key2_id you are differentiate them ??

Aamit
Posting Whiz
342 posts since Apr 2008
Reputation Points: 3
Solved Threads: 15
 
Can you explain what you are doing (not the table structure)? That way we can make sure the table setup is correct and there is not an easier way.

I know I cant explain properly...So I gave screenshots...i want to add/edit/del in the same 4 tables "T1,T2,T3,T4" from different point via same primary key but different corresponding key value like "key1_id" or "key2_id"

tanmoy_india
Newbie Poster
18 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

please read post correctly...

http://img149.imageshack.us/img149/7929/66701273.jpg

what you want to display...????

is it any category and products data ...using key1_id,key2_id you are differentiate them ??

ya something very much like that....

tanmoy_india
Newbie Poster
18 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You