Problem with dinamic link
Problem with dinamic link
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!
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!
This discussion has been closed.
Replies
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]