-2

Cant figure out why my query isn't returning the 'make'. I've checked the SQL many times.

$DBConnect = @mysqli_connect("host.com", "name","pass", "database")
    Or die ("<p>Unable to connect to the database server.</p>". "<p>Error code ". mysqli_connect_errno().": ". mysqli_connect_error()). "</p>"; 

$query = "SELECT make FROM inventory";
$makeresult= @mysql_query($DBConnect, $query);

while($row = mysql_fetch_array($makeresult)) {
    $options .="<option>" . $row['make'] . "</option>";
}
Nate
  • 397
  • 5
  • 16

1 Answers1

0

You're using a mysqli connection but trying the deprecated mysql functions.

try mysqli_fetch_array() instead

Shogunivar
  • 1,237
  • 11
  • 18