[thelist] PHP self referring page probs

John Corry john at neoncowboy.com
Sun Aug 17 17:59:48 CDT 2003

> If there is only 1 results returned (so, if the search has 
> returned one 
> result or the page has been self-referred), show the term and all 
> relavent definitions (as a term can have more than one of these).

You should check the number of results returned from the query to make
this decision:

If (mysql_num_rows($result) > 1)
	// multiple rows returned logic
elseif (mysql_num_rows($result) == 1)
	// one row returned logic
elseif (mysql_num_rows($result) < 1)
	// no rows returned logic

John Corry

More information about the thelist mailing list