Log in

View Full Version : modifying functions.php


meowmeow
05-18-2004, 12:42 PM
I want to modify the fetch_userinfo() function such that: it retrieves userid, username & password from another database. (this only for the normal users)
otherwise, (admins & moderators) retrieve the data from the VB3 database!)

I have done this to check what can be done
if($userid != $DB_site->myQuery("SELECT userid FROM user WHERE userid = ".$userid))
{
do nothing
}
ELSE
{
do normal function.
}

This gives me an error "call to undefined function myquery()"
where do I go to define a query??

Xenon
05-18-2004, 03:43 PM
there is no function called myquery() just a function query() in the DB class of vb.

meowmeow
05-19-2004, 06:56 AM
yes, changed it to query and it...almost works. It goes to the redirect page, and when it gets redirected it the forum shows up all backwards....
the scroll bar is on the left, the words are from right to left, the buttons don't show up??? but this is only if i do a query in the if statement.
like this:

if($userid == $DB_site->query("SELECT userid FROM user WHERE userid = ".$userid))

when I tried doing this if:
if($userid == 1))
it gave me no errors at all.
so i'm guessing there's a problem with the query. can anyone point it out?

Xenon
05-19-2004, 02:28 PM
well, you try to compare an integer value with an mysql result...

i don't see the sense of this condition at all, but i think you try to do something like that:

if ($user = $DB_site->query_first("SELECT userid FROM user WHERE userid = ".$userid))