Differences between using ? and :param in prepare statement

前端 未结 3 1923
北荒
北荒 2021-02-06 03:05

Let\'s say I want to select records where Id = 30. Prepared statements allow two ways of binding parameters:

question marks

3条回答
  •  你的背包
    2021-02-06 03:59

    These are different placeholders

       ? -- > question mark placeholders
       :name --> named Placeholders
    

    The difference between named and question mark placeholders is that with question mark placeholders you'll have to take care about the order in which they will be bound to the query.

提交回复
热议问题