Jump to content

Create links to show some mysql request


pedromau

Recommended Posts

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

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

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! :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.