PDA

View Full Version : DB Query question


Xplorer4x4
08-20-2005, 10:10 PM
$users = $DB_site->query("

I think this is a DB query question...I was wondering if somone might be able to tell me how I can modify this to work with vB3.5?

It is causing me this error if it helps: Call to a member function on a non-object

amykhar
08-20-2005, 10:11 PM
$users = $db->query_read("

Xplorer4x4
08-21-2005, 08:13 AM
Thanks amy.

Now I just have one small problem:

Parse error: parse error, unexpected $ on line 152
Line 152 is:
?>

Any suggestions?

merk
08-21-2005, 11:32 PM
What is before that line?

Xplorer4x4
08-21-2005, 11:35 PM
Just an empty line.

merk
08-21-2005, 11:35 PM
And furthur back.

Xplorer4x4
08-21-2005, 11:37 PM
eval('print_output("' . fetch_template('ipinfo') . '");');
Thats the next line up. Thanks for the help merk.

merk
08-21-2005, 11:38 PM
post the last 15 lines. its generally a typo before the line that php says.

Xplorer4x4
08-21-2005, 11:42 PM
");

while ($otheripinfo = $db_site->fetch_array($otherips))
{
//print($otheripinfo['ipcount'] . ": " . $otheripinfo['ipaddress'] . "<br/>");
eval('$otheripbits .= "' . fetch_template('ipinfo_otherip') . '";');
}

$db_site->free_result($otherips);

$navbits = construct_ipinfo_nav($foruminfo, $threadinfo);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('ipinfo') . '");');

?>

That is the last 15 lines of code.
Thanks.

merk
08-21-2005, 11:47 PM
There is nothing wrong with that code.

I suggest you look at what you've recently changed. It will generally be an extra { or } bracket.

Xplorer4x4
08-21-2005, 11:53 PM
Only thing i really changed was the DB queries and such from $DB to $db.

I see 2 backets in my code above. Should I try replacing them with an empty line?

Thanks for the quick responses. ;)

Marco van Herwaarden
08-22-2005, 10:27 AM
What editor did you use?
Check you don't have any extra characters after the ?> (also no spaces)

Xplorer4x4
08-22-2005, 06:27 PM
I use crimsion editor. I do not see any spaces or charechters after the ?>

Do you recomend a diffrent editor?

I have not had the time to try removing the { and } brackets as Merk said.