Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dot = '.'
- cur.execute("SELECT results_stbs.tr_test_case_id, "
- "CONCAT(test_functionality.test_functionality_code,'{}' test_cases.test_case_no) AS 'Script_ID'"
- "FROM results_stbs "
- "JOIN tr_test_cases "
- "ON tr_test_cases.tr_test_case_id=results_stbs.tr_test_case_id "
- "JOIN test_cases "
- "ON test_cases.test_case_id=tr_test_cases.test_case_id "
- "JOIN test_case_functionalities "
- "ON test_cases.test_case_id = test_case_functionalities.test_case_id "
- "JOIN test_functionality "
- "ON test_functionality.test_functionality_id = test_case_functionalities.test_functionality_id "
- "WHERE tr_test_cases.tr_test_case_id = '{}' "
- ) .format(dot, str(tr_test_case_id))
- script_id = cur.fetchall()[0][0]
- print "The script id is: ", script_id
- Traceback (most recent call last):
- File "index.py", line 185, in <module>
- main()
- File "index.py", line 90, in main
- cur.execute("SELECT results_stbs.tr_test_case_id, "
- File "C:Python27Libsite-packagesMySQLdbcursors.py", line 205, in execute
- self.errorhandler(self, exc, value)
- File "C:Python27Libsite-packagesMySQLdbconnections.py", line 36, in defau
- lterrorhandler
- raise errorclass, errorvalue
- _mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax
- ; check the manual that corresponds to your MySQL server version for the right s
- yntax to use near '.test_case_no) AS 'Script_ID'FROM results_stbs JOIN tr_test_c
- ases ON tr_test_cas' at line 1")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement