I am replicating rows and trying to use the INSERT and SELECT statements to do this, but I get an error. Anyone who could help solve this problem, I would greatly appreciate it.
Query:
$sql->Query("INSERT INTO a111 (title, description, bdate, edate, active) SELECT (title, description, bdate, edate, active) FROM a101 WHERE ID=1");
Error:
Unable to perform query: INSERT INTO a111 (title, description, bdate, edate, active) SELECT (title, description, bdate, edate, active ) FROM a101 WHERE ID=1 :You have an error in your SQL syntax near ' description, bdate, edate, active ) FROM a101 WHERE ID=1' at line 1
Query:
$sql->Query("INSERT INTO a111 (title, description, bdate, edate, active) SELECT (title, description, bdate, edate, active) FROM a101 WHERE ID=1");
Error:
Unable to perform query: INSERT INTO a111 (title, description, bdate, edate, active) SELECT (title, description, bdate, edate, active ) FROM a101 WHERE ID=1 :You have an error in your SQL syntax near ' description, bdate, edate, active ) FROM a101 WHERE ID=1' at line 1