KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
hello im just curious. about how they do stuff. what i assume they do something like this @someone1 im stacking on stackoverflow RT @someone2 : hello guys what are you doing? before i do it in my way i want to tell you about my database scheme // CID = COMMENT ID, BID = BLOG ID, UID = USER ID CID BID UID COMMENT 1 1 1 @someone1 im stacking on stackoverflow RT @someone2 : .... 2 1 4 @someone1 im stacking on stackoverflow RT @someone2 : .... 3 1 12 @someone1 im stacking on stackoverflow RT @someone2 : .... they use regex to do like this to take the @someones name preg_match_all("/@[a-zA-Z0-9_]+/", $text, $matches); then they get the @ off each name foreach ($matches as $value) { foreach ($value as $value) { $usernames[] = substr($value, 1); } } then they get the UID from the database from doing something like this foreach ($username as $value) { # insert database one by one ? so it will be like the example above } then we can just output the comment buy geting the UID. then somhow we can get all the comments in the blog. ( without a same comment ) where blog buid = 1 and give them an notification on every user by where uid = :uid . is there any better way doing this ? something like twitter or convore ? Thanks for looking in Adam Ramadhan
Tags (comma-separated)
Save Edits
Cancel