Re: Deprecated features in PHP 5.5.x
| From: | Gener Badenas | Date: | Tue, 08 Dec 2015 08:01:48 +0000 |
| Subject: | Re: Deprecated features in PHP 5.5.x | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325277@lists.php.net to get a copy of this message | ||
On Mon, Dec 7, 2015 at 9:07 PM, Release Edl <release_editorial@terra.com.br>
wrote:
> Hi people,
>
> How can I use the mysqli function to substitute of mysql ?
>
> I need to change an old script that uses mysql.
>
> The script::
>
> <?php
>
> include(conexao.php");
> $id = $_GET['id'];
> $conexao = mysql_connect('host', 'user', 'pass');
>
> if(!$conexao)
>
> die("Error: " . mysql_error());
>
> mysql_select_db($db) or die("Error: " . mysql_error());
>
> $SQL = "SELECT * FROM portfolio WHERE id='$id' ORDER BY id DESC LIMIT 1";
>
> $query = mysql_query($SQL);
>
> while($x = mysql_fetch_array($query)) {
>
> ?>
>
>
I highly recommend PDO instead of mysql_functions
> Thanks in advance for any help.
>
> Paulo
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Java <http://javadevnotes.com/java-sort-array-examples>
and Groovy
<http://grails.asia/groovy-list-tutorial-and-examples>