|
Posted by Bent Stigsen on 07/19/06 00:11
Chris wrote:
> I have a simple search feature that searches 3 fields in 3 separate tables
> in a MySQL db, and I'm getting an 'undefined index' error, but only in the
> first section (first table)of the results. The undefined index is tied to
> the docs.projID in the "if ($row_search['docs.projID'] == 1)".
[snip]
> $query_search = "SELECT Distinct docURL, docTitle, docDesc, docs.projID,
[snip]
> <a href="<?php if ($row_search['docs.projID'] == 1) {
[snip]
The name supplied by mysql would be that of the column, which would be
"projID".
Alternatively, you can give an alternate name in the select-statement:
SELECT ... docs.projID `docs.projID`,
--
/Bent
Navigation:
[Reply to this message]
|