Hello, is it possible to display to rows when MySQL value=2?
For Example: value=2 then Row1=Test1234, Row2=Test1234
Thanks!
Edit:
<pre><?php
require_once("DBController.php");
$db_handle = new DBController();
$result = $db_handle->runQuery("SELECT * FROM toy");
$header = $db_handle->runQuery("SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='blog_samples'
AND `TABLE_NAME`='toy'");
require('fpdf/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',12);
foreach($header as $heading) {
foreach($heading as $column_heading)
$pdf->Cell(90,12,$column_heading,1);
}
foreach($result as $row) {
$pdf->SetFont('Arial','',12);
$pdf->Ln();
foreach($row as $column)
$pdf->Cell(90,12,$column,1);
}
$pdf->Output();
?>
That is the basic code.
The Database entry looks like this:
name=test1234
value=2
if value=2 i want to display this row twice. If value=1 i want to display the data only once.
What I have tried:
I tried to search for this in google but I dont found any soloution.