I am attempting to get data from a mysql database. This is the code that I have so far:
include 'sqlConnection.php';
$strSQL = "SELECT * FROM PrimeSelectScan";
$rs = $sqlTableConnection->query($strSQL);
if ($sqlTableConnection->query($rs) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $sqlTableConnection->error;
}
while($row = mysqli_fetch_array($rs))
{
echo "\t<tr><td>".$row['id']."</td><td>".$row['cost']."</td><td>".$row['roi']."</td></tr>\n";
}
$sqlTableConnection->close();
The sqlConnection.php
file is just the connection to the database. I am not exactly sure if I am correct or not. If someone could help me out and lead me in the right direction, I would really appreciate it. This is the first time I have attempted to get information like this. Thanks in advance.