Java variable in php script
Java variable in php script
Hi there,
Does anybody know if something like this can be done??
I'd like to select a mysql column with the 'aData' variable :
[code] function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += '<?php $uid = ("'+aData[4]+'");
$queryuinfo = mysql_query("SELECT * FROM stock WHERE id = '" . $uid . "'");
$row = mysql_fetch_row($queryuinfo);
echo ('' . $row['location'] . '');
?>'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
[/code]
Does anybody know if something like this can be done??
I'd like to select a mysql column with the 'aData' variable :
[code] function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += '<?php $uid = ("'+aData[4]+'");
$queryuinfo = mysql_query("SELECT * FROM stock WHERE id = '" . $uid . "'");
$row = mysql_fetch_row($queryuinfo);
echo ('' . $row['location'] . '');
?>'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
[/code]
This discussion has been closed.