Linking Several Fields As One

Codes here !

Moderators: macek, egami, gesf

friend_al_23
New php-forum User
New php-forum User
Posts: 12
Joined: Sat Dec 28, 2002 6:30 pm
Location: Philippines
Contact:

Linking Several Fields As One

Postby friend_al_23 » Sat Dec 28, 2002 6:37 pm

table1
id field1 field2 field3

table2
id field1 field2 field3

table3
id field1 field2 field3

Entries inside field1 of all the tables are the same. Can I link all field1 as one so that when I add, edit, and delete things in field1, it will also be done in all the other tables? and also to minimize the size of the database.

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Sun Dec 29, 2002 12:23 am

for ($i=1; $1 <= "3"; $i++)
{
//update query for table".$i."
}

friend_al_23
New php-forum User
New php-forum User
Posts: 12
Joined: Sat Dec 28, 2002 6:30 pm
Location: Philippines
Contact:

Postby friend_al_23 » Sun Dec 29, 2002 7:37 am

I mean, to have only a single field for each of the three tables. Something like a relational database. To minimize SQL queries and amount of space.


Return to “mySQL & php coding”

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron