Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Off Topic Discussions > Webmasters Area

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-31-2011, 05:30 PM
Nemesis's Avatar
Nemesis Nemesis is offline
Member
 
Join Date: Mar 2011
Location: Ohio, United States
Posts: 641
Gender: Male
Credits: 50,376
Nemesis is on a distinguished road
Default little coding help

So for side projects I mess around witch scripts to help myself learn php. I am about finished with this face book 'my likes' site but the script originally has the top likes listed in order by the amount of times the page was viewed. I never really thought about it but a friend i was going to give the site to, to run, wants the top likes to be ordered by actual likes so as no one is to cheat the system by refreshing the page. I checked for a guide already on how to get that information from facebook to store in an sql database but couldn't figure it out. if anyone can help me learn thanks :) and here's what the site looks like http://melikey.net63.net/

so heres the code
Code:
#
<?
#
include('config/db_con.php');
#
mysql_connect("$host", "$username", "$password")or die("cannot connect");
#
mysql_select_db("$db_name")or die("cannot select DB");
#
$top = "SELECT * FROM `like` ORDER BY count DESC LIMIT 0, 100";
#
$new = mysql_query($top) or die(mysql_error());
#
while($rows = mysql_fetch_array($new)){
#
?>
#
<div style="clear:left;">
#
<div style="float:left;">
#
<fb:like layout="button_count" class="like_button" href="<?echo $site;?>like.php?like=<? echo $rows['id']; ?>"></fb:like>
#
</div>
#
<a href="<?echo $site;?>like.php?like=<? echo $rows['id']; ?>"><? echo stripslashes($rows['like']);?></a></div>
#
<?
ok so heres the code and up there you can see where the facebook like button code is <fb>. and you can see how it orders 100 of them in decending order but from the 'like' variable whitch is page views. How can i store the actual amount people hit liked and then retrieve that instead? again thanks for help and i hope i was clear enough
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Art for coding? Whimsy Staff Central 0 10-28-2014 01:48 AM
I need basic coding help Moontides Feedback and Suggestions 23 05-28-2014 01:54 PM
Some Coding Trouble Kamalya Questions and Supports 3 01-20-2013 03:50 PM
Looking for someone to help with coding Linkin-Dreamer Staff Central 0 08-17-2011 09:29 AM
Halp with coding? :3 blondbananamix Staff Central 1 08-11-2011 07:21 PM


All times are GMT -5. The time now is 09:29 AM.

Currently Active Users: 841 (0 members and 841 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636