note 118600 added to function.mysql-create-db

From: Date: Wed, 06 Jan 2016 06:10:12 +0000
Subject: note 118600 added to function.mysql-create-db
Groups: php.notes 
Request: Send a blank email to php-notes+get-204603@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/118600 Del: integrated -- https://master.php.net/note/delete/118600/integrated Del: useless -- https://master.php.net/note/delete/118600/useless Del: bad code -- https://master.php.net/note/delete/118600/bad+code Del: spam -- https://master.php.net/note/delete/118600/spam Del: non-english -- https://master.php.net/note/delete/118600/non-english Del: in docs -- https://master.php.net/note/delete/118600/in+docs Del: other reasons-- https://master.php.net/note/delete/118600 Reject -- https://master.php.net/note/reject/118600 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204603) next »