Problem with dinamic link

Problem with dinamic link

sineverbasineverba Posts: 6Questions: 0Answers: 0
edited July 2010 in General
Hi to all, sorry for my English, i'm Italian...

So, i've this table

[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "ext_user.php",
"sPaginationType": "full_numbers",
"oLanguage": {
"sLengthMenu": "Visualizza _MENU_ risultati per pagina",
"sZeroRecords": "Nessun risultato",
"sInfo": "Visulizzati da _START_ a _END_ di _TOTAL_ risultati",
"sInfoEmpty": "Visualizzati 0 a 0 di 0 risultati",
"sInfoFiltered": "(filtrati da _MAX_ risultati)",
"oPaginate": {
"sFirst": "Primo",
"sLast": "Ultimo",
"sNext": "Successivo",
"sPrevious": "Precedente"

}
}

}



);
} );
[/code]

That with my SQL functions perfectly.

I Use this ext_user.php

[code]
[...]
/*
* Output
*/


$sOutput = '{';
$sOutput .= '"sEcho": '.intval($_GET['sEcho']).', ';
$sOutput .= '"iTotalRecords": '.$iTotal.', ';
$sOutput .= '"iTotalDisplayRecords": '.$iFilteredTotal.', ';
$sOutput .= '"aaData": [ ';
while ( $aRow = mysql_fetch_array( $rResult ) )

{

$sOutput .= "[";

$openlink = "";
$closelink = "";

$sOutput .= '"'.$openlink.$aRow['id'].$closelink.'",';
$sOutput .= '"'.str_replace('"', '\"', $aRow['username']).'",';
$sOutput .= '"'.str_replace('"', '\"', $aRow['email']).'",';
$sOutput .= '"'.str_replace('"', '\"', $aRow['ruolo']).'",';
$sOutput .= "],";

}

$sOutput = substr_replace( $sOutput, "", -1 );
$sOutput .= '] }';


echo $sOutput;
[/code]

If I use only

[code]
$sOutput .= '"'.$aRow['id'].'",';
[/code]

It's all OK... If I use
[code]
$sOutput .= '"'.$openlink.$aRow['id'].$closelink.'",';
[/code]

My Table goes in "loading....." for ever and for ever...

Can u help me?

Thank you for the support!

Replies

  • sineverbasineverba Posts: 6Questions: 0Answers: 0
    I've found!

    code:

    [code]
    $sOutput .= "[";

    //$openlink = "";
    $openlink = "";
    $closelink = "";

    $sOutput .= '"'.$openlink.$aRow['id'].$closelink.'",';
    //$sOutput .= '"'.str_replace('"', '\"', $aRow['id']).'",';
    $sOutput .= '"'.str_replace('"', '\"', $aRow['username']).'",';
    $sOutput .= '"'.str_replace('"', '\"', $aRow['email']).'",';
    $sOutput .= '"'.str_replace('"', '\"', $aRow['ruolo']).'",';
    $sOutput .= "],";

    }

    [/code]
This discussion has been closed.