How to use PDO to fetch results array in PHP?

前端 未结 3 1020
心在旅途
心在旅途 2020-11-22 10:09

I\'m just editing my search script after reading up on SQL injection attacks. I\'m trying to get the same functionality out of my script using PDO instead of a regular mysql

3条回答
  •  甜味超标
    2020-11-22 10:29

    $st = $data->prepare("SELECT * FROM exampleWHERE example LIKE :search LIMIT 10"); 
    

提交回复
热议问题