Results 11 to 16 of 16
-
21st Jun 2011, 10:52 PM #11Member
TEST IN AN SAFE PLACE
The query to update table are incomplete
PHP Code:$found = mysql_query("SELECT distinct sid FROM wcddl_downloads");
//$srank="";
while($updaterank = mysql_fetch_assoc($found)) {
$getnumdownloads = mysql_query("SELECT title FROM wcddl_downloads WHERE sid= ".$updaterank['sid']);
$result = mysql_num_rows($getnumdownloads);
if(strlen($result) >= 4 || $result >= 500) {
$srank ="5"; }
if(strlen($result) === 3 && $result >= 200 && $result <= 499) {
$srank = substr($result, 0, 1);
}
if(isset($srank)) {
//mysql_query("UPDATE BLABLABLA"); //continue whit the query and uncomment after the test if everyhing are ok
echo "Site id ".$updaterank['sid']." - white ".$result." downloads will be rank ".$srank."<br />";
unset($srank);
}
}
-
22nd Jun 2011, 08:57 AM #12OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
-
24th Jun 2011, 09:53 PM #13Member
in fact i didn't see your ratings values
but are easy to change the code above to be whit that values.
wat i posted do
200->299 Rank2
300->399 R3
400->499 R4
500+ R5
if($result >= 200 && $result <= 599) {
$srank ="2"; }
if($result >= 600 && $result <= 2999) {
$srank ="3"; } //theres no rank4?
if($result >= 5000) {
$srank ="5"; }
-
24th Jun 2011, 09:57 PM #14OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
-
1st Oct 2011, 09:28 PM #15BannedWebsite's:
WarezRelease.org ThatHosting.coi am trying to add this to my auto queue accept mod, which is run 4 - 5x day via cron.
here my code:
PHP Code:$get100 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 120");
while ($row = mysql_fetch_array($get100)) {
mysql_query("UPDATE wcddl_sites SET rating=2 where id = '".$row['sid']."'"); }
$get600 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 600");
while ($row = mysql_fetch_array($get600)) {
mysql_query("UPDATE wcddl_sites SET rating=3 where id = '".$row['sid']."'"); }
$get2800 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 2800");
while ($row = mysql_fetch_array($get2800)) {
mysql_query("UPDATE wcddl_sites SET rating=4 where id = '".$row['sid']."'"); }
echo '<div align="center" style="color:green;">Sites Rated</div>';
it sees to not be rating si tes.
any heelp
-
2nd Oct 2011, 12:11 AM #16BannedWebsite's:
WarezRelease.org ThatHosting.cohere's my working modified code:
PHP Code:mysql_query("UPDATE wcddl_sites SET rate=1");
$get1600 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 1600");
while ($row = mysql_fetch_array($get1600)) {
mysql_query("UPDATE wcddl_sites SET rate=4 where id = '".$row['sid']."'"); }
$get420 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 420");
while ($row = mysql_fetch_array($get420)) {
mysql_query("UPDATE wcddl_sites SET rate=3 where id = '".$row['sid']."'"); }
$get120 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 120");
while ($row = mysql_fetch_array($get120)) {
mysql_query("UPDATE wcddl_sites SET rate=2 where id = '".$row['sid']."'"); }
echo '<div align="center" style="color:green;">All eligible sites rated</div>';
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
AtomicWarez Site Rating
By Ccucu in forum Forum and DDL DiscussionReplies: 7Last Post: 24th Mar 2011, 12:03 PM -
WCDDL Site Rating
By CyberHacK in forum Web Application/Script SupportReplies: 22Last Post: 8th Apr 2010, 11:09 PM -
joeschatterbox 3* site rating
By leaky_joe in forum Site ReviewsReplies: 8Last Post: 14th Feb 2010, 02:25 PM -
WCDDL Site Rating Mod
By DDLwarez in forum Web Application/Script SupportReplies: 5Last Post: 3rd Feb 2010, 03:11 AM -
Site rating of x-sharezone??
By djay in forum Site ReviewsReplies: 2Last Post: 19th Sep 2008, 08:37 PM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...