php variable in an extra column [server processing]

php variable in an extra column [server processing]

Keyser_SozeKeyser_Soze Posts: 22Questions: 0Answers: 0
edited January 2011 in General
Hi,

I would like to put a php variable in an extra column when using server processing.
I created my table, added new empty column... everything's OK

But when i added a new variable in the new column it doesn't work. I create a function that claculate remaining dates thanks to SQL but when i want to print the variable on the new column, the table don't even work!

[code]
if ( $aColumns[$i] == "visite_prochaine" )
{
$visite_prochaine=$aColumns[$i];
$sql_echeance_visite="SELECT DATEDIFF('$visite_prochaine',NOW())";
$requete_echeance_visite=mysql_query($sql_echeance_visite);
$echeance_viste=mysql_result($requete_echeance_visite,0);

$sOutput .= '"'.str_replace('"', '\"', $aRow[ $visite_prochaine ]).'",';

}

//... etc
}
/*
* Optional Configuration:
* If you need to add any extra columns (add/edit/delete etc) to the table, that aren't in the
* database - you can do it here
*/

$sOutput .= '"'.str_replace('"', '\"', $aRow[ $visite_prochaine ]).'",';
// when i put [$visite_prochaine] it shows result but when i put [$echeance_viste] it doesn't work.

[/code]
in the extra column [$sOutput], when i put [$visite_prochaine] it shows result but when i put [$echeance_viste] it doesn't work. what can I do?!

Thanks

Replies

This discussion has been closed.