MySQL-Abfrage(n) |
|
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 |
<?php $link = mysql_connect('localhost', 'webxxx', 'pass') or die('Keine Verbindung: ' . mysql_error()); echo 'Verbindung erfolgreich'; mysql_select_db('usr_webxxxx_x') or die('Datenbank nicht ausgewaehlt'); $query = 'SELECT name,authid,reason FROM sourceban_bans'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); echo "<table>\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t<tr>\n"; foreach ($line as $col_value) { echo "\t\t<td>$col_value</td>\n"; } echo "\t</tr>\n"; } echo "</table>\n"; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?> |
PHP-Quelltext |
|
1 |
\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t\n"; foreach ($line as $col_value) { echo "\t\t$col_value\n"; } echo "\t\n"; } echo "\n"; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?>
|
PHP-Quelltext |
|
1 |
Parse error: syntax error, unexpected '>' in /srv/www/htdocs/webxxx/html/wbb2/lib/data/boxes/scripts/customBox9.php on line 9
|
MySQL-Abfrage(n) |
|
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 $mysqlhost="localhost"; // MySQL-Host angeben $mysqluser="webxxx"; // MySQL-User angeben $mysqlpwd="pass"; // Passwort angeben $mysqldb="usr_webxxxx"; // Gewuenschte Datenbank angeben $connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or die ("Verbindungsversuch fehlgeschlagen"); mysql_select_db($mysqldb, $connection) or die("Konnte die Datenbank nicht waehlen."); $sql = "SELECT name, authid, reason FROM sourceban_bans"; $bans_query = mysql_query($sql) or die("Anfrage nicht erfolgreich"); $anzahl = mysql_num_rows($bans_query); echo "Anzahl der Datensätze: $anzahl"; ?> <table cellpadding="1" cellspacing="3" border="1"> <tr> <td>Name</td> <td>STEAM ID</td> <td>REASON</td> </tr> <?php while ($bans = mysql_fetch_array($bans_query)){ ?> <tr> <td><?=$bans['Name']?></td> <td><?=$bans['STEAM ID']?></td> <td><?=$bans['REASON']?></td> </tr> <?php } ?> </table> |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Fatal error: Invalid SQL: SELECT* FROMwcf1_language_category WHERE languageCategoryID IN (85) You get more information about the problem in our knowledge base: http://www.woltlab.com/help/?code=1146 Information: error message: Invalid SQL: SELECT* FROMwcf1_language_category WHERE languageCategoryID IN (85) error code: 1146 sql type: MySQLDatabase sql error: Table 'usr_webxxxx.wcf1_language_category' doesn't exist sql error number: 1146 sql version: file: /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/database/MySQLDatabase.class.php (118) php version: 5.3.6-6~dotdeb.0 wcf version: 1.1.8 (Tempest) date: Sun, 20 Nov 2011 16:07:51 +0000 request: /index.php?page=Portal referer: /index.php?page=Portal Stacktrace: #0 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/language/LanguageEditor.class.php(305): MySQLDatabase->sendQuery('SELECT?*????FRO...') #1 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/language/LanguageEditor.class.php(386): LanguageEditor->writeLanguageFiles(Array, Array) #2 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/language/Language.class.php(237): LanguageEditor->updateCategory('85', 27) #3 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/language/Language.class.php(176): Language->loadCategory('wbb.portal') #4 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/template/plugin/TemplatePluginPrefilterLang.class.php(30) : regexp code(1): Language->get('wbb.portal.titl...') #5 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/template/plugin/TemplatePluginPrefilterLang.class.php(30): preg_replace('~\{lang\}([\w\....', 'WCF::getLanguag...', '{include file="...') #6 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/template/TemplateScriptingCompiler.class.php(1298): TemplatePluginPrefilterLang->execute('{include file="...', Object(TemplateCompiler)) #7 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/template/TemplateScriptingCompiler.class.php(87): TemplateScriptingCompiler->applyPrefilters('{include file="...') #8 /srv/www/htdocs/web156/html/wbb2/wcf/lib/system/template/TemplateCompiler.class.php(31): TemplateScriptingCompiler->compileString('portal', '{include file="...') #9 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/template/Template.class.php(360): TemplateCompiler->compile('portal', '{include file="...', '/srv/www/htdocs...') #10 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/template/Template.class.php(264): Template->compileTemplate('portal', '/srv/www/htdocs...', '/srv/www/htdocs...') #11 /srv/www/htdocs/webxxxx/html/wbb2/wcf/lib/page/AbstractPage.class.php(100): Template->display('portal') #12 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/page/AbstractPage.class.php(46): AbstractPage->show() #13 /srv/www/htdocs/webxxx/html/wbb2/lib/page/PortalPage.class.php(97): AbstractPage->__construct() #14 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/util/RequestHandler.class.php(64): PortalPage->__construct() #15 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/util/RequestHandler.class.php(92): RequestHandler->__construct('Portal', Array, 'page') #16 /srv/www/htdocs/webxxx/html/wbb2/index.php(8): RequestHandler::handle(Array) #17 {main} Fatal error: Uncaught exception 'DatabaseException' with message 'Invalid SQL: UPDATE wcf1_session SET ipAddress = 'xxx.xxx.xx.xx', userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0', requestURI = '/index.php?page=Portal', requestMethod = 'GET', lastActivityTime = 1321805270, packageID = 27 , boardID = 0, threadID = 0 WHERE sessionID = 'SID'' in /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/database/MySQLDatabase.class.php:118 Stack trace: #0 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/session/Session.class.php(439): MySQLDatabase->sendQuery('UPDATE ?wcf1_se...') #1 /srv/www/htdocs/webxxx/html/wbb2/lib/system/session/WBBSession.class.php(85): Session->update() #2 /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/WCF.class.php(121): WBBSession->update() #3 [internal function]: WCF::destruct() #4 {main} thrown in /srv/www/htdocs/webxxx/html/wbb2/wcf/lib/system/database/MySQLDatabase.class.php on line 118 |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Canc3lL0g0ut« (20. November 2011, 17:18)
PHP-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
$link = mysql_connect('localhost', 'XXXXf', 'XXXXX')
or die('Keine Verbindung: ' . mysql_error());
mysql_select_db('d011e1af') or die('Datenbank nicht ausgewaehlt');
$query = 'SELECT name,authid,reason FROM sb_bans';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$echo .= "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$echo .= "\t<tr>\n";
foreach ($line as $col_value) {
$echo .= "\t\t<td>$col_value</td>\n";
}
$echo .= "\t</tr>\n";
}
$echo .= "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
return $echo;
|
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »MadMakz« (20. November 2011, 18:28)