This topic is locked

Changing field values

4/16/2007 11:01:05 PM
PHPRunner General questions
E
evan_ad2000 author

Hi,
Can anyone tell me how can I change the values in the list page? i have a table called "Item Transaction" that has "transaction_id, item_id, customer_id, date, supplier_id"
transaction_id is linked to a table called transactions that has "transaction_id, transaction_name"
customer_id is linked to a table called customers that has "customer_id, customer_name"
if i want to show the names of the transaction and customer instead of their IDs, what should I do?
Thanks,

Evan

L
larsonsc 4/17/2007

Hi,

Can anyone tell me how can I change the values in the list page? i have a table called "Item Transaction" that has "transaction_id, item_id, customer_id, date, supplier_id"
transaction_id is linked to a table called transactions that has "transaction_id, transaction_name"
customer_id is linked to a table called customers that has "customer_id, customer_name"
if i want to show the names of the transaction and customer instead of their IDs, what should I do?
Thanks,

Evan


I would do a custom view to make this happen. I think your query would look something like the following (I had to assume the syntax of your table name for item transaction):

SELECT `transactions`.`transaction_name`,

`customers`.`customer_name`,

`item_id`,

`date`,

`supplier_id`

FROM `transactions`, `customers`, `item_transaction`

WHERE `item_transaction`.`transaction_id` = `transactions`.`transaction_id`

AND `item_transaction`.`customer_id` = `customers`.`customer_id`


Anyway, try pasting that in the SQL query page for a custom view and hopefully it will do what you need, and if it doesn't, maybe it will get you going in the right direction. Hope it helps.