What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-10 12:19:02
php sql insert into if not exists
$mysqli = new mysqli(SERVER, DBUSER, DBPASS, DATABASE); $result = $mysqli->query("SELECT id FROM mytable WHERE city = 'c7'"); if($result->num_rows == 0) { // row not found, do stuff... } else { // do other stuff... } $mysqli->c... Add solution -
SQL 2021-09-10 11:55:03
how to take backup of mysql database using python
#!/usr/bin/python ########################################################### # # This python script is used for mysql database backup # using mysqldump and tar utility. # # Written by : Rahul Kumar # Website: http://tecadmin.net # Created date: De... Add solution -
SQL 2021-09-10 07:02:03
how to count number of columns in a table in oracle
-- Oracle SELECT count(*) FROM ALL_TAB_COLUMNS WHERE OWNER='owner_name' AND TABLE_NAME = 'table_name'; -- SQL Server / MySQL SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'schema_name' AND TABLE_NAME = 'table_name'; 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 -
SQL 2021-09-09 05:05:01
sql conn
<?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn= mysqli_connect($servername,$username,$password,$dbname); // Check connection if (!$c... Add solution
Best helpers
Ranking is empty