Code-Samples/php/Php-check.php Using MySQLi for Check Implementation on columns connect_error) { die("Connection not established: " . $connection->connect_error); } $query = "Use Hospital"; $connection->query($query); // Implementing Check on Columns $query = "CREATE TABLE Patient ( patient_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, patient_fname VARCHAR(50) NOT NULL, patient_lname VARCHAR(50) NOT NULL, patient_age INT(10), dep_id INT(10), CHECK (patient_age > 0) );"; if ($connection->query($query) === TRUE) { echo "Successful table creation"; } else { echo "Unable to create table" . $connection->error; } $connection->close(); ?>