Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
When trying to use
$SomeTable = "SomeTable"; INSERT INTO "' . $SomeTable . '" SET ...
instead of
INSERT INTO SomeTable SET ...
I am unsuccessful. Why am I unable to use a php variable to call a database name?
你需要使用这样的东西:
$SomeTable = "SomeTable"; $query = 'INSERT INTO `' . $SomeTable . '` SET ... ';
它使用 ` 字符而不是引号