![]() |
Admin 2/18/2010 |
You can use concat() function in your SQL query to concatenate fields. |
S
|
swanside author 2/18/2010 |
So I could do this and by selecting the Order_Site_Address on my job_add page it would put he Line1,2,3,4,5,6 and 7 into the field of FullSiteAddress? |
C
|
copper21 2/18/2010 |
Paul, |
S
|
swanside author 2/19/2010 |
Paul, Try this; it worked for me: In your table, create these fields: Job Name (var char 100), Address (var char 100), Town (var char 100), City (var char 100), County (var char 100), etc In your edit SQL query, you should see something like this (along with all of the other fields in your table): SELECT Job Name ,Address ,Town ,City ,County ,REST OF YOUR FIELDS ,FROM job Now you are going to place this right before "FROM job": concat( Address , ',',Town , ',',City , ',',County ) as fullsiteaddressIt should now look like this: SELECT Job Name ,Address ,Town ,City ,County ,REST OF YOUR FIELDS ,concat( Address , ',',Town , ',',City , ',',County ) as fullsiteaddress <-----no commaFROM job The output from this should be: Address, Town, City, County in one field called fullsiteaddress. You do not need to make "fullsiteaddress" as a field in the table of your database. You will be able to chose which pages this outputs to in the "Choose Fields" section in PHP Runner. Brian
|
S
|
swanside author 3/7/2010 |
Thanks Brian, Will give that a go.
|