My problem is that when I put zombieevent wing page and php
I get an error I get the blank page with this error
good and this is the script php zombieevent
and this is the query that I
but it gives me error and tried to fix it and nothing happens :/
help pliss
I will give rep
I get an error I get the blank page with this error
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'otserver.evento' doesn't exist' in C:\xampp\htdocs\system\pages\zombieevent.php:53 Stack trace: #0 C:\xampp\htdocs\system\pages\zombieevent.php(53): PDO->query('???SELECT w.id ...') #1 C:\xampp\htdocs\system\application\controllers\p.php(13): include('C:\xampp\htdocs...') #2 [internal function]: p->v('zombieevent') #3 C:\xampp\htdocs\system\codeigniter\CodeIgniter.php(236): call_user_func_array(Array, Array) #4 C:\xampp\htdocs\index.php(157): require_once('C:\xampp\htdocs...') #5 {main} thrown in C:\xampp\htdocs\system\pages\zombieevent.php on line 53
good and this is the script php zombieevent
PHP:
<div class='message'>
<div class='title'>Zombie event</div>
<div class='content'>
<?PHP
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
echo '<table border="0" cellspacing="1" cellpadding="5" width=100% class="cellspadding">
<center><img src="'.WEBSITE.'/public/images/zombie.png" width="50%" height="50%"/></center><br/>
<tr class="tableheader">
<TD align="center">En que consiste Zombie Event?</TD>
</TR>
</TABLE>
<table border="0" cellspacing="1" cellpadding="5" width=100% class="cellspadding">
<tr class="tablerow">
<TD width="30%">
<center><b>Objective</b><br />¿De que trata el zombie evento.</center>
</TD>
<TD width="70%">
<center>Todos los días a las 17:00 <b>5pm </b>, se abrira un teleport en el templo por unos minutos,y luego se cerrara..</center>
</TD>
</TR>
<tr class="tablerow">
<TD width="30%">
<center><b>Desarrollo del evento</b><br />Zombie Plague events</center>
</TD>
<TD width="70%">
<center>Una vez cerrado el teleport, pasado unos segundos comenzaran a convocarse un Zombie cada 20 segundos y se informara cuantos zombies hay en la zona del evento y cuantos players vivos Se necesitaran al menos 5 players para que comience el evento y un maximo de 100 players.La idea es escapar de los Zombies, ya que si nos matan, perderemos el evento, el ultimo que muera, como se dijo anteriormente, gana.Es importante notar que al morir, no perderan nada, solo seran descalificados del evento...</center>
</TD>
</TR>
<tr class="tablerow">
<TD width="30%">
<center><b>Que es un zombie?</b><br />Beneficios?</center>
</script></strong></span><br/> ' . $record['score'] . '</a></td><td><img src="'.WEBSITE.'/public/images/zombie2.gif"></td></tr></table>
</TD>
<TD width="70%">
<center>Un zombie es un mounstruo invulnerable que camina muy lento pero ataca mucho y el beneficio una medalla vip..</center>
</TD>
</TR>
</TABLE>
<br /><br />';
$zombie = $SQL->query("
SELECT w.id AS id, w.time AS time, g.name AS evento, p.name AS name, w.started AS start
FROM zombie AS w
INNER JOIN players AS p
ON p.id = w.breaker
INNER JOIN evento AS g
ORDER BY id DESC LIMIT 10;
")->fetchAll();
if(empty($zombie)) {
echo '
<table border="0" cellspacing="0" cellpadding="5" width="100%" class="cellspadding">
<tr class="tableheader">
<TD align="center">Jugador ganador</TD>
</TR>
<tr class="tablerow">
<td align="center">No ahy ganadores.</td>
</tr>
</TABLE>
';
}
else
{
foreach ($zombie as $k=>$v) {
echo "<table border='0' cellspacing='1' cellpadding='5' width=100% class='cellspadding'>
<tr class='tableheader'>
<TD><b><center>#</center></b></TD>
<TD><b><center>Winner </center></b></TD>
<TD><b><center>time</center></b></TD>
<TD><b><center>item</center></b></td>
<tr class='tablerow'>
<TD>".$v["id"]."</TD>
<TD><a href='".WEBSITE."/index.php/character/view/".$result['name'].'">'.$result['name']."</a></TD>
<TD>".$v["name"]."</TD>
<TD>" . date("d/m/y H:i:s", $v["start"]) . "</TD>
<TD>" . date("d/m/y H:i:s", $v["time"]) . "</TD>
</TR>
</TABLE>
";
}
}
?>
</div>
</div>
PHP:
CREATE TABLE IF NOT EXISTS `zombieevent` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`started` int(10) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
but it gives me error and tried to fix it and nothing happens :/
help pliss
I will give rep