Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » Joomla »

Conflicto con base de datos

Estas en el tema de Conflicto con base de datos en el foro de Joomla en Foros del Web. Hola a todos :) Soy un nuevo usuario de Joomla, por lo que desconosco sus limitaciones. Resulta que encontre un template gratuito siteground-j15-82 el cual ...
  #1 (permalink)  
Antiguo 28/11/2010, 12:10
 
Fecha de Ingreso: agosto-2009
Mensajes: 349
Antigüedad: 15 años, 3 meses
Puntos: 8
Conflicto con base de datos

Hola a todos :)

Soy un nuevo usuario de Joomla, por lo que desconosco sus limitaciones. Resulta que encontre un template gratuito siteground-j15-82 el cual contaba con dos módulos en el header. Dichos módulos estaban indicados en el HTML del template de la siguiente manera:

Código PHP:
<div class="popular<?php if(!$this->countModules('user2') and JRequest::getCmd('layout') != 'form') : ?> only<?php endif; ?>">
                        <jdoc:include type="modules" style="rounded" name="user2" />
                    </div>
<div class="latest<?php if(!$this->countModules('user2') and JRequest::getCmd('layout') != 'form') : ?> only<?php endif; ?>">
                        <jdoc:include type="modules" style="rounded" name="user1" />
                    </div>
Mi sitio organiza eventos para un juego online, y a la vez es una comunidad de fans de dicho juego, por lo que se me ocurrió reemplazar ambos módulos por "Últimos eventos" y "Últimos Posts" respectivamente. Entonces procedí a reemplazar el código anterior por el siguiente:

Código PHP:
<div class="popular<?php if(!$this->countModules('user1') and JRequest::getCmd('layout') != 'form') : ?> only<?php endif; ?>">
<div class="module">                
<h3>EVENTOS</h3>        
<ul class="mostread">
<?php
$ipeve 
'******';
$usuarioeve '******';
$passwordeve '******';
$db_nameeve '******';
$conneve mysql_connect($ipeve,$usuarioeve,$passwordeve) or die();
mysql_select_db($db_nameeve,$conneve) or die();
$sqleve "select  * from eventos ORDER BY mes DESC, dia DESC LIMIT 0, 5";

$reseve mysql_query($sqleve,$conneve) or die(mysql_error());
while(
$roweve mysql_fetch_array($reseve)){
 echo 
'    <li class=mostread>
        <a href='
.$roweve['link'].' target=blank class=mostread>
            '
.$roweve['nombre'].'</a>
    </li>'
;
 }
mysql_free_result($reseve);
mysql_close($conneve);
 
?></ul></div>
                    </div>
                    <div class="latest<?php if(!$this->countModules('user1') and JRequest::getCmd('layout') != 'form') : ?> only<?php endif; ?>">
<div class="module">                
<h3>ÚLTIMOS POSTS</h3>        
<ul class="mostread">
<?php
$ipposts 
'******';
$usuarioposts '******';
$passwordposts '******';
$db_nameposts '******';
$connposts mysql_connect($ipposts,$usuarioposts,$passwordposts) or die();
mysql_select_db($db_nameposts,$connposts) or die();
$sqlposts "SELECT * FROM phpbb_topics WHERE forum_id NOT IN (15, 16, 19) ORDER BY topic_last_post_time DESC LIMIT 0,5";

$resposts mysql_query($sqlposts,$connposts) or die(mysql_error());
while(
$row mysql_fetch_array($resposts)){
    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>';
}
mysql_free_result($resposts);
mysql_close($connposts);
 
?></ul></div>
Los datos se muestran perfectamente pero al parece me esta generando problemas con los demás módulos, ya que la encuesta no se muestra y arriba del login figura lo siguiente:

Warning: mysql_real_escape_string(): 23 is not a valid MySQL-Link resource in path/Joomla/libraries/joomla/database/database/mysql.php on line 193

Que vendria a ser esto:

Código HTML:
    function getEscaped( $text, $extra = false )
    {
        $result = mysql_real_escape_string( $text, $this->_resource );
        if ($extra) {
            $result = addcslashes( $result, '%_' );
        }
        return $result;
    }
Esperamos que me ayuden como siempre.. xD
  #2 (permalink)  
Antiguo 29/11/2010, 08:04
Avatar de jdelrioj  
Fecha de Ingreso: julio-2008
Ubicación: La Rambla , Córdoba -> Andalucía
Mensajes: 340
Antigüedad: 16 años, 4 meses
Puntos: 13
Respuesta: Conflicto con base de datos

