Jump to content
Larry Ullman's Book Forums

Safely Retrieving A Record: Find('Id=:Id', Array(':Id'=>$Id))


KeepLearning
 Share

Recommended Posts

The colon creates a named placeholder. The array provides a value for the named placeholder(s). This approach makes queries safer as it results in a prepared statement, which prevents SQL injection attacks.

Link to comment
Share on other sites

 Share

×
×
  • Create New...