Using Magento Methods to write Insert Queries with care for SQL Injection
I am using the Magento's functionality to insert & update queries. My requirement is that I want to take care of SQL Injection, when doing these types of queries. But I'm unable to find how Magento does this. I'm providing one start sample. Please provide me with one complete example. <?php $write = Mage::getSingleton("core/resource")->getConnection("core_write"); $sql = "INSERT INTO Mage_Example (Name, Email, Company, Description, Status, Date) VALUES ('$name', '$email', '$company', '$desc', '0', NOW())"; ?> Now I want to change the above query to prevent the possible SQL Injection. I don't