Jump to content

[SOLVED] Problem with mysql_fetch_array


alexguz79

Recommended Posts

i'm having this on a connection to my sql db

 


Warning: extract() [function.extract]: First argument should be an array in /home/tontrosk/public_html/pia/display.php on line 10

 

here is my code

 


<?php 

include("db.php");

mysql_connect ($host, $user, $pass);
mysql_select_db ($database);
$result = mysql_query ("SELECT * FROM 'departamentos' ORDER BY id DESC LIMIT 2");

$row = @mysql_fetch_array($result);
extract($row);
echo "$nombre : $precio";

?>

Link to comment
https://forums.phpfreaks.com/topic/150945-solved-problem-with-mysql_fetch_array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.