Buenas, he estado mirando y yo no pondría la siguiente linea:
<div class="latest<?php if(!$this->countModules('user1') and JRequest::getCmd('layout') != 'form') : ?> only<?php endif; ?>">

Quiero decir sustituyes lo que tenias por los dos div sin las lineas:

<div class="latest<?php if(!$this->countModules('user1') and JRequest::getCmd('layout') != 'form') : ?> only<?php endif; ?>">

No se si me he explicado muy bien pero ...
  #3 (permalink)  
Antiguo 29/11/2010, 11:39
 
Fecha de Ingreso: agosto-2009
Mensajes: 349
Antigüedad: 15 años, 3 meses
Puntos: 8
Respuesta: Conflicto con base de datos

Gracias por responder,

hice lo que me dijiste, quedandome el código asi:

Código PHP:
Ver original
  1. <div class="popular">
  2. <div class="module">                
  3. <h3>EVENTOS</h3>        
  4. <ul class="mostread">
  5. <?php
  6. $ipeve = '******';
  7. $usuarioeve = '******';
  8. $passwordeve = '******';
  9. $db_nameeve = '******';
  10. $conneve = mysql_connect($ipeve,$usuarioeve,$passwordeve) or die();
  11. mysql_select_db($db_nameeve,$conneve) or die();
  12. $sqleve = "select  * from eventos ORDER BY mes DESC, dia DESC LIMIT 0, 5";
  13.  
  14. $reseve = mysql_query($sqleve,$conneve) or die(mysql_error());
  15. while($roweve = mysql_fetch_array($reseve)){
  16.  echo '    <li class=mostread>
  17.        <a href='.$roweve['link'].' target=blank class=mostread>
  18.            '.$roweve['nombre'].'</a>
  19.    </li>';
  20.  }
  21. mysql_close($conneve);
  22.  ?></ul></div>
  23.                     </div>
  24.                     <div class="latest">
  25. <div class="module">                
  26. <h3>ÚLTIMOS POSTS</h3>        
  27. <ul class="mostread">
  28. <?php
  29. $ipposts = '******';
  30. $usuarioposts = '******';
  31. $passwordposts = '******';
  32. $db_nameposts = '******';
  33. $connposts = mysql_connect($ipposts,$usuarioposts,$passwordposts) or die();
  34. mysql_select_db($db_nameposts,$connposts) or die();
  35. $sqlposts = "SELECT * FROM phpbb_topics WHERE forum_id NOT IN (15, 16, 19) ORDER BY topic_last_post_time DESC LIMIT 0,5";
  36.  
  37. $resposts = mysql_query($sqlposts,$connposts) or die(mysql_error());
  38. while($row = mysql_fetch_array($resposts)){
  39.     if (strlen($row['topic_title']) > 35) {
  40.         $row['topic_title'] = substr($row['topic_title'],0,35-3)."...";  
  41.     }
  42.     echo '
  43. <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>';
  44. }
  45. mysql_free_result($resposts);
  46. mysql_close($connposts);
  47.  ?></ul></div>
  48.                     </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.
  #4 (permalink)  
Antiguo 04/08/2011, 17:32
 
Fecha de Ingreso: agosto-2011
Mensajes: 1
Antigüedad: 13 años, 3 meses
Puntos: 0
Busqueda Respuesta: Conflicto con base de datos

Hola amigo porfa yo tengo el mismo problema que usted porfa si me puede ayudar paraq ue no aparezca ese error porfa esoty casi una semana con ese problema
  #5 (permalink)  
Antiguo 06/08/2011, 03:15
Avatar de zulkas  
Fecha de Ingreso: julio-2011
Mensajes: 126
Antigüedad: 13 años, 4 meses
Puntos: 11
Respuesta: Conflicto con base de datos

Cita:
Iniciado por kenproxd Ver Mensaje
Gracias por responder,

hice lo que me dijiste, quedandome el código asi:

