Jump to content


Photo

trying to view parts of table data


  • Please log in to reply
3 replies to this topic

#1 tjhilder

tjhilder
  • Members
  • PipPipPip
  • Advanced Member
  • 136 posts
  • LocationKent, UK

Posted 09 November 2005 - 05:35 AM

I'm trying to create a events page on my site where things are listed by year, month and then in the months section it shows all the events one by one in days.

something like this

-----------------

event year |
event_month |
event_day |  event_title | event status
event_day |  event_title | event status
event_day |  event_title | event status

event year |
event_month |
event_day |  event_title | event status
event_day |  event_title | event status
event_day |  event_title | event status


i figured it was to be displayed like this:
$query = "SELECT * FROM events WHERE event_year='2006'";

but it doesn't work so I guess that idea isn't correct.

any suggestions?

--
TJ


#2 anthrt

anthrt
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 09 November 2005 - 10:03 AM

im not sure if youre doing this already, but you have to actually execute the query.. ex

$event = mysql_query($query);

#3 tjhilder

tjhilder
  • Members
  • PipPipPip
  • Advanced Member
  • 136 posts
  • LocationKent, UK

Posted 09 November 2005 - 10:49 AM

im not sure if youre doing this already, but you have to actually execute the query.. ex

$event = mysql_query($query);

View Post

yea I was already, was just posting the code where I thought it needed changing.


#4 tjhilder

tjhilder
  • Members
  • PipPipPip
  • Advanced Member
  • 136 posts
  • LocationKent, UK

Posted 10 November 2005 - 02:23 PM

I figure it would work like a forum does, take this forum, you have your categories, and then the categories have forums, maybe this is how I am supposed to do this script? but I not sure how I would go about making it as I'm new to MySQL (although I think i'm picking it up fairly quickly.)

any suggestions on what I can do?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users