MySQL Forums
Forum List  »  PHP

Re: Deprecated: mysql_connect(): The mysql extension is deprecated
Posted by: Webguru Infosystems
Date: December 17, 2018 01:55AM

Is this error or warning? I think this is waring. Please use following options:

1. Try to write connection sql as:

<?php
$connection = mysqli_connect('localhost', 'username', 'password', 'database');

mysqli_query($connection, 'CREATE TEMPORARY TABLE `table`');

2. You can simply turn off the waring and notice as:

<?php
error_reporting(E_ALL ^ E_DEPRECATED);

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.