Respuesta: Conflicto con base de datos Cita:
Iniciado por kenproxd Gracias por responder,
hice lo que me dijiste, quedandome el código asi:
Código PHP:
Ver original<div class="popular"> <div class="module"> <h3>EVENTOS</h3> <ul class="mostread"> <?php $ipeve = '******'; $usuarioeve = '******'; $passwordeve = '******'; $db_nameeve = '******'; $sqleve = "select * from eventos ORDER BY mes DESC, dia DESC LIMIT 0, 5"; echo ' <li class=mostread> <a href='.$roweve['link'].' target=blank class=mostread> '.$roweve['nombre'].'</a> </li>'; } ?></ul></div> </div> <div class="latest"> <div class="module"> <h3>ÚLTIMOS POSTS</h3> <ul class="mostread"> <?php $ipposts = '******'; $usuarioposts = '******'; $passwordposts = '******'; $db_nameposts = '******'; $sqlposts = "SELECT * FROM phpbb_topics WHERE forum_id NOT IN (15, 16, 19) ORDER BY topic_last_post_time DESC LIMIT 0,5"; if (strlen($row['topic_title']) > 35) { $row['topic_title'] = substr($row['topic_title'],0,35-3)."..."; } echo ' <li class=mostread><A HREF="http://foro.auditiontown.net/viewtopic.php?f='.$row['forum_id'].'&t='.$row['topic_id'].'" target=_blank>'.$row['topic_title'].'</font></A></li>'; } ?></ul></div> </div>
lo que me da el siguiente error: * Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
* Error al cargar los módulos:Table 'audition_town.jos_modules' doesn't exist SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
De igual manera, los datos que imprimen las consultas de Eventos y Ultimos posts salen perfectamente pero el contenido no se muestra. O no entiendo bien o más bien eso parece un error de SQL al parecer al abrir tus propias sesiones de mysl genera un error.
¿Las tablas se encuentran en la misma base de datos que Joomla? si es así puedes utilizar esto mejor y más seguro... Código PHP: // Create a new query object. $db = JFactory::getDbo(); $query = $db->getQuery(true);
// Construct the query $query->select('campo 1 AS value, campo2 AS text'); $query->from('tabla AS s'); $query->order('s.name');
// Setup the query $db->setQuery($query->__toString());
$db->loadObjectList();
esto " $db->loadObjectList();" |