-
September 16th, 2022, 10:03 AM
#1
MarriaDB PHP mysqli_fetch_array($result))
Hi all ,
what i am wanting to accomplish is to remove the comment on the lines and find a replacement for the $res = mysqli_fetch_array($result)) this statement does not work in MariaDB, anyone have any Idea's on what to use here
thank you so much
Code:
<?php
// mysql_fetch_array
// while($res = mysqli_fetch_array($result)) {
// $stat=$res['trolleyid'];
// if($stat=="000000")
// {
// $color="color:red";
// $text="BAD READ";
// }
// else
// {
// $color="color:green";
// $text="GOOD READ";
// }
while($row = $result->fetch(PDO::FETCH_ASSOC)) {
echo "<tr>";
echo "<td>".$row['id']."</td>";
echo "<td>".$row['datecol']."</td>";
echo "<td>".$row['timecol']."</td>";
echo "<td>".$row['trolleyid']."</td>";
echo "<td style='$color'>".$text."</td>";
}
?>
</table>
</body>
</html>
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|