Hi,
I am trying to reduce the number of generated files required when a table is filered over a field value.
Example:
Database sys_vorlauf has a column art, art is an integer.
I can generate one set of files for each value
art=1 sys_vorlauf_list_01.php sys_vorlauf_add_01.php and so on.
If I have 100 different art values I become 1200 files all of which have to be edited to change the calls e.g. sys_vorlauf_add.php to sys_vorlauf_add_01.php.
for a programm which is meant to save time this does the reverse.
If I can send the value of sys_vorlauf.art each time to a variable $vorlaufart then I only require 12 pages instead of n times the art types.
In the include directory is a file sys_vorlauf_variables.php where the gstrSQL is filled and when I edit the SQL String in PHPRunner it is stored here:
$gstrSQL = "select `_kenn`, `art`, `nummer`, `Bezeichnung`, `zahl01`, `zahl02`, `string01`, `string02`, `text1` From `sys_vorlauf` WHERE `art` = 3";
Can I use a variable i.e. $vorlaufart to set the WHERE
$gstrSQL = "select `_kenn`, `art`, `nummer`, `Bezeichnung`, `zahl01`, `zahl02`, `string01`, `string02`, `text1` From `sys_vorlauf` WHERE `art` = <?$vorlaufart?>";
I tried this of course but I keep getting errors and the Value of $vorlaufart gets lost.
I have a pulldown menu system and call the php files correctly as in the generated links.
Now to my questions.
Where must I set the variable $vorlaufart?
Which pages must I change.
How do I call a new page with the art Value without causing other variable values to get lost.
Thanks in advance for your help.
if required I can send the source code.
Robert KS