
rjbathgate
User
Mar 16, 2009, 12:38 PM
Post #1 of 4
(545 views)
Shortcut
|
|
Display two fields in List select
|
Can't Post
|
|
Hello, I have one table, 'cms_contacts' which contains fields: Forename Surname In another table, 'cms_purchases' I want to be able to select the appropriate Contact from the cms_contacts table... As we have two fields for the Contact Name (forename and surname) I want the drop down within Purchases to display both (forename surname). The basic 'get options from database' only allows displaying of one field, so can it be done with the 'get options from mySQL'? I put this in:
SELECT forename,surname FROM cms_contacts However, it doesn't work - it only displays the SURNAME. Am I barking up the wrong tree? Basically I just want the drop down/select on Purchases table to display: Joe Bloggs Dave Smith etc etc i.e. concatenating the two fields (forename and surname) from the Contacts table. Many thanks in advanced Rob
|