Re: [PHP] How to nest information from different tables.

2004-07-30 Thread Aldwyn
Did your table "event_details" contain a field linked with "event.id" ? if not, you'll need it Maybe I misunderstood what you want, but try this $event_result = mysq_query("SELECT * FROM event_table") or die("Cant catch events"); print(""); while ($eventDb = mysql_fetch_object($event_res

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote: John, Since we never have more than 30 records I don't think it will be necessary to join the tables. Your queries are preforming a join (you're selecting from more than one table with one query, a common reference pointetc.). Check out http://dev.mysql.com/doc/mysql

RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
: John Nichel [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 9:52 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] How to nest information from different tables. Karl-Heinz Schulz wrote: > Thank you, > > > I made one error - I forgot the second table (Thank you Jeremy) > It d

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote: Thank you, I made one error - I forgot the second table (Thank you Jeremy) It didn't like the field "information" in the eventdetails table - it worked after I changed it to "informations" (Thank you John). ..but the result is not what I was trying to achieve. I'm t

RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
details[1]).""); > print(" sans-serif;font-size:12px;\">".html_decode($eventdetails[2]).""); > } > ?> > > > But it generates now for the second query the "is not a valid MySql result" > error. > > TIA > > >

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Jeremy Berthet wrote: You have forgotten one table in your second query, try this : $eventdetails_query = mysql_query("select details, information, file_name from event, eventdetails where event.id = eventdetails.event_id"); Good eyes. ;) -- By-Tor.com It's all about the Rush http://www.by-tor.co

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote: John, "eventdetails" is a table "event_id" is a field in the eventdetails table I want to show all file downloads (information's in table eventdetails) for all events (table name is "event") TIA Okay. What does mysql_error() say? -- By-Tor.com It's all about the Rush http

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread Jeremy Berthet
not a valid MySql result" error. TIA -Original Message- From: zareef ahmed [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 11:57 PM To: Karl-Heinz Schulz; [EMAIL PROTECTED] Subject: Re: [PHP] How to nest information from different tables. Hi, You can use join or make this query

RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
L PROTECTED] Sent: Friday, July 30, 2004 8:17 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] How to nest information from different tables. Karl-Heinz Schulz wrote: > $eventdetails_query = mysql_query("select details, information, file_name > from eventdetails where event.id = eventdetail

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote: $eventdetails_query = mysql_query("select details, information, file_name from eventdetails where event.id = eventdetails.event_id"); What is 'eventdetails.event_id'? Should this be a variable? $eventdetails.event_id? -- By-Tor.com It's all about the Rush http://www.by-to

Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote: But it generates now for the second query the "is not a valid MySql result" error. Echo out mysql_error() after you try to execute the second query. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscrib

RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
d [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 11:57 PM To: Karl-Heinz Schulz; [EMAIL PROTECTED] Subject: Re: [PHP] How to nest information from different tables. Hi, You can use join or make this query as follows $query="select *(or coulmn name) from event, eventdetails wh

Re: [PHP] How to nest information from different tables.

2004-07-29 Thread zareef ahmed
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 -> event

[PHP] How to nest information from different tables.

2004-07-29 Thread Karl-Heinz Schulz
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: ".html_decode($event[