This topic is locked

Table Name

12/30/2017 4:50:37 PM
PHPRunner General questions
G
gbhmayer1 author

How to get a Table Name (not caption) in the LIST VIEW (for example)?

emendoza 1/15/2018

I recommend sending screenshots to better understand what you need to do.

G
gbhmayer1 author 1/15/2018

I want to implement a custom header according to the user's GroupID. Here is an example of the code:

The code would be more generic if you could identify the name of the table (or view) being presented.
$tableName = "VIEW_Msg_out"; // here the code could take the name of the table

$thisCaption = Labels::getTableCaption($tableName);
if($_SESSION["grupoID"] ==7){

INCLUDE "headerCatalog.htm";

echo ("<h3 align='center'>".$_SESSION["entName"]."</h3>");

echo ("<h4 align='center'>".$thisCaption."</h4>");

}

else{

INCLUDE "headerProcess.htm";

echo ("<h3 align='center'>".$_SESSION["entName"]."</h3>");

echo ("<h4 align='center'>".$thisCaption."</h4>");

}

T
taumic 1/16/2018

Hello,
I would try "$strTableName".



global $strTableName;
echo "Table-Name: " . $strTableName ;


Best regards
Taumic

admin 1/16/2018

Analyze the current page URL. Based on that URL you can figure out table/view name.
Check this for instance:

https://stackoverflow.com/a/13157983/10969