0
I have a project in mind, in which I would like to create database with the name of variables, and in case it would be done a check to know if the BD has been created, would be something like this:
if ($pdo=new PDO ("mysql:host=localhost;dbname=$var","root",""))=sucess
{
"não cria BD"
}else{
CREATE DATABASE $var
}
That’s possible?
OBS: I don’t really need to do this but it would be much more organized if possible.
Every time you do something you don’t need you get less organized.
– Maniero
In the case of the code yes, but the BD would be even more so if this is not possible.
– Wel
I don’t see how this makes sense, but you can try to show how.
– Maniero