note 118599 deleted from function.mysql-create-db by cmb

From: Date: Sat, 09 Jan 2016 01:31:00 +0000
Subject: note 118599 deleted from function.mysql-create-db by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-204627@lists.php.net to get a copy of this message
Note Submitter: gs93907 at gmail dot com ---- Hello, Please change line of if-condition as :- if(mysqli_query($link, $sql)) or anyone just paste it and run your IDE... <?php $link = mysqli_connect("localhost", "root", ""); if(!$link) { die('Not connected with Mysql..'.mysqli_error()); } $sql = 'CREATE DATABASE through_php'; if(mysqli_query($link, $sql)) { echo "Successfully created database through_php"; } else { echo 'Database not created "through_php"'. mysqli_error($link); } // At the end just Close the link. mysqli_close($link); ?>

« previous php.notes (#204627) next »