jerrrrry
asked on
please help me to convert old style php to something great to mysqli or PDO
$link = new mysqli("localhost","root", "","portfo lio");
if ($link->connect_errno) die("Error " . $link->connect_errno );
$link->query("SET NAMES 'utf8'");
if ($link->connect_errno) die("Error " . $link->connect_errno );
$link->query("SET NAMES 'utf8'");
$id= $_GET['id'];
$query = "SELECT `id`, `$tl` as 'info' FROM image WHERE id ='$id'";
$result = mysql_query($query) or die('Erreur de la requête infos : ' . $query);
while ($row = mysql_fetch_assoc($result)) {
echo $row["info"];
}
ASKER
ok i changed $conn to $link
then i have this warning Warning: mysql_fetch_assoc() expects parameter 1 to be resource, object given in C:\wamp\www\test-ajax2.php on line 18
?
thanks
then i have this warning Warning: mysql_fetch_assoc() expects parameter 1 to be resource, object given in C:\wamp\www\test-ajax2.php
?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
my apologize i made a mistake and let a part of the old script!
ASKER
thanks
Open in new window
Cheers