What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-23 02:25:04
php escape string
The real_escape_string() / mysqli_real_escape_string() function escapes special characters in a string for use in an SQL query, taking into account the current character set of the connection. Object oriented style: $mysqli -> real_escape_string(escap... Add solution -
PHP 2021-09-17 06:12:03
wordpress wpdb
<?php // 1st Method - Declaring $wpdb as global and using it to execute an SQL query statement that returns a PHP object global $wpdb; $results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT ); Add solution -
Other 2021-09-09 18:36:03
iterate through names of columns in result set pdo
//Connect to MySQL using PDO. $pdo = new PDO("mysql:host=$host;dbname=$database", $user, $password); //Create our SQL query. $sql = "SELECT * FROM my_table_name LIMIT 20"; //Prepare our SQL query. $statement = $pdo->prepare($sql);... Add solution -
PHP 2021-09-09 11:57:01
ajax php crud example
<?php // Check if the form is submitted $personName = $_POST['personName']; $address = $_POST['address']; $mobile = $_POST['mobile']; $email = $_POST['email']; $message = $_POST['message']; $tdate=new DateTime(); // form a sql query $sql = "INSERT... Add solution -
Other 2021-09-06 12:32:04
Explain the Stored Procedure
Stored Procedure : A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again. So if you have an SQL query that you write over and over again, save it as a stored procedure, and then just call it to execu... Add solution -
C# 2021-09-06 04:37:02
dapper delete where in list
The syntax for List<> support in dapper is slightly different than in an actual T-SQL query. See: https://github.com/StackExchange/Dapper DELETE FROM [Employee] WHERE EmployeeId in @empIds It does not require braces around the IN clause's paramete... Add solution -
PHP 2021-09-01 12:47:01
codeigniter how to know update failed
$this->db->trans_start(); $this->db->query('AN SQL QUERY...'); $this->db->update('table',$array); $this->db->trans_complete(); if ($this->db->trans_status() === FALSE) { // generate an error... or use the log_message() f... Add solution