|
|
 |
RE: FN-FORUM: sql question
date posted 10th August 2003 17:21
Pam
Is project_id a numeric and your testing against a string '18' ?
Alan S
On 10 August 2003 17:42, PAMELA WHITTAKER [EMAIL REMOVED] wrote:
>
> I am getting the following error
> You have an error in your SQL syntax near 'SELECT Employee_Id FROM
> greensplash_employees_per_project where Project_Id = '18' at line 1.
>
> I have set the sql string as follows
>
> $sqlstring = "SELECT Employee_Id, Employee_Forename, Employee_Surname FROM
> greensplash_employees_details where Employee_Status = 'Active' AND
> Employee_Id NOT IN (SELECT Employee_Id FROM
> greensplash_employees_per_project where Project_Id = '" .
> $row_Project_Id['Project_Id'] . "') Order By Employee_Forename";
>
> and echo prints out
>
> SELECT Employee_Id, Employee_Forename, Employee_Surname FROM
> greensplash_employees_details where Employee_Status = 'Active' AND
> Employee_Id NOT IN (SELECT Employee_Id FROM
> greensplash_employees_per_project where Project_Id = '18') Order By
> Employee_Forename
>
|
 |
|