Log in

View Full Version : MySQL error 1064 in vB 3.0.8 + PHP5.0.0


josha
09-27-2005, 12:38 AM
Can anyone help with this error? Out of the blue, this error occured: Any help would be greatly appreciated.

Thanks,
Josh.

----------------------------

Warning: Invalid argument supplied for foreach() in \includes\sessions.php on line 300

There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.

<!--
Database error in vBulletin :
Invalid SQL:
SELECT * FROM style
WHERE (styleid = 0 AND userselect = 1)
OR styleid =
ORDER BY styleid ASC
LIMIT 1
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 'ORDER BY styleid ASC
LIMIT 1' at line 4
mysql error number: 1064
Date: Monday 26th of September 2005 05:38:53 PM

Boofo
09-27-2005, 12:51 AM
What is on line 300 and 10 lines before and 10 lines after?

josha
09-27-2005, 12:53 AM
Here are lines. 290-310

'threadedmode' => $vboptions['threadedmode']
);

// get default language
$DB_site->reporterror = 0;
$phraseinfo = $DB_site->query_first("
SELECT languageid" . fetch_language_fields_sql(0) . "
FROM " . TABLE_PREFIX . "language
WHERE languageid = " . intval($vboptions['languageid']) . "
");
foreach($phraseinfo AS $_arrykey => $_arryval)
{
$bbuserinfo["$_arrykey"] = $_arryval;
}
$DB_site->reporterror = 1;
unset($phraseinfo);

// emulate the registered user's setup for lastvisit/lastactivity with cookies for new post markers
if (!empty($_COOKIE[COOKIE_PREFIX . 'lastvisit']))
{
$bbuserinfo['lastvisit'] = intval($_COOKIE[COOKIE_PREFIX . 'lastvisit']);

Boofo
09-27-2005, 01:01 AM
Is that original code or a hack? And did you check in the 3.0 bugs section on the com?

josha
09-27-2005, 01:03 AM
Original Code. Also, yes.. We have and we can't find a solution.

Boofo
09-27-2005, 01:06 AM
What vb version are you running?

josha
09-27-2005, 01:07 AM
version 3.0.8