I have this simple mysql query:
INSERT INTO table (col1, col2) VALUES ('1', '2')
col1
and col2
are foreign keys for another table so any value for col1
and col2
must be present in the other table or otherwise the row won't be inserted.
Is there still any risk of SQL injection in this case? If i receive these col values from PHP POST, do I still need to bind them before insertion into the database or they are already secure as the cols are foreign keys?