note 118599 added to function.mysql-create-db

From: Date: Wed, 06 Jan 2016 06:09:41 +0000
Subject: note 118599 added to function.mysql-create-db
Groups: php.notes 
Request: Send a blank email to php-notes+get-204602@lists.php.net to get a copy of this message
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); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 125.19.134.86 ---- Manual Page -- http://php.net/manual/en/function.mysql-create-db.php Edit -- https://master.php.net/note/edit/118599 Del: integrated -- https://master.php.net/note/delete/118599/integrated Del: useless -- https://master.php.net/note/delete/118599/useless Del: bad code -- https://master.php.net/note/delete/118599/bad+code Del: spam -- https://master.php.net/note/delete/118599/spam Del: non-english -- https://master.php.net/note/delete/118599/non-english Del: in docs -- https://master.php.net/note/delete/118599/in+docs Del: other reasons-- https://master.php.net/note/delete/118599 Reject -- https://master.php.net/note/reject/118599 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204602) next »