If you are putting this in a web page, I assume you are putting quotes around 
the select statement.  If so, are you escaping the quotes around "Colour and 
Imaging Institute" by putting \"Colour and Imaging Institute\" instead (or 
using single quotes instead of double quotes)?  If not, that may be part of 
the problem.  You may also need to put quotes around True in the second part 
of the WHERE clause.
Another thing to try is to take the 2 sets of extra paratheses off around 
ExamPapers.School and ExamPapers.[Add to Webpage] in the WHERE clause, I 
don't believe they are necessary.  

So this should be:

"SELECT ExamPapers.EPaperID, ExamPapers.EPapersText, ExamPapers.[Title of 
Paper], ExamPapers.Course, ExamPapers.School, ExamPapers.Year, ExamPapers.
[Jan/Summer], ExamPapers.[Module Code], ExamPapers.Stage, ExamPapers.[Storage 
Location], ExamPapers.[Add to Webpage] FROM ExamPapers WHERE 
(ExamPapers.School=\"Colour and Imaging Institute\") AND (ExamPapers.[Add to 
Webpage]=True)";

HTH

Maureen


Daniel J Owen-Mcgee <[EMAIL PROTECTED]> said:

> Hi,
> 
> I'm gleaning microsoft SQL from queries within a MS Access database, for 
insertion into my PHP pages. This has been working fine but the example below 
just refuses to work,
> 
> SELECT ExamPapers.EPaperID, ExamPapers.EPapersText, ExamPapers.[Title of 
Paper], ExamPapers.Course, ExamPapers.School, ExamPapers.Year, ExamPapers.
[Jan/Summer], ExamPapers.[Module Code], ExamPapers.Stage, ExamPapers.[Storage 
Location], ExamPapers.[Add to Webpage]
> FROM ExamPapers
> WHERE (((ExamPapers.School)="Colour and Imaging Institute") AND 
((ExamPapers.[Add to Webpage])=True));
> 
> I want to pull records from 1 table (ExamPapers). 
> The WHERE line is causing problems i.e if I remove it, my php pages 
actually show. Can anyone see what I'm doing wrong?
> 
> Thanks,
> 
> Daniel Owen-McGee
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to