chield fields dinamic table name?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
alessio
User
Posts: 27

chield fields dinamic table name?

Post by alessio »

Hello. I have this table:

Table 1
id_table1
descr
TABLE(varchar)

Table2
id
desc

Table3
id
desc

I wish I could do the search by selecting the id from $ table from a field in the table.

Es: select id from $TABLE

It's possible?


arbei
User
Posts: 9370

Post by arbei »

You can create a custom page that allows the user to select which table to search with, then redirect the user to different list page and search parameters.

e.g.
(if the user choose Cars table, redirect to the carslist.php as below URL)
Carslist.php?cmd=search&t=Cars&psearch=<search value>&psearchtype=


alessio
User
Posts: 27

Post by alessio »

I try to explain better.
I have two tables.
The first in connection with the second via master/detail. The id of the report in a table has multiple.
The id of the report in a table is a multiple and therefore I would like to detail view after inserting the reference in the master this detail appears in multiple lines.
I found the point in the scriptlist in which the filter is defined by:

function RenderListOptionsExt() {

and substituting THIS

$sSqlWrk = $sSqlWrk . " AND " . "id_docum_fiscale='" . ew_AdjustSql($this->univoco_fatture_in->CurrentValue, $this->DBID) . "'";

with

$sSqlWrk = $sSqlWrk . " AND " . "(FIND_IN_SET('" . ew_AdjustSql($this->univoco_fatture_in->CurrentValue, $this->DBID) . "', id_docum_fiscale))";

Everything works.

I would just like to know if you can replace it using php maker and save it in the file that automatically generates all not to change every time all the individual generated files.


Post Reply