prakash Posted October 7, 2007 Share Posted October 7, 2007 How can I merge multiple fields of a table for my query. suppose I have 2 table table1 ============= field1 field1 ============= Lam 20 Ld 9 Auz 3 so I want to check where does keyword "Ld9" Exisit so what will me my query for select * from table1 where field1+field2=$keyword Quote Link to comment https://forums.phpfreaks.com/topic/72214-solved-merging-mysql-table-fields/ Share on other sites More sharing options...
Rithiur Posted October 7, 2007 Share Posted October 7, 2007 Use the concat function like SELECT * FROM table1 WHERE CONCAT(field1, field2) = "Ld9" Quote Link to comment https://forums.phpfreaks.com/topic/72214-solved-merging-mysql-table-fields/#findComment-364130 Share on other sites More sharing options...
prakash Posted October 7, 2007 Author Share Posted October 7, 2007 well that works thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/72214-solved-merging-mysql-table-fields/#findComment-364157 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.