vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   List latest X paid subscribers on Forum Home (https://vborg.vbsupport.ru/showthread.php?t=65254)

Bryan Ex 06-02-2004 10:12 PM

You're right. I forgot that there was no date references for usergroups. I'll have to come back to this one I guess once I have some time to play around with it. I'm still trying to restore everything after upgrading to 3.0.1.

kall 06-28-2004 10:48 PM

I'm getting foreach errors also..

One question: when you say 'before the bracket', do you mean 'before the curly bracket' or 'before the round bracket?'

I currently have:
PHP Code:

 thankyou(); 
}

// ###################### Start leavesubscription #######################
function delete_user_subscription($subscriptionid$userid)


and
PHP Code:

    ");
    }

 thankyou();

}

// ###################### Start getsubscriptionscache #######################
function cache_user_subscriptions() 


tamarian 06-28-2004 11:16 PM

Kall, the "thankyou();" line should be plasced above the quoted code.

The code you posed (the first block) look fine.

If you still have problems, email me the two files and I'll take a look.

tamarian 06-29-2004 12:53 AM

For those interested, I've had a few emails back and forth with Kall, and he emailed me several of his forum files to investigate.

The conclusion is as follows:

1. The "foreach" warning is a result of another hack, in combination with this hack. The other hack is the "store cash hack". The line numbers reported in the warning is not related to this hack.

2. Despite the warning, both hacks seem to work fine, with no problems, so you can ignore it. :)

Cold Steel 07-04-2004 11:17 AM

I'm getting errors, too:

Quote:

Warning: Invalid argument supplied for foreach() in /home/asiansin/public_html/forums/global.php on line 645

Warning: Invalid argument supplied for foreach() in /home/asiansin/public_html/forums/includes/functions.php on line 2895

Warning: Invalid argument supplied for foreach() in /home/asiansin/public_html/forums/includes/functions.php on line 2895

Warning: Invalid argument supplied for foreach() in /home/asiansin/public_html/forums/includes/functions.php on line 2895



Database error in vBulletin 3.0.1:

Invalid SQL: SELECT username, subscriptionlog.userid
FROM subscriptionlog AS subscriptionlog
LEFT JOIN user AS user
USING ( userid )
WHERE user.userid = subscriptionlog.userid
AND STATUS = '1'
ORDER BY regdate DESC
LIMIT 5
mysql error: Column: 'STATUS' in where clause is ambiguous

mysql error number: 1052

Date: Sunday 04th of July 2004 07:16:12 AM
Script: http://forums.asiansinc.com/admincp/subscriptions.php
Referer: http://forums.asiansinc.com/admincp/...iptionlogid=12
Username: Webmaster
IP Address:
I'm unable to edit subscriptions.

I have the ucash/ustore hack installed, as well as the recurring paypal hack.

tamarian 07-04-2004 11:37 AM

Quote:

Originally Posted by Cold Steel
I'm getting errors, too:


I'm unable to edit subscriptions.

I have the ucash/ustore hack installed, as well as the recurring paypal hack.

The "foreach" error is not a problem, but the mysql error is a problem. I've made an update to the first post.

You just need to re-do step 2 with this code:

PHP Code:

    // ###################### thankyou #######################
    
function thankyou(){
          global 
$DB_site,  $stylevar$vboptions$vbphrase;
    
        require_once(
'./global.php');
    
        
$latestcontributers $DB_site->query("SELECT username, status, regdate,   subscriptionlog.userid
                    FROM " 
TABLE_PREFIX "subscriptionlog AS subscriptionlog
                    LEFT  JOIN " 
TABLE_PREFIX "user AS user
                    USING ( userid )
                    WHERE user.userid = subscriptionlog.userid
                    AND STATUS = '1'
                    ORDER  BY  regdate  DESC
                    LIMIT 5"
);
    
        
$latest_str "";
        while (
$contributer $DB_site->fetch_array($latestcontributers))
        {
            eval (
'$latest_str .= ", ' fetch_template('thanksbit') . '";');
        }
        
$latest_str substr($latest_str 2);
        
$latest_str addslashes($latest_str);
 
$DB_site->query("UPDATE " TABLE_PREFIX "template SET template=\"$latest_str\", template_un=\"$latest_str\" WHERE title='thanks'");
    } 


Cold Steel 07-04-2004 12:19 PM

Thanks for the prompt response. Now I'm getting this error:

Quote:

Database error in vBulletin 3.0.1:

Invalid SQL: SELECT username, status, regdate subscriptionlog.userid
FROM subscriptionlog AS subscriptionlog
LEFT JOIN user AS user
USING ( userid )
WHERE user.userid = subscriptionlog.userid
AND STATUS = '1'
ORDER BY regdate DESC
LIMIT 5
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '.userid
FROM subscriptionlog AS subscription

mysql error number: 1064

Date: Sunday 04th of July 2004 08:19:39 AM
Script: http://forums.asiansinc.com/admincp/subscriptions.php
Referer: http://forums.asiansinc.com/admincp/...iptionlogid=12
Username: Webmaster
IP Address:

assassingod 07-04-2004 12:35 PM

PHP Code:

       $latestcontributers $DB_site->query("SELECT username, status, regdate  subscriptionlog.userid 

There's a comma missing after regdate, it seems.

tamarian 07-04-2004 02:29 PM

Quote:

Originally Posted by assassingod
PHP Code:

        $latestcontributers $DB_site->query("SELECT username, status, regdate  subscriptionlog.userid 

There's a comma missing after regdate, it seems.

Ah, yes. Thanks for the catch!

tamarian 07-04-2004 02:32 PM

Quote:

Originally Posted by Cold Steel
Thanks for the prompt response. Now I'm getting this error:

I've just updated the missing comma as pointed out by assassingod. Give it another try and let me know how it goes.


All times are GMT. The time now is 11:33 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01270 seconds
  • Memory Usage 1,763KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete