mysql - PHP: Custom Liking Function for my Comics Site -
i'm building comics website , have been working on , testing liking function. reason i'm building own because
i wanted allow users , dislike comic. fb liking doesn't offer that
i wanted custom liking graphic
i want counts stored in database can sort comics popularity... don't think can total likes fb such thing.
based on info below, should go on on approach or not?
each time unique person likes comic id, first insert user's ip , specific comic id liked.
since ip in database, if seek vote on same comic id again, won't allow them. ip can still vote on other comic id.
if in fact liking unique comic id, increment or dislike count of associated comic id in comics table. can utilize rank , sort comics popularity.
as testing, realized user unique ip can potentially comics (ex: 127.0.0.1 liked comicid 30, 127.0.0.1 liked comicid 31, 127.0.0.1 liked comicid 32, etc... , there's 60 unique comics)... that's 60 database entries. that's 1 user... happens if site starts becoming popular... result in n voters * x comics they've liked... ton of database entries... huge burden on hosting server, , mess manage.
that beingness said, should utilize facebook's liking function? if that, can utilize likes rank own comics popularity in database? should go on on custom liking function, alter approach?
if it'd helpful, can post current liking function code...
any tips appreciated... thanks!
i'd stick facebook button. can see comments can tricky think of cases if you're trying yourself, fb has taken care of that.
the fb api allows getting number of likes, take @ related post: how number of likes facebook button?
php mysql
No comments:
Post a Comment