![]()
|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?php
// wcf imports
require_once(WCF_DIR.'lib/system/cache/CacheBuilder.class.php');
class CacheBuilderPortalWebdisk implements CacheBuilder {
/**
* @see CacheBuilder::getData()
*/
public function getData($cacheResource) {
$data['newDatabaseItems'] = array();
$sql = "SELECT a.name, a.releaseTime, a.active, a.productID, b.public, b.priceLicense, b.productID
FROM wcf".WCF_N."_customer_storage a
LEFT JOIN wcf".WCF_N."_customer_product b
ON (a.productID = b.productID)
WHERE a.active = 1, b.public = 0
ORDER BY a.releaseTime DESC
LIMIT ".DATABASE_ITEM_VIEW_TOP."";
$result = WCF::getDB()->sendQuery($sql);
while($row = WCF::getDB()->fetchArray($result)) {
$data['newDatabaseItems'][] = $row;
}
return $data;
}
}
?>
|
Quoted
You get more information about the problem in our knowledge base: http://www.woltlab.com/help/?code=1064
Information:
error message: Invalid SQL: SELECT a.name, a.releaseTime, a.active, a.productID, b.public, b.priceLicense, b.productID FROM wcf1_customer_storage a LEFT JOIN wcf1_customer_product b ON (a.productID = b.productID) WHERE a.active = 1, b.public = 0 ORDER BY a.releaseTime DESC LIMIT 5
error code: 1064
sql type: MySQLDatabase
sql 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 ' b.public = 0 ORDER BY a.releaseTime DESC LIMIT 5' at line 5
sql error number: 1064
sql version:
file: /www/htdocs/w00b2576/sumlinemediade/wcf/lib/system/database/MySQLDatabase.class.php (11
php version: 5.3.13-nmm1
wcf version: 1.1.9 (Tempest)
date: Fri, 20 Jul 2012 12:03:43 +0000
request: /index.php?page=Portal
referer: http://wbb.sumline-media.de/index.php?pa…=1&categoryID=0
Stacktrace:
#0 /www/htdocs/w00b2576/sumlinemediade/lib/system/cache/CacheBuilderPortalWebdisk.class.php(31): MySQLDatabase->sendQuery('SELECT a.name, ...')
#1 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/system/cache/CacheHandler.class.php(173): CacheBuilderPortalWebdisk->getData(Array)
#2 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/system/cache/CacheHandler.class.php(126): CacheHandler->rebuild(Array)
#3 /www/htdocs/w00b2576/sumlinemediade/lib/system/portalbox/cachebuilder/DefaultCacheBuilder.class.php(2: CacheHandler->get('box-19')
#4 /www/htdocs/w00b2576/sumlinemediade/lib/data/boxes/PortalBox.class.php(117): DefaultCacheBuilder->execute('19', 'CacheBuilderPor...', 'type2', '0', '0')
#5 /www/htdocs/w00b2576/sumlinemediade/lib/system/portalbox/PortalBoxFactory.class.php(102): PortalBox->initialize()
#6 /www/htdocs/w00b2576/sumlinemediade/lib/system/portalbox/PortalBoxFactory.class.php(44): PortalBoxFactory->initializeBoxes(false)
#7 /www/htdocs/w00b2576/sumlinemediade/lib/page/PortalPage.class.php(120): PortalBoxFactory->__construct(true, false, true, true, true)
#8 /www/htdocs/w00b2576/sumlinemediade/lib/page/PortalPage.class.php(105): PortalPage::getPortalBoxes()
#9 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/page/AbstractPage.class.php(90): PortalPage->readData()
#10 /www/htdocs/w00b2576/sumlinemediade/lib/page/PortalPage.class.php(147): AbstractPage->show()
#11 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/page/AbstractPage.class.php(46): PortalPage->show()
#12 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/util/RequestHandler.class.php(64): AbstractPage->__construct()
#13 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/util/RequestHandler.class.php(92): RequestHandler->__construct('Portal', Array, 'page')
#14 /www/htdocs/w00b2576/sumlinemediade/index.php(: RequestHandler::handle(Array)
#15 {main}
|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<?php
// wcf imports
require_once(WCF_DIR.'lib/system/cache/CacheBuilder.class.php');
class CacheBuilderPortalWebdisk implements CacheBuilder {
/**
* @see CacheBuilder::getData()
*/
public function getData($cacheResource) {
$data['newDatabaseItems'] = array();
$sql = "SELECT *
FROM wcf".WCF_N."_customer_storage
WHERE `active` = '1'
ORDER BY `releaseTime` DESC
LIMIT ".DATABASE_ITEM_VIEW_TOP."";
$result = WCF::getDB()->sendQuery($sql);
while($row = WCF::getDB()->fetchArray($result)) {
$data['newDatabaseItems'][] = $row;
}
return $data;
}
}
?>
|
|
|
PHP Source code |
1 |
wcf".WCF_N."_customer_product
|
|
|
MySQL queries |
1 |
ALTER TABLE wcf1_customer_product ADD currency TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL |
|
|
PHP Source code |
1 2 3 |
$sql = "UPDATE wcf".WCF_N."_customer_product
SET currency = '".DATABASE_ITEM_CURRENCY."'";
WCF::getDB()->sendQuery($sql);
|
|
|
XML |
1 2 3 4 5 6 7 8 9 10 |
<option name="database_item_currency"> <categoryname>portal.webdisk</categoryname> <optiontype>select</optiontype> <selectoptions><![CDATA[ 0:EURO 1:DOLLAR ]]></selectoptions> <showorder>3</showorder> <defaultvalue>0</defaultvalue> </option> |
|
|
Template source code |
1 |
{$newDatabaseItem.currency}
|
|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<?php
// wcf imports
require_once(WCF_DIR.'lib/system/cache/CacheBuilder.class.php');
class CacheBuilderPortalWebdisk implements CacheBuilder {
/**
* @see CacheBuilder::getData()
*/
public function getData($cacheResource) {
$data['newDatabaseItems'] = array();
$sql = "SELECT a.name, a.releaseTime, a.active, a.productID, b.public, b.priceLicense, b.productID, c.optionValue
FROM wcf".WCF_N."_customer_storage a
LEFT JOIN wcf".WCF_N."_customer_product b
LEFT JOIN wcf".WCF_N."_option c
ON (b.productID = a.productID)
WHERE a.active = 1 AND b.public = 1 AND c.optionName = 'customer_currency'
ORDER BY a.releaseTime DESC
LIMIT ".DATABASE_ITEM_VIEW_TOP."";
$result = WCF::getDB()->sendQuery($sql);
while($row = WCF::getDB()->fetchArray($result)) {
$data['newDatabaseItems'][] = $row;
}
return $data;
}
}
?>
|
|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<?php
// wcf imports
require_once(WCF_DIR.'lib/system/cache/CacheBuilder.class.php');
class CacheBuilderPortalWebdisk implements CacheBuilder {
/**
* @see CacheBuilder::getData()
*/
public function getData($cacheResource) {
$data['newDatabaseItems'] = array();
$sql = "SELECT a.name, a.releaseTime, a.active, a.productID, b.public, b.priceLicense, b.productID
FROM wcf".WCF_N."_customer_storage a
LEFT JOIN wcf".WCF_N."_customer_product b
ON (b.productID = a.productID)
WHERE a.active = 1 AND b.public = 1
ORDER BY a.releaseTime DESC
LIMIT ".DATABASE_ITEM_VIEW_TOP."";
$result = WCF::getDB()->sendQuery($sql);
$sql = "SELECT coptionValue
FROM wcf".WCF_N."_option
WHERE categoryName = 'customer.currency' AND optionName = 'customer_currency'";
$result = WCF::getDB()->sendQuery($sql);
while($row = WCF::getDB()->fetchArray($result)) {
$data['newDatabaseItems'][] = $row;
}
return $data;
}
}
?>
|
Quoted
You get more information about the problem in our knowledge base: http://www.woltlab.com/help/?code=1064
Information:
error message: Invalid SQL: SELECT a.name, a.releaseTime, a.active, a.productID, b.public, b.priceLicense, b.productID, c.optionValue
FROM wcf1_customer_storage a
LEFT JOIN wcf1_customer_product b
LEFT JOIN wcf1_option c
ON (b.productID = a.productID)
WHERE a.active = 1 AND b.public = 1 AND c.optionName = 'customer_currency'
ORDER BY a.releaseTime DESC
LIMIT 5
error code: 1064
sql type: MySQLDatabase
sql 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 'WHERE a.active =
1 AND b.public = 1 AND c.optionName = 'customer_currency'
' at line 6
sql error number: 1064
sql version:
file: /www/htdocs/w00b2576/sumlinemediade/wcf/lib/system/database/MySQLDatabase.class.php (11
php version: 5.3.13-nmm1
wcf version: 1.1.9 (Tempest)
date: Mon, 23 Jul 2012 18:27:29 +0000
request: /index.php?page=Portal
referer: http://wbb.sumline-media.de/index.php?pa…=1&categoryID=0
Stacktrace:
#0 /www/htdocs/w00b2576/sumlinemediade/lib/system/cache/CacheBuilderPortalWebdisk.class.php(20): MySQLDatabase->sendQuery('SELECT a.name, ...')
#1 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/system/cache/CacheHandler.class.php(173): CacheBuilderPortalWebdisk->getData(Array)
#2 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/system/cache/CacheHandler.class.php(126): CacheHandler->rebuild(Array)
#3 /www/htdocs/w00b2576/sumlinemediade/lib/system/portalbox/cachebuilder/DefaultCacheBuilder.class.php(2: CacheHandler->get('box-23')
#4 /www/htdocs/w00b2576/sumlinemediade/lib/data/boxes/PortalBox.class.php(117): DefaultCacheBuilder->execute('23', 'CacheBuilderPor...', 'type2', '0', '0')
#5 /www/htdocs/w00b2576/sumlinemediade/lib/system/portalbox/PortalBoxFactory.class.php(102): PortalBox->initialize()
#6 /www/htdocs/w00b2576/sumlinemediade/lib/system/portalbox/PortalBoxFactory.class.php(44): PortalBoxFactory->initializeBoxes(false)
#7 /www/htdocs/w00b2576/sumlinemediade/lib/page/PortalPage.class.php(120): PortalBoxFactory->__construct(true, false, true, true, true)
#8 /www/htdocs/w00b2576/sumlinemediade/lib/page/PortalPage.class.php(105): PortalPage::getPortalBoxes()
#9 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/page/AbstractPage.class.php(90): PortalPage->readData()
#10 /www/htdocs/w00b2576/sumlinemediade/lib/page/PortalPage.class.php(147): AbstractPage->show()
#11 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/page/AbstractPage.class.php(46): PortalPage->show()
#12 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/util/RequestHandler.class.php(64): AbstractPage->__construct()
#13 /www/htdocs/w00b2576/sumlinemediade/wcf/lib/util/RequestHandler.class.php(92): RequestHandler->__construct('Portal', Array, 'page')
#14 /www/htdocs/w00b2576/sumlinemediade/index.php(: RequestHandler::handle(Array)
#15 {main}

Forum Software: Burning Board® 3.1.7, developed by WoltLab® GmbH