Hi,
I keep getting this error when working Chapter 4 example. Any help would be appreciated.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
PHP Code:
<?php
//take in the id of a director and return his/her full name
function get_director($director_id) {
global $db;
$query = 'SELECT
people_fullname
FROM
people
WHERE
people_id = ' . $director_id;
$results = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($results);
extract($row);
return $people_fullname;
}