pedromau Posted April 5, 2007 Share Posted April 5, 2007 Hello people! I'm trying to do something for about 3 days and I really see no way out on this... can be something simple, but I really suck at php... I have this php agenda that uses mysql DB... Then I have a search option that looks for event name, description of the event and date. this is my query $result = @mysql_query("SELECT DATE_FORMAT(event_date, '%d - %m - %Y') as event_time, subject, event_id, local, DAYOFMONTH(event_date) as `day`, MONTH(event_date) as `month`, YEAR(event_date) as `year` FROM calendar_event WHERE DATE_FORMAT(event_date, '%Y') LIKE '%".$this->search."%' OR subject LIKE '%".$this->search."%' OR local LIKE '%".$this->search."%' OR detail LIKE '%".$this->search."%' AND queue_flag = 0 ORDER BY event_date DESC"); What I need to do is to create some links (or list menu) that shows all the events from a year (if I use the search form and look for "2006" all the events from 2006 show up, but I need to have direct links - menus - to list the events from that year). Can someone PLEASE help before I get my grandfather's shotgun?! Thank you! Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/ Share on other sites More sharing options...
AndyB Posted April 5, 2007 Share Posted April 5, 2007 then echo out the retrieved data using standard html to generate a link to show_details.php?id=$id where $id is the calendar_event table record id and show_details.php is a (new) script that displays whatever you want to display about an event Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/#findComment-222044 Share on other sites More sharing options...
pedromau Posted April 5, 2007 Author Share Posted April 5, 2007 Hmmm... I suck at php... ... can you provide a real example so I see what you mean?! Thanks! Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/#findComment-222051 Share on other sites More sharing options...
pedromau Posted April 5, 2007 Author Share Posted April 5, 2007 Please help... this is kindda urgent and I'm starting to freak out! ??? PLEASE help! Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/#findComment-222106 Share on other sites More sharing options...
AndyB Posted April 5, 2007 Share Posted April 5, 2007 So, let's see your code ... the query and the data display you have already working. Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/#findComment-222107 Share on other sites More sharing options...
pedromau Posted April 5, 2007 Author Share Posted April 5, 2007 Yes... the events show up something like this description: 07 - 07 - 2007 - RCA @ Vila do Conde - M.C. Vila do Conde --> date / event / local if I use the search form, and search for "2007" I see only the events for the year 2007... and that exactly what I need, but in a button, or a list menu with the years... You can check the agenda @ http://www.moreagencygroup.com/agenda Thanks for trying to help!!! really! Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/#findComment-222151 Share on other sites More sharing options...
pedromau Posted April 5, 2007 Author Share Posted April 5, 2007 Please?! Link to comment https://forums.phpfreaks.com/topic/45707-create-links-to-show-some-mysql-request/#findComment-222234 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.