ihernandez791079 Posted November 19, 2013 Share Posted November 19, 2013 Anyone have any suggestions.?? I have Table <customers> I need to query the data points in Column ID ( data type_ Int ) and Column Lot (data type_Int) FROM customers but what my query is doing is adding this two data points up. and I don't want a SUM result. ex. if ID = 100 and Lot = 543 my query result = 643 what I am looking for is IF ID=100 and Lot = 543 my query result should be= 100543 SELECT customers.ID + ' ' +customesr.Lot AS combined FROM customers ANY SUGGESTIONS PLEASE!!! Link to comment Share on other sites More sharing options...
justsomeguy Posted November 19, 2013 Share Posted November 19, 2013 The + operator is for addition. If you want to concatenate the values then you can use either CONCAT or CONCAT_WS. http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws 1 Link to comment Share on other sites More sharing options...
ihernandez791079 Posted November 20, 2013 Author Share Posted November 20, 2013 THAT WORKED GREAT! THANKS!!!! I AM NEW AT THIS AND TRYING TO TO WRITTE A PHP CODE FOR MY WEBSITE THAT REQUIRES A QUERY,... THANKS FOR YOUR HELP. this forum is great Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now