PHP code example of noahheck / e_mysqli

1. Go to this page and download the library: Download noahheck/e_mysqli library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

noahheck / e_mysqli example snippets


$query 		= "INSERT INTO registration SET name = ?, email = ?";
$stmt 		= $mysqli->prepare($query);

$name 		= $_POST['name'];
$email 		= $_POST['email'];

$stmt->bind_param("ss", $name, $email);

$stmt->execute();

echo $stmt->fullQuery;


$query 		= "INSERT INTO registration SET name = ?, email = ?";
$stmt 		= $mysqli->prepare($query);

$name 		= $_POST['name'];
$email 		= $_POST['email'];

$stmt->bind_param("ss", $name, $email);

$fullQuery 	= $stmt->interpolateQuery();// INSERT INTO registration SET name = 'John Doe', email = '[email protected]'

$name 		= $_POST['name'];
$email 		= $_POST['email'];

$stmt->bind_param("s", $name);
$stmt->bind_param("s", $email);

$name 		= "John Doe";
$email 		= "[email protected]";

$stmt->bindParam("s", $name);
$stmt->bindParam("s", $email);

$stmt->execute(); // INSERT INTO registration SET name = 'John Doe', email = '[email protected]'

$name 		= "Sue O'Reilly";
$email 		= "[email protected]";

$stmt->execute(); // INSERT INTO registration SET name = 'Sue O\'Reilly', email = '[email protected]'



li 	= new EMysqli\EMysqli($dbHost, $dbUser, $dbPassword, $dbName);