Fenhopi Posted June 26, 2010 Share Posted June 26, 2010 Hi, I'm making a system similar to the like system in facebook. THis is what I got: $insertlike = "UPDATE status SET likes='$username' WHERE statusid='$statusid'"; And that works fine. But when another user likes the same post he replaces the previous user who like the post. Is there anyway I can add his username to the already added username? Thanks for your time and help! Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted June 26, 2010 Share Posted June 26, 2010 I am not sure if this will work as I haven't tested this but you may want to give this a try: $connector = ";"; // choose what would be convenient for you $insertlike = "UPDATE status SET likes=CONCAT(likes, '$connector','$username') WHERE statusid='$statusid'"; Just give it a try and reply back if it is still not working. bluejay, Quote Link to comment Share on other sites More sharing options...
Fenhopi Posted June 26, 2010 Author Share Posted June 26, 2010 Just figured it out before I saw your post. Thanks for replying though! Appreciated! Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted June 26, 2010 Share Posted June 26, 2010 np. 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.