Parse error: syntax error, unexpected ','

0

line error:

$config = new Config;

$strqury = "SELECT * FROM ", $config->ContasTable , " WHERE Login = ? AND ", $config->PasswdColumn ," = ? AND ", $config->CheckemailColum ," = ?";
echo $strqury;

Class config:

Class Config{

    public $NameGC = 'Grand Chase SkelletonX'; #Nome do Servidor

    public $ContasTable = 'accounts'; #Nome da tabelas das contas
    public $LoginsColumn = 'Login'; #Nome da Coluna dos Login
    public $PasswdColumn = 'Passwd'; #Nome da Coluna do Passwd
    public $CheckemailColum = 'CheckEmail'; #Nome da coluna do checkemail
}

my error: Parse error: syntax error, unexpected ','

    
asked by anonymous 16.03.2018 / 15:52

1 answer

5

Use dot . to concatenate in PHP and not the comma , :

$strqury = "SELECT * FROM ". $config->ContasTable ." WHERE Login = ? AND ". $config->PasswdColumn ." = ? AND ". $config->CheckemailColum ." = ?";
    
16.03.2018 / 15:56