RE: [PHP] Query Question

From: Date: Thu, 12 Aug 2004 02:38:09 +0000
Subject: RE: [PHP] Query Question
Groups: php.general 
Request: Send a blank email to php-general+get-193526@lists.php.net to get a copy of this message
I found my problem. $eventdetail_query = mysql_query("select DISTINCT titles, informations, file_name from eventdetail, event where eventdetail.event = ".$id); -----Original Message----- From: Karl-Heinz Schulz [mailto:karlheinz@khschulz.com] Sent: Wednesday, August 11, 2004 10:13 PM To: 'Jason Davidson' Subject: RE: [PHP] Query Question Oops - it shows all the "eventdetails" for all the "events" -----Original Message----- From: Jason Davidson [mailto:jdavidson@zworg.com] Sent: Wednesday, August 11, 2004 10:10 PM To: Karl-Heinz Schulz; php-general@lists.php.net Subject: Re: [PHP] Query Question whats the error, are there any matching fields for the columns eventetail.event and event.id? Jason "Karl-Heinz Schulz" <karlheinz@khschulz.com> wrote: > > Why does this query not work? > It should only show the eventdetails for the shown event. > > ---------------------------------------------------------------------------- > ----------------------------- > > <?php > $event = mysql_query("select id, information from event where id=".$id); > ?> > <?php > > $eventdetail_query = mysql_query("select titles, informations, file_name > from eventdetail, event where eventdetail.event = event.id"); > > while($eventdetail = mysql_fetch_row($eventdetail_query)){ > > > print("<span style=\"font-family: Arial, Helvetica, > sans-serif;font-size:12px;\"><a target=_blank > href=\"../PDF/$eventdetail[2]\" > class=\"decisions_links\">".strip_tags(html_decode($eventdetail[0]))."</a></ > span>"); > print(" <span style=\"font-family: Arial, Helvetica, > > sans-serif;font-size:12px;\">".html_decode($eventdetail[1])."</span>"); > > } > > ?> > > ---------------------------------------------------------------------------- > ----------------------------- > > > TIA > > Karl-Heinz > > > > > Tracking #: B3BFF38AEF0C854C96E9B501DD35C6C783308CA5 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#193526) next »