I have several SQL queries that work via command line, but would like to convert them to QueryBuilder due to issues with CDbConnection::createCommand recognizing valid variables.
The SQL is
Any idea how I can adapt this SQL to QueryBuilder?
The SQL is
INSERT INTO bgt.question_mappings(parentId, childId) SELECT parentId, NID FROM bgt.question_mappings WHERE bgt.question_mappings.childId = PID UNION SELECT ALL NID, NID
Any idea how I can adapt this SQL to QueryBuilder?