Trying to query some information onto a DB but can not seem to find the error. I've been having some trouble with PHPs MySQL functions but I would say about 90% of the fixes have been simple syntax errors.
$TableName = "opportunities";
$Opportunities = array();
$SQLString = "SELECT opportunity_ID, company, city, " .
"start_date, end_date, position, description" . " FROM $TableName;";
$QueryResult = mysql_query($SQLString);
if (mysql_num_rows($QueryResult) > 0)
{
while (($Row = mysql_fetch_assoc($QueryResult)) !== FALSE)
{
$Opportunities[] = $Row;
mysql_free_result($QueryResult);
}
}