vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   database help (https://vborg.vbsupport.ru/showthread.php?t=75120)

Joe Pimms 01-25-2005 10:46 PM

database help
 
how can i fix this to work under vb3 please help ?

PHP Code:

users=$DB_site->query("SELECT userid,username,atmstatus,atmdigest,files_uploaded,files_downloaded,files_emaied from user"); 

this is made in vb2 i want it to work on vb3

plus how do i fix this template ? to be a vb3 one not a vb2 one ?

PHP Code:

 eval("\$atmfilecontentsbit .= \"".gettemplate('atmfilecontentsbit')."\";"); 


Andreas 01-25-2005 10:51 PM

[sql]SELECT userid, username FROM user[/sql]

The other columns don't exist in a standard vB 3 user table.

PHP Code:

eval('$atmfilecontentsbit .= "' fetch_template('atmfilecontentsbit') . '";'); 

Also make sure that the template is being cached, as otherwise this will cause an additional query.

Joe Pimms 01-25-2005 10:54 PM

there is no
PHP Code:

TABLE_PREFIX 

in there and the other item are a vb 2 hack im trying to recode in vb3 well im trying any how and i got some of it

Andreas 01-25-2005 10:57 PM

Well, in PHP it would be

PHP Code:

$users $DB_site->query("SELECT userid, username FROM " TABLE_PREFIX "user"); 

vB 2 did not support table prefixes, so you won't find this there.

Joe Pimms 01-25-2005 11:09 PM

sweet thanks so much did u see my question about the template

PHP Code:

eval('$atmfilecontentsbit .= "' fetch_template('atmfilecontentsbit') . '";'); 

here it is again

this is vb2 code need it in vb3 code

Andreas 01-25-2005 11:10 PM

Quote:

Originally Posted by Joe Pimms
did u see my question about the template

Yes I saw it.
Did you look at my posts? ;)

Joe Pimms 01-25-2005 11:12 PM

sorry now i did thanks so much man


how about this one ?

PHP Code:

eval("dooutput(\"".gettemplate('atmfileop')."\",0);"); 


Andreas 01-25-2005 11:17 PM

PHP Code:

eval('print_output("' fetch_template('atmfileop'). '";'); 

Again, make sure that the template is being cached.

Joe Pimms 01-25-2005 11:25 PM

so would this be right ?

PHP Code:

//eval("\$atmshowcontents = \"".gettemplate('atmshowcontents')."\";");
eval('$atmshowcontents .= "' fetch_template('atmshowcontents') . '";');
//eval("\$atmfooter = \"".gettemplate('atmfooter')."\";");
eval('$atmfooter .= "' fetch_template('atmfooter') . '";');
//eval("dooutput(\"".gettemplate('atmshow')."\",0);");
eval('print_output("' fetch_template('atmshow'). '";'); 


Andreas 01-25-2005 11:32 PM

No, it wouldn't.
But I am not going to tell you what is wrong (at the moment).
I want you to find this out yourself (isn't dificult) :)

Joe Pimms 01-26-2005 09:21 PM

i cant seem to realy see what it is your talking about can u explain the cached system to me ?

can any one help with these temp funtions please
PHP Code:

//atmfileop.php:

eval("dooutput(\"".gettemplate('atmfileop')."\",0);");  

//atmshowrecent.php:
eval("\$atmshowcontents = \"".gettemplate('atmshowcontents')."\";");
eval(
"\$atmfooter = \"".gettemplate('atmfooter')."\";"); 
eval(
"dooutput(\"".gettemplate('atmshow')."\",0);");

//atmshowtophits.php
eval("\$atmshowcontents = \"".gettemplate('atmshowcontents')."\";");
eval(
"\$atmfooter = \"".gettemplate('atmfooter')."\";");
eval(
"dooutput(\"".gettemplate('atmshow')."\",0);");
eval(
"\$atmshowcontentsbit .= \"".gettemplate('atmshowcontentsbit')."\";");


//atmfile.php
eval("\$atmfilecontentsbit .= \"".gettemplate('atmfilecontentsbit')."\";");
eval(
"\$atmfilelistdir = \"".gettemplate('atmfilelistdir')."\";");
eval(
"\$atmfileupload = \"".gettemplate('atmfileupload')."\";");
eval(
"\$atmfilewebcopy= \"".gettemplate('atmfilewebcopy')."\";");
eval(
"\$atmfilenewdir= \"".gettemplate('atmfilenewdir')."\";");
eval(
"\$atmfilecontents = \"".gettemplate('atmfilecontents')."\";");
eval(
"\$atmfooter = \"".gettemplate('atmfooter')."\";");
eval(
"dooutput(\"".gettemplate('atmfile')."\",0);"); 

i see this in a vb2 code what is it

PHP Code:

tableinnerborderwidth 

also

PHP Code:

firstaltcolor 

and this one to

PHP Code:

tableinnerextra 



All times are GMT. The time now is 02:57 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.01119 seconds
  • Memory Usage 1,762KB
  • 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
  • (13)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete