To solve the problem, think about the structure of SQL. Those
special keywords—CREATE, INSERT, and their friends—all are the
first word in the query. So you need to get the position of the
match, and see if that position is position 0. You can do that by
adding to your if conditions and using the or operator in PHP