Hello,
I cannot figure out why the following code is giving me problems.
Here it works.
$AssignedOpportunities = array();
$SQLstring = "SELECT opportunityID FROM $TableName " .
" WHERE date_approved IS NOT NULL";
$QueryResult = @mysql_query($SQLstring, $DBConnect);
if (mysql_num_rows($QueryResult) > 0) {
while (($Row = mysql_fetch_row($QueryResult)) !== FALSE)
$AssignedOpportunities[] = $Row[0];
mysql_free_result($QueryResult);
}
Here it doesn't work
$TableName = "opportunities";
$Opportunities = array();
$SQLstring = "SELECT opportunityID, company, city, " .
" start_date, end_date, position, description " .
" FROM $TableName";
$QueryResult = @mysql_query($SQLstring, $DBConnect);
if (mysql_num_rows($QueryResult) > 0) { //LINE CONTAINING THE ERROR
while (($Row = mysql_fetch_assoc($QueryResult)) !== FALSE)
$Opportunities[] = $Row;
mysql_free_result($QueryResult);
}