pakenney38 Posted April 2, 2008 Share Posted April 2, 2008 There is a table named tablename. And in tablename there are 3 columns: col1, col2, col3. I want to SELECT * FROM tablename WHERE col1 is equal to the concatenation of col2 and col3. Link to comment https://forums.phpfreaks.com/topic/99258-concatenating-two-columns-and-checking-to-see-if-it-is-equal-to-a-third/ Share on other sites More sharing options...
fenway Posted April 2, 2008 Share Posted April 2, 2008 You mean "WHERE col1 = CONCAT( col2, col3 )"? Link to comment https://forums.phpfreaks.com/topic/99258-concatenating-two-columns-and-checking-to-see-if-it-is-equal-to-a-third/#findComment-507879 Share on other sites More sharing options...
pakenney38 Posted April 2, 2008 Author Share Posted April 2, 2008 That's kind of what I was asking. Can CONCAT be used in the WHERE clause instead of at the beginning of the SELECT statement? Link to comment https://forums.phpfreaks.com/topic/99258-concatenating-two-columns-and-checking-to-see-if-it-is-equal-to-a-third/#findComment-507886 Share on other sites More sharing options...
fenway Posted April 2, 2008 Share Posted April 2, 2008 Can be used anywhere an expression is alid. Link to comment https://forums.phpfreaks.com/topic/99258-concatenating-two-columns-and-checking-to-see-if-it-is-equal-to-a-third/#findComment-507925 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.