I'm working on a tutorial.
This is the code provided...
// get list of departments with open jobs
$query = "SELECT DISTINCT id, department from department, listing WHERE department.id = listing.fk_department"; $result = mysql_db_query($database, $query, $connection) or die ("Error inquery: $query. " . mysql_error());
// iterate through resultset
while(list($id, $department) = mysql_fetch_row($result)){
I get an error about mysql_db_query being extinct or something so i change it to
//get list of departments with open jobs
$query = "SELECT distinct id, department from department, listing
WHERE department.id = listings.fk_department";
$result = mysql_query($query);
// iterate through resultset
while(list($id, $department) = mysql_fetch_row($result))
{
The error I get now is mysql_fetch_row(); supplied argument is not a valid MySQl result resource
Any suggestions?