Código PHP:
function getthesitename(){
$conexion = Conexion::singleton_conexion();
$SQL = 'SELECT sitename FROM '.SSPREFIX.'socialconfig WHERE id = 1';
$stn = $conexion -> prepare($SQL);
$stn -> execute();
$rstl = $stn -> fetchAll();
if (empty($rstl)){
$conexion = '';
exit();
}else{
foreach ($rstl as $key){
echo $key['sitename'];
}
}
$conexion = '';
}
// Nombre del sitio
function thenameusertitle($permalink){
$conexion = Conexion::singleton_conexion();
$SQL = 'SELECT * FROM '.SSPREFIX.'usuarios WHERE permalink = :permalink LIMIT 1';
$stn = $conexion -> prepare($SQL);
$stn -> bindParam(':permalink',$permalink,PDO::PARAM_STR);
$stn -> execute();
$rstl = $stn -> fetchAll();
if (empty($rstl)){
}else{
foreach ($rstl as $key){
return $key['id'].'|'.$key['nombre'].' '.$key['apellido'];
}
}
$conexion = '';
}
Saludos