Join variable more word php mysql query

0

Hello everyone I have a question, how to join a word + a variabla in a mysql query php.

$Sql_Query = "select * from usuario where user_email = '$email' and user_password = '$password' ";

I want to add to the word user a variable that is left user '$ variable'

So that you can form a single word, for example,  user5566 (user word + variable)

and can make the query

select * from usuario5566 where ............

Thanks and regards

    
asked by Yoel Mendoza 04.10.2017 в 05:49
source

1 answer

0
<?php
$tabla = 5566;
$query = "select * from usuario$tabla where user_email = '$email' and user_password = '$password' ";

You only have to add the variable where you need it, as long as the string is delimited by double quotes, as is your case.

    
answered by 04.10.2017 / 06:49
source