Help Pub Crawl display
PUB TABLEEVENT TABLE |p_id|pub_name |address ||eventid|date |host_id| |13 |John Barleycorn's |1800 N. Lincoln ||321|2001-01-27 | 32| |26 |Harry Carry's |300 N. Dearborn ||198|2001-02-21 | 0 | |67 |Cubby Bear|3500 N. Clark ||369|2001-02-23 | 39 | |45 |Wrightwood Tap|600 Wrightwood | |21 |River Shannon |3500 N. Clark | HOST TABLE STOP TABLE |host_id|host_name |phone | |event_id|p_id |sequence || |39 |Pamela Anderson|562-698-5473 | |321 | 13 | 2 | |51 |Tom Cruise |212-369-2391 | |321 | 67 | 1 | |32 |Sammy Sosa |312-365- | |321 | 26 | 3 | |198 | 21 | 1 | |198 | 45 | 2 | |198 | 67 | 3 | |369 | 13 | 1 | |369 | 21 | 2 | |369 | 45 | 3 | I am trying to do a select that would allow me to display the following: ** UPCOMING PUB CRAWLS ** Event ID Beginning Ending DateHosted By 321 Cubby Bear Harry Carry's 01-27-01Sammy Sosa 198 River Shannon Cubby Bear 02-21-01unassigned 369 John Barleycorn Wrightwood Tap 02-23-01Pamela Anderson My select statement below is not cutting it and I beginning to wonder if what I want to do can be done with a select statement or a join. If it can some help me figure out how. If it can' can someone suggest some other way of going about it. SELECT e.eventid, e.date, e.host_id, p.name h.name FROM event e, pub p, host h, stop s WHERE e.eventid=s.event_id AND s.p_id=p.p_id AND e.host_id=h.host_id - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Help Pub Crawl display
Your Query is making me thirsty ;-) Unfortunately your tables got garbled so I had to improvise. Next time don't paste the tables beside each other... Also, I'm not sure if I understand your problem or what you are trying to accmplish. Are you trying to de-normalize your data and display the Beggining and Ending Pubs for each stop? - Scott I am trying to do a select that would allow me to display the following: ** UPCOMING PUB CRAWLS ** Event IDBeginning Ending DateHosted By 321 Cubby Bear Harry Carry's 01-27-01Sammy Sosa 198 River Shannon Cubby Bear 02-21-01unassigned 369 John Barleycorn Wrightwood Tap 02-23-01Pamela Anderson My select statement below is not cutting it and I beginning to wonder if what I want to do can be done with a select statement or a join. If it can some help me figure out how. If it can' can someone suggest some other way of going about it. SELECT e.eventid, e.date, e.host_id, p.name h.name FROM event e, pub p, host h, stop s WHERE e.eventid=s.event_id AND s.p_id=p.p_id AND e.host_id=h.host_id - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help Pub Crawl display
Thanks for your reply. Believe I'm thristy two and if I ever get this thing to work I'm going to pub crawl all the way home. What I am trying to do is display the beginning and ending points for each pub crawl effedtively leaving out any intermediate stops so that the summary of the pub craw occupies only one row of the display. In addition, the diaplay needs to pickup various other pieces of data such as the hosts name and the events date. What seems to be making it difficult is grabbing only the begining and ending points of the crawl. I appreciate you help. Richard Scott Gerhardt wrote: Your Query is making me thirsty ;-) Unfortunately your tables got garbled so I had to improvise. Next time don't paste the tables beside each other... Also, I'm not sure if I understand your problem or what you are trying to accmplish. Are you trying to de-normalize your data and display the Beggining and Ending Pubs for each stop? - Scott I am trying to do a select that would allow me to display the following: ** UPCOMING PUB CRAWLS ** Event IDBeginning Ending DateHosted By 321 Cubby Bear Harry Carry's 01-27-01Sammy Sosa 198 River Shannon Cubby Bear 02-21-01unassigned 369 John Barleycorn Wrightwood Tap 02-23-01Pamela Anderson My select statement below is not cutting it and I beginning to wonder if what I want to do can be done with a select statement or a join. If it can some help me figure out how. If it can' can someone suggest some other way of going about it. SELECT e.eventid, e.date, e.host_id, p.name h.name FROM event e, pub p, host h, stop s WHERE e.eventid=s.event_id AND s.p_id=p.p_id AND e.host_id=h.host_id - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php