PDA

View Full Version : database help


Joe Pimms
01-25-2005, 10:46 PM
how can i fix this to work under vb3 please help ?

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 ?

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

Andreas
01-25-2005, 10:51 PM
SELECT userid, username FROM user

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

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 . 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


$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

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
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 ?

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

Andreas
01-25-2005, 11:17 PM
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 ?

//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
//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

tableinnerborderwidth

also

firstaltcolor and this one to

tableinnerextra