Can anybody explain about how practically it is possible to implement a coding structure which encapsulates C++ opcodes in php code. I assumes the consumption of memory and cpu are more in the case when executing DML statements in SQL queries having INSERT,SELECT, UPDATE, DELETE ?
Is it possible to convert following PHP code block of INSERT into a c++ opcode ?
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO MyGuests (firstname, lastname, email)
VALUES ('John', 'Doe', '[email protected]')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
}
else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
Which all are other situations we can use these coding structure in point to reduce the resource usage in server ?