He realizado mas cambios.
Si alguien desea aportar un nuevo diseño preguntarme.
Algunas fotos.
Codigo mejorado en todo el aspecto ORC
Ejemplos
Capitulos:
/** Opciones */
$opts = [
'identifier' => $data['id'],
'ORDER' => ['id' => 'DESC']
];
/** GET /chapter */
$chapters = episodes_show($database, $opts);
if (!is_null($chapters))
{
foreach($chapters as $chapter)
{
echo '<li>
<a href="' . $data['slug'] . '/' . $chapter['number'] .'">
<img src="' . $data['coverImage'] .'" alt="' . $data['title'] .'"/>
<span>Capítulo ' . $chapter['number'] .' - ' . $chapter['title'] .'</span>
</a>
</li>';
}
}
Inicio + capitulos en simul
/** Opciones */
$opts = [
'simulcasts' => 1,
'status' => 1,
'ORDER' => ['id' => 'DESC'],
'LIMIT' => 28
];
/** GET /chapter */
$data = episodes_show($database, $opts);
if (!is_null($data))
{
foreach($data as $chapter)
{
/** Opciones */
$opts = [
'id' => $chapter['identifier']
];
/** GET /anime */
$parents = anime_show($database, $opts);
echo '<li>
<a href="' . $parents['slug'] . '/' . $chapter['number'] .'" title="' . $chapter['title'] .'">
<img src="' . $parents['coverImage'] .'" alt="#"/>
<span>' . $chapter['title'] .'</span>
</a>
</li>';
}
}
- - - Actualizado - - -
Rendimiento AL
Info
(
[server] => Uptime: 29921 Threads: 2 Questions: 7028 Slow queries: 0 Opens: 384 Flush tables: 1 Open tables: 104 Queries per second avg: 0.234
[driver] => mysql
[client] => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
[version] => 5.7.23
[connection] => localhost via TCP/IP
[dsn] => mysql:dbname=animemovil;host=localhost;port=33025
)
DBA
array(1) {
[0]=>
string(73) "SELECT * FROM `anime_episode` WHERE `identifier` = '1' ORDER BY `id` DESC"
}
Debug
object(Medoo\Medoo)#21 (9) {
["pdo"]=>
object(PDO)#22 (0) {
}
["type"
rotected]=>
string(5) "mysql"
["prefix"
rotected]=>
NULL
["statement"
rotected]=>
object(PDOStatement)#24 (1) {
["queryString"]=>
string(84) "SELECT * FROM "anime_episode" WHERE "identifier" = :MeDoO_1_mEdOo ORDER BY "id" DESC"
}
["dsn"
rotected]=>
string(49) "mysql:dbname=animemovil;host=localhost;port=33025"
["logs"
rotected]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(84) "SELECT * FROM "anime_episode" WHERE "identifier" = :MeDoO_1_mEdOo ORDER BY "id" DESC"
[1]=>
array(1) {
[":MeDoO_1_mEdOo"]=>
array(2) {
[0]=>
string(1) "1"
[1]=>
int(2)
}
}
}
}
["logging"
rotected]=>
bool(false)
["debug_mode"
rotected]=>
bool(true)
["guid"
rotected]=>
int(2)
}