Hi,
I need to create a custom table to change data layout from an original one.
I want exactly to display data in line after selecting them as a column.
Below my logic. I use a custom file in V2018.
First, is my logic suitable. If yes what’s wrong.
This is the error message I get :
« Fatal error: Array callback has to contain indices 0 a nd 1 »
THANKS for your help
<?php
// Selecting data --------------------------------------------------------------
global $conn;
$idcamp= ew_ExecuteScalar ("SELECT IDCampagne FROM t_campagnes WHERE EtatCampagne='En cours'");
$idplan= ew_ExecuteScalar ("SELECT IDplancamp FROM t_plancamp WHERE IDCampagne=$idcamp ");
$rowcount=ew_ExecuteScalar ("SELECT COUNT(*) FROM t_plancampdetails WHERE IDplancamp =$idplan");
$desph=ew_ExecuteRow("SELECT Desphasecamp FROM t_plancampdetails WHERE IDplancamp =$idplan");
$etatph=ew_ExecuteRow("SELECT Etaphasecamp FROM t_plancampdetails WHERE IDplancamp =$idplan");
?>
// Drawing table data first row --------------------------------------------------------------
<?php
$i = 1;
while ($i <= $rowcount):
echo '';
$i++;
endwhile;
?>
// Drawing table data 2nd row --------------------------------------------------------------
<?php
$j = 1;
while ($j <= $rowcount):
echo '';
$j++;
endwhile;
?>
As if lines where pivoted.
This is my code.
global $conn;
$phase=ew_ExecuteRow(“SELECT Desphasecamp, Etatphasecamp FROM t_suiviplancampdet WHERE IDsuiviplancamp =$idplan”);
echo ‘