asmith Posted December 30, 2007 Share Posted December 30, 2007 hey guys can i attach a string to a field ? update table set id=id+3 ... the code above add 3 to whateer id number is . now if i have a varchar field , can attach some sentence to it ? like if the field name is "john" , i attach "smith" at the end of it . something like : update table set name=name+"smith" // add it to the end of the string how should it be ? Quote Link to comment https://forums.phpfreaks.com/topic/83718-solved-attaching-string/ Share on other sites More sharing options...
drranch Posted December 30, 2007 Share Posted December 30, 2007 It sounds like you are trying to "concatenate" two strings together... UPDATE table SET name=concat(name, smith) Quote Link to comment https://forums.phpfreaks.com/topic/83718-solved-attaching-string/#findComment-426083 Share on other sites More sharing options...
asmith Posted December 31, 2007 Author Share Posted December 31, 2007 thank you , that was the thing i was looking for . Quote Link to comment https://forums.phpfreaks.com/topic/83718-solved-attaching-string/#findComment-426373 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.