PAD - PHP Application Driver


home | manual | reference | regression | sequence | develop | apps


Select/demo/union

PHP
select/demo/union.php
HTML
select/demo/union.pad
Result
<?php

$padSelect
['union1'] = [ 'base' => 'table1', ] ;
$padSelect ['union12'] = [ 'base' => 'table1', 'union' => 'table2' ] ;
$padSelect ['union1234'] = [ 'base' => 'table1', 'union' => [ 'table2', 'table3', 'table4' ] ] ;

?>
<h1>Union demo</h1>

<h2>1</h2>

<table border=1>
{union1}
<tr>
<td>{$key}</td>
<td>{$text}</td>
</tr>
{/union1}
</table>

<h2>1 2</h2>

<table border=1>
{union12}
<tr>
<td>{$key}</td>
<td>{$text}</td>
</tr>
{/union12}
</table>

<h2>1 2 3 4</h2>

<table border=1>
{union1234}
<tr>
<td>{$key}</td>
<td>{$text}</td>
</tr>
{/union1234}
</table>

Union demo

1

11 Only in table 1
12 Only in table 1
21 In both tables
22 In both tables

1 2

11 Only in table 1
12 Only in table 1
21 In both tables
22 In both tables
31 Only in table 2
32 Only in table 2

1 2 3 4

11 Only in table 1
12 Only in table 1
21 In both tables
22 In both tables
31 Only in table 2
32 Only in table 2
22 Multi join 3
22 Multi join 4



home | manual | reference | regression | sequence | develop | apps

(c) 2003-2025 Herbert Groot Jebbink