El Heso Posted September 19, 2011 Share Posted September 19, 2011 Hi! Is it possible to make this happen? $sql="SELECT CONCAT(contact) Contact, CONCAT(date) Date, CONCAT(p1453_01) '1. How old are you?', CONCAT(p1453_02) '2. Do you own a car?', CONCAT(p1453_03) '3. Have your friends a car?' FROM survey WHERE p1453_02 like 'Yes%' ORDER BY datum DESC"; to this: $sql="SELECT CONCAT( get value from other place ) get value from other place , CONCAT(get value from other place ) get value from other place , CONCAT(get value from other place ) ' get value from other place ', CONCAT(get value from other place ) ' get value from other place ', CONCAT(get value from other place ) ' get value from other place ' FROM survey WHERE get value from other place like 'get value from other place %' ORDER BY datum DESC"; I would like to set the value for each field from admin side of my site and then run the query Hope you guys understand what i mean Any advice? Regards Tony Link to comment https://forums.phpfreaks.com/topic/247471-help-with-sql-query/ Share on other sites More sharing options...
gristoi Posted September 20, 2011 Share Posted September 20, 2011 $sql="SELECT CONCAT( get value from other place ) get value from other place , CONCAT(get value from other place ) get value from other place , CONCAT(t.fieldOne,"+",s.FieldTwo ) AS ' get value from other place ' FROM survey s JOIN adminTable t USING(id) WHERE get value from other place like 'get value from other place %' ORDER BY datum DESC"; hope that helps Link to comment https://forums.phpfreaks.com/topic/247471-help-with-sql-query/#findComment-1271049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.