I have a table called concept-relation
and I want to insert into it.
for ($i = 0; $i < count($sources); $i++) {
$sourceID = $this->get
$query2 = "INSERT INTO `concept-relation` (relationID, firstConceptID, secondConceptID)
VALUES (:rID, :sID, :dID)";
Try:
"INSERT INTO `concept-relation` (relationID, firstConceptID, secondConceptID) VALUES (:rID, :sID, :dID)";
try this
$query2 = "INSERT INTO concept-relation (relationID, firstConceptID, secondConceptID)
VALUES (:rID, :sID, :dID)";
Enclosing identifiers with backtick makes reserved words/characters as valid identifiers in mysql.
So you should use
`concept-relation`
The backtick (`)is the key at the top-left of this keyboard.