1

Can anyone see why this SQL query works in Firefox but not in Chrome or Edge. In Chrome and Edge I get the following error:

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /home/mydomain/public_html/apps/2018/index.php on line 154

$query_ArrayLookup = "SELECT SeqID FROM ".$SequenceNo_default." WHERE SeqActive = 0";
$ArrayLookup = mysqli_query($link,$query_ArrayLookup);
$ArrayLookupCount = $ArrayLookup->num_rows;

while ($row_ArrayLookup = mysqli_fetch_assoc($ArrayLookup)){ // Line 154
    $ActiveSeq[] = $row_ArrayLookup['SeqID'];
} 
Dharman
  • 30,962
  • 25
  • 85
  • 135
DCJones
  • 3,121
  • 5
  • 31
  • 53
  • 1
    @Alaa Ali Hi, the $SequenceNo_default is a variable containing the tabel name – DCJones Apr 21 '18 at 17:31
  • Does this answer your question? [mysqli\_fetch\_assoc() expects parameter / Call to a member function bind\_param() errors. How to get the actual mysql error and fix it?](https://stackoverflow.com/questions/22662488/mysqli-fetch-assoc-expects-parameter-call-to-a-member-function-bind-param) – Dharman Dec 21 '20 at 23:36

1 Answers1

1

Try this :

$query_ArrayLookup = "SELECT SeqID FROM `{$SequenceNo_default}` WHERE SeqActive = 0";
$ArrayLookup = mysqli_query($link,$query_ArrayLookup);
$ArrayLookupCount = $ArrayLookup->num_rows;

while ($row_ArrayLookup = mysqli_fetch_assoc($ArrayLookup)){ 
    $ActiveSeq[] = $row_ArrayLookup['SeqID'];
} 

It's working fine on edge and google chrome, IE.

Alan
  • 386
  • 1
  • 3
  • 17