Re: Microsoft Access & PHP
| From: | Richard Lynch | Date: | Thu, 04 Jul 2002 23:01:27 +0000 |
| Subject: | Re: Microsoft Access & PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105539@lists.php.net to get a copy of this message | ||
>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));
In the future, don't put spaces in column names. It really makes life hard
on you, and it's just not worth it...
>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?
I would suggest getting rid of the bogus parentheses:
where ExamPapers.School='Colour and Imaging Institute' and ExamPapers.[Add
to Webpage]=True
I'd also try renaming the multi-word columns, or using "ExamPapers.Add to
Webpage"
The whole [] thing around multi-word columns is almost for sure a
Microsoft-ism and is not gonna work in any other database. Okay, maybe
Sybase, if SQL Server supports it that way.
You should also be aware that MS Access just is not up to snuff for a large,
long-term project involving even moderate web use. You'll be in a lot of
pain if you stick with Access for too long. Sorry.
--
Like Music? http://l-i-e.com/artists.htm