Question: I have a table consists of table name, for example:

TableA

```
    UID  TableName  CifKey  ...
    1     xxx       12345
    1     yyy       12345
    1     xxx       12345
    2     zzz       45678

```

How can I select data from tables that having name same as the `TableName` column in Table A?

For example:

```
SELECT A.a, B.b 
FROM TableA A 
JOIN ' + @TableName + ' B ON A.Cifkey = B.Cifkey 
WHERE A.uid = @uid AND A.cifkey = @cifkey

```

Thank you!

Answer: 
***While working on localhost can not sign in or create Account - ubuntu OS*** 

> 
> Invalid Form Key. Please refresh the page.
> 
> 
> 

**invalid key error solve**

> 
> change this value in your php.ini file
> 
> 
> 

max\_input\_time : 3600
max\_input\_vars : 200000
memory\_limit : 2G

> 
> *then go to your MySQL database* 
> 
> 
> 

find core\_config\_data table

**change base URL localhost to 127.0.0.1**

than **search** path Like %...% domain then Go

**change** value *localhost* to *127.0.0.1* in front of *web/cookie/cookie\_domain* ( path )

> 
> Go to your magento root directory
>  then app -> /etc/ -> env.php open this file
>  change value localhost to 127.0.0.1 ( 2 places in file )
> 
> 
> 

*go to browser press `ctrl`+`shift`+`delete` then check cache || cookie click on **clear data*** 

> 
> then run all command with sudo on magento root directory
> 
> 
> 

```
php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy -f

php bin/magento indexer:reindex

php bin/magento cache:clean

php bin/magento cache:flush

```
In my case, I was having this issue in my localhost after using production DB. I tried setting up max\_input\_vars but that didn't work. But clearing cookie settings such cookie path and domain works. So, go to stores -> configuration then General —> Web —> Default Cookie settings and remove values for cookie path and domain. Then clear magento2 configuration cache using bin/magento cache:clean config. This should resolve it.