Código PHP:
Ver original
  1. <div class="popular">
  2. <div class="module">                
  3. <h3>EVENTOS</h3>        
  4. <ul class="mostread">
  5. <?php
  6. $ipeve = '******';
  7. $usuarioeve = '******';
  8. $passwordeve = '******';
  9. $db_nameeve = '******';
  10. $conneve = mysql_connect($ipeve,$usuarioeve,$passwordeve) or die();
  11. mysql_select_db($db_nameeve,$conneve) or die();
  12. $sqleve = "select  * from eventos ORDER BY mes DESC, dia DESC LIMIT 0, 5";
  13.  
  14. $reseve = mysql_query($sqleve,$conneve) or die(mysql_error());
  15. while($roweve = mysql_fetch_array($reseve)){
  16.  echo '    <li class=mostread>
  17.        <a href='.$roweve['link'].' target=blank class=mostread>
  18.            '.$roweve['nombre'].'</a>
  19.    </li>';
  20.  }
  21. mysql_close($conneve);
  22.  ?></ul></div>
  23.                     </div>
  24.                     <div class="latest">
  25. <div class="module">                
  26. <h3>ÚLTIMOS POSTS</h3>        
  27. <ul class="mostread">
  28. <?php
  29. $ipposts = '******';
  30. $usuarioposts = '******';
  31. $passwordposts = '******';
  32. $db_nameposts = '******';
  33. $connposts = mysql_connect($ipposts,$usuarioposts,$passwordposts) or die();
  34. mysql_select_db($db_nameposts,$connposts) or die();
  35. $sqlposts = "SELECT * FROM phpbb_topics WHERE forum_id NOT IN (15, 16, 19) ORDER BY topic_last_post_time DESC LIMIT 0,5";
  36.  
  37. $resposts = mysql_query($sqlposts,$connposts) or die(mysql_error());
  38. while($row = mysql_fetch_array($resposts)){
  39.     if (strlen($row['topic_title']) > 35) {
  40.         $row['topic_title'] = substr($row['topic_title'],0,35-3)."...";  
  41.     }
  42.     echo '
  43. <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>';
  44. }
  45. mysql_free_result($resposts);
  46. mysql_close($connposts);
  47.  ?></ul></div>
  48.                     </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();"
  #6 (permalink)  
Antiguo 06/08/2011, 03:17
Avatar de zulkas  
Fecha de Ingreso: julio-2011
Mensajes: 126
Antigüedad: 13 años, 4 meses
Puntos: 11
Respuesta: Conflicto con base de datos

Cita:
Iniciado por kenproxd Ver Mensaje
Gracias por responder,

hice lo que me dijiste, quedandome el código asi:

Código PHP:
Ver original
  1. <div class="popular">
  2. <div class="module">                
  3. <h3>EVENTOS</h3>        
  4. <ul class="mostread">
  5. <?php
  6. $ipeve = '******';
  7. $usuarioeve = '******';
  8. $passwordeve = '******';
  9. $db_nameeve = '******';
  10. $conneve = mysql_connect($ipeve,$usuarioeve,$passwordeve) or die();
  11. mysql_select_db($db_nameeve,$conneve) or die();
  12. $sqleve = "select  * from eventos ORDER BY mes DESC, dia DESC LIMIT 0, 5";
  13.  
  14. $reseve = mysql_query($sqleve,$conneve) or die(mysql_error());
  15. while($roweve = mysql_fetch_array($reseve)){
  16.  echo '    <li class=mostread>
  17.        <a href='.$roweve['link'].' target=blank class=mostread>
  18.            '.$roweve['nombre'].'</a>
  19.    </li>';
  20.  }
  21. mysql_close($conneve);
  22.  ?></ul></div>
  23.                     </div>
  24.                     <div class="latest">
  25. <div class="module">                
  26. <h3>ÚLTIMOS POSTS</h3>        
  27. <ul class="mostread">
  28. <?php
  29. $ipposts = '******';
  30. $usuarioposts = '******';
  31. $passwordposts = '******';
  32. $db_nameposts = '******';
  33. $connposts = mysql_connect($ipposts,$usuarioposts,$passwordposts) or die();
  34. mysql_select_db($db_nameposts,$connposts) or die();
  35. $sqlposts = "SELECT * FROM phpbb_topics WHERE forum_id NOT IN (15, 16, 19) ORDER BY topic_last_post_time DESC LIMIT 0,5";
  36.  
  37. $resposts = mysql_query($sqlposts,$connposts) or die(mysql_error());
  38. while($row = mysql_fetch_array($resposts)){
  39.     if (strlen($row['topic_title']) > 35) {
  40.         $row['topic_title'] = substr($row['topic_title'],0,35-3)."...";  
  41.     }
  42.     echo '
  43. <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>';
  44. }
  45. mysql_free_result($resposts);
  46. mysql_close($connposts);
  47.  ?></ul></div>
  48.                     </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 mysql genera un error. El cual no entiendo pero puede probar a abrir y cerrar solamente a ve si te genera el 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();" te devuelve un Array con los elementos de la consulta.

Etiquetas: conflicto
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:21.