Hi,
You can use join or make this query as follows
$query="select *(or coulmn name) from event,
eventdetails where event.id = eventdetails.id";
zareef ahmed
--- Karl-Heinz Schulz <[EMAIL PROTECTED]> wrote:
> I have two tables with relevant information's;
>
> Table1 -> event
> Table 2 -> eventdetails
>
>
> I'm trying to list all events in table one plus to
> show for each event
> whatever documents are available (file_name,
> information)
>
> My code to list all events from the "event" table
> is:
>
> <code>
>
> <?php
> require("../admin/functions.php");
> include("../admin/header.inc.php");
>
> ?>
> <?
> $event_query = mysql_query("select id, inserted,
> information, eventname,
> date, title from event order by inserted desc LIMIT
> 0 , 30");
> while($event = mysql_fetch_row($event_query)){
>
> print("<b><span style=\"font-family: Arial,
> Helvetica,
>
sans-serif;color:#003300;font-size:14px;\">".html_decode($event[5])."</span>
> </b><br>");
> print("<span style=\"font-family: Arial, Helvetica,
>
sans-serif;font-size:12px;\">".html_decode($event[4])."</span><br>");
> print("<span style=\"font-family: Arial, Helvetica,
>
sans-serif;font-size:12px;\">".html_decode($event[2])."</span><hr><p>");
>
> print ( here I would need the list of all files
> associates with the event "
> $eventdetails_query = mysql_query("select filename,
> information from
> eventdetails where event=".$id);"
>
>
> }
> ?>
>
> </code>
>
> Can this be done and what would be the best
> approach?
>
> TIA
>
> Karl-Heinz
>
>
>
> Tracking #: A3E9B485BFDA4A44A6BFCE20A805CA39C3D820DA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php