You are here: Re: undefined index « PHP Programming Language « IT news, forums, messages
Re: undefined index

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация