Try out this example by putting this code into add_employee.php, this will take input using HTML Form and then it will create records into database. If this function returns false then use function addslashes() to add slashes before quotes. While doing data insert its best practice to use function get_magic_quotes_gpc() to check if current configuration for magic quote is set or not. In real application, all the values will be taken using HTML form and then those values will be captured using PHP script and finally they will be inserted into MySQL tables. Try out following example to insert record into employee table. So if you truly need to squeeze every last bit of performance, that is one thing you might consider. Still, the native MySQL extension is even faster than both of these. Below a simple example to insert a record into employee table. While both PDO and MySQLi are quite fast, MySQLi performs insignificantly faster in benchmarks - 2.5 for non-prepared statements, and 6.5 for prepared ones. Data can be entered into MySQL tables by executing SQL INSERT statement through PHP function mysql_query.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |