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)
-   -   Shared user database for multiple forums, same server (https://vborg.vbsupport.ru/showthread.php?t=98233)

CyberRanger 10-31-2005 08:45 AM

Quote:

Originally Posted by hugojr
here is the error I am getting
Code:

Invalid SQL:
                SELECT username, userid, birthday
                FROM ?.?user
                WHERE (birthday LIKE '10-30-%' OR birthday LIKE '10-31-%')
                AND usergroupid IN (0, 6, 7, 2, 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 '?.?user
                WHERE (birthday LIKE '10-30-%' OR birthday LIKE '10-31-%')
                AND use' at line 2

mysql error number: 1064

what does this mean?

It looks like maybe you've created a a double-double quote in that sql statement. Something that looks like
Code:

"".""user
I'll try to locate the exact spot where this sql is coded later today but if you can search in for "birthday" in the php files under includes.

hugojr 10-31-2005 11:31 PM

Quote:

Originally Posted by westpointer
It looks like maybe you've created a a double-double quote in that sql statement. Something that looks like
Code:

"".""user
I'll try to locate the exact spot where this sql is coded later today but if you can search in for "birthday" in the php files under includes.

I have look everywhere can't find nothing wrong, just incase I am using version 3.0.9

Please if you can clear up your explanation of #8 a little better..

Thank You..

hugojr 10-31-2005 11:35 PM

In /includes/functions.php: on line 1171 remove the table_prefix before $idname.
PHP Code:

if (!$check $DB_site->query_first("SELECT $selid FROM " TABLE_PREFIX "$idname WHERE $idname"id=$id")) 

this is what it look like after according to your explination

PHP Code:

if (!$check $DB_site->query_first("SELECT $selid FROM " "$idname WHERE $idname"id=$id")) 

is that correct?

hugojr 10-31-2005 11:44 PM

also In /includes/adminfunctions: modify print_choser_row (line 1161)to check for $tableid of user, usergroups

line 1161 before code change
PHP Code:

if (!is_array($GLOBALS["$cachename"])) 

now what I want to know is where do I add your code before or after

also In /includes/adminfunctions_user.php around line 116 (construct_style_chooser)

line 116 before code change
PHP Code:

function construct_style_chooser($title$name$selvalue = -1$extra ''

is the code you are giving before or after the code that is there

CyberRanger 11-01-2005 01:35 AM

Quote:

Originally Posted by hugojr
here is the error I am getting
Code:

Invalid SQL:
                SELECT username, userid, birthday
                FROM ?.?user
                WHERE (birthday LIKE '10-30-%' OR birthday LIKE '10-31-%')
                AND usergroupid IN (0, 6, 7, 2, 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 '?.?user
                WHERE (birthday LIKE '10-30-%' OR birthday LIKE '10-31-%')
                AND use' at line 2

mysql error number: 1064

what does this mean?

Can you post what you have in includes/functions_databuild.php from line 840 to 846? It should look like this (assuming you've replaced " . TABLE_PREFIX . " with "."
PHP Code:

    $bdays $DB_site->query("
        SELECT username, userid, birthday
        FROM "
."user
        WHERE (birthday LIKE '
$todayneggmt-%' OR birthday LIKE '$todayposgmt-%')
        AND usergroupid IN (
$usergroupids)
        
$activitycut
    "
); 

What do you have there?

CyberRanger 11-01-2005 01:54 AM

Quote:

Originally Posted by hugojr
In /includes/functions.php: on line 1171 remove the table_prefix before $idname.
PHP Code:

if (!$check $DB_site->query_first("SELECT $selid FROM " TABLE_PREFIX "$idname WHERE $idname"id=$id")) 

this is what it look like after according to your explination

PHP Code:

if (!$check $DB_site->query_first("SELECT $selid FROM " "$idname WHERE $idname"id=$id")) 

is that correct?

Correct, you may want to do a "." just to help you find it in the future. To be honest, I don't know for sure what else is used by this query. This may need to be wrapped in an if statement instead. Can anyone else verify if this is only used for user type queries?

hugojr 11-01-2005 02:24 AM

Quote:

Originally Posted by westpointer
Can you post what you have in includes/functions_databuild.php from line 840 to 846? It should look like this (assuming you've replaced " . TABLE_PREFIX . " with "."
PHP Code:

    $bdays $DB_site->query("
        SELECT username, userid, birthday
        FROM "
."user
        WHERE (birthday LIKE '
$todayneggmt-%' OR birthday LIKE '$todayposgmt-%')
        AND usergroupid IN (
$usergroupids)
        
$activitycut
    "
); 

What do you have there?

this is what I have from line 840 to 846
PHP Code:

$bdays $DB_site->query("
        SELECT username, userid, birthday
        FROM ?.?user
        WHERE (birthday LIKE '
$todayneggmt-%' OR birthday LIKE '$todayposgmt-%')
        AND usergroupid IN (
$usergroupids)
        
$activitycut
    "
); 


CyberRanger 11-01-2005 04:04 PM

Quote:

Originally Posted by hugojr
this is what I have from line 840 to 846

Could you post the URL of the problem page?

hugojr 11-02-2005 06:56 AM

Quote:

Originally Posted by westpointer
Could you post the URL of the problem page?

Please check your pm's

Thank You

hugojr 11-02-2005 04:52 PM

Is there anyone else that has installed this hack that can help us out we are willing to pay $$$$ please pm us if you are intrested...


All times are GMT. The time now is 08:40 AM.

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.01499 seconds
  • Memory Usage 1,770KB
  • 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
  • (4)bbcode_code_printable
  • (9)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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