I have this table and I would like to select some of the data into a form, but I my query is not working. can anyone figure out what is wrong with my query?
Above the table, I only wanted to show all voucher in voucher_3 and user_id = 1 that has been verified as '1'.
and there is an error when I echo out:
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in D:\Application\Apps\xampp\htdocs\newtmk\account.php on line 302
here is my coding:
<tbody>
<?php
$get_member = "SELECT *
FROM transaction_record_tpg
WHERE user_id = '1'
AND voucher = '1'
AND (voucher_3 = 'RM 3 Voucher'
OR voucher_3 = 'RM 5 Voucher'
OR voucher_3 = 'RM 10 Voucher')
";
$run_customer = mysqli_query($conn,$get_member);
$i = 0;
while($row_orders = mysqli_fetch_array($run_customer)){
$id = $row_orders['trans_id'];
$description = $row_orders['v_script'];
$date = $row_orders['collected_datetime'];
$outlet = $row_orders['voucher_3'];
$voucher = $row_orders['voucher_code'];
$i++;
?>
<tr><!-- tr Starts -->
<td><?php echo $i; ?></td>
<td><?php echo $outlet; ?></td>
<td><?php echo $voucher; ?></td>
<td><?php echo $description; ?></td>
<td><?php echo $date; ?></td>
</tr><!-- tr Ends -->
<?php } ?>
</tbody>