Setup -> Using host gator , php, phpmyadmin, mysql:
PHP Code (in the file called ajaxTest.php):
<?php
$con=mysqli_connect("localhost","refinedc_dbadmin","password","refinedc_currency");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else
{
$result = mysqli_query($con,"SELECT * FROM ITEMS");
if (!$check1_res) {
printf("Error: %s
", mysqli_error($con));
exit();
}
echo '[';
while($row = mysqli_fetch_array($result))
{
echo '{';
echo '"ID":' . '"' . $row['ID'] . '",';
echo '"YEAR":' . '"' . $row['YEAR'] . '",';
echo '"QUANTITY":' . '"' . $row['QUANTITY'] . '",';
echo '"DENOMINATION":' . '"' . $row['DENOMINATION'] . '",';
echo '"TYPE":' . '"' . $row['TYPE'] . '",';
echo '"COUNTRY":' . '"' . $row['COUNTRY'] . '",';
echo '"COIN_NAME_OR_TITLE":' . '"' . $row['COIN_NAME_OR_TITLE'] . '",';
echo '"COLLECTIBLE_METAL_ONE":' . '"' . $row['COLLECTIBLE_METAL_ONE'] . '",';
echo '"COLLECTIBLE_METAL_TWO":' . '"' . $row['COLLECTIBLE_METAL_TWO'];
echo '},';
}
echo ']';
}
mysqli_close($con);
?>
phpmyadmin table:
mysql access levels for user and database:
user is added to the database:
And when i hit the page this is the issue i get:
UPDATE - Changed the SQL to read SELECT * FROM items... Now get this when I try to hit the page (hits the error code and runs exit() but prints out no error:
Why am i receiving a table does not exist error? I have already shortened the name of the database and rebuilt a new one, but it still says it doesn't exist!