Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Linking table values


lelchuck

Recommended Posts

Posted

I tacked a request for this to the end of another topic I started, but I think it got lost.

Hopefully someone with php expertise can help me.

 

 

1. If I have a field in the products table (called "infoA"), how can I populate it with the value from a field entitled "infoA_name" in a table called "infoAtable" ? I'm using infoA_id to link the two tables

 

 

2. If I have a field in the products table (called "infoB"), how can I populate it with the first 7 characters of the value from the "infoB_name" field in the "infoBtable" table? I'm using infoB_id to link the two tables

 

 

Products table contains (but not limited to): product_id, infoA_id, infoB_id, infoA, infoB

infoAtable contains (but not limited to): infoA_id, infoA_name

infoBtable contains (but not limited to): infoB_id, infoB_name

 

(please ignore any capital letters ... all are really lower case)

 

thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...