1,319   CodeIgniter MySQL PHP

CI 采用 Query Builder 作为 ORM , 提供了SQL生成和过滤函数,以及转义函数,保证SQL入库前的安全。

SQL生成和过滤函数

$this->db->query("Your sql");

SQL转义函数

$this->db->escape("Your data");

官网资料:https://codeigniter.com/user_guide/database/queries.html?highlight=escape




Leave a Reply

Your email address will not be published. Required fields are marked *