Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 02-06-2010, 04:10 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 18,085
BMR777 is on a distinguished road
Default RE: Limit clicks/day to 10, for each pet?

Quote:
Originally Posted by Quillink
:o

Lol. Trust me to pick the abstract, complex way right off the bat. I'll definitely do that Brandon, thanks for suggesting it. :D

EDIT: It's really hard to see if it's working, but does this look functionable to you guys?
Code:
$query = "SELECT * FROM ".$prefix."vote_voters WHERE adoptableid='$id' and date = '$date'";
$result = mysql_query($query);
$ctd = mysql_numrows($result);

if ($ctd <= 9) { $addclicks = 1; }
else 		  { $addclicks = 0; }

$newclicks = $totalclicks + $addclicks;
It looks like it should work, but why not just check if you should add the click or not and if not just don't do the database queries and instead show the user an error message. On a large site there's no need to run unnecessary queries. :)

You'll be able to tell if it is working too that way. :)
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
Freeze ONLY the evolution, not the clicks dulop Questions and Supports 2 09-28-2012 10:29 AM
Limit amount of clicks per day SilverDragonTears Questions and Supports 15 11-29-2011 11:50 AM
Limit clicks/day to 10 sensacion Questions and Supports 1 07-02-2011 05:15 AM
Days Instead of Clicks alonaria Suggestions and Feature Requests 7 06-25-2011 05:27 AM
No Clicks at all? rosepose Questions and Supports 11 03-07-2009 08:42 AM


All times are GMT -5. The time now is 07:39 PM.

Currently Active Users: 3688 (0 members and 3688 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636