mga_ka_php Posted May 28, 2008 Share Posted May 28, 2008 select concat(column1,column2) as column3 from table1 where column3 like '%$str%' ??????? coz i want to search in a concatenated column, how do i do that? Quote Link to comment Share on other sites More sharing options...
Barand Posted May 28, 2008 Share Posted May 28, 2008 select concat(column1,column2) as column3 from table1 where concat(column1,column2) like '%$str%' You can't use an alias in a WHERE clause Quote Link to comment Share on other sites More sharing options...
fenway Posted May 29, 2008 Share Posted May 29, 2008 But you can using it a HAVING clause... and sometimes you can. Quote Link to comment Share on other sites More sharing options...
mga_ka_php Posted May 31, 2008 Author Share Posted May 31, 2008 wow thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.