[eluser]Sion[/eluser]
I am having problem displaying data from multiple tables (3) first table has 5 fields (eventID*,
name,
time,
url,
date)
which linked with eventID to 2nd table with 5 fileds
(venuID*,
eventID,
address,
eventUrl,
contactinfo)
now the 3rd table has 4 fields with
event_dayID*,
eventID,
day,
time)
my problem is that eventID is not unique, means same eventID has multiple days (0=sunday, 1=monday...and so on)
Here is my query
function get_xml_data()
{
$this->db->select();
$this->db->from('venue');
$this->db->join('event','event.venueID = venue.venueID');
$this->db->join('event_day','event.eventID = event_day.eventID','right');
$this->db->where('event.dateEnd >= current_date');
$this->db->orderby("eventType","asc");
return $this->db->get();
Here is my view
<?php foreach($xml->result() as $entry): ?>
<item>
<title><?php echo ($entry->name); ?></title>
<link><?php echo site_url('event/detail/' . $entry->eventID) ?></link>
<guid><?php echo site_url('event/detail/' . $entry->eventID) ?></guid>
<dateBegin><?php echo ($entry->dateBegin); ?></dateBegin>
<startTime><?php echo ($entry->time); ?></startTime>
<address><?php echo ($entry->address); ?>
<ticketURL><?php echo xml_convert($entry->url); ?></ticketURL>
<eventDay><?php echo ($entry->day); ?></eventDay>
</item>
<?php endforeach; ?>
It returns same event multiple times with different days in each one. I want to display one event with multiple days like <eventDay>0,1,2,3,4,5</eventDay> what do I need to do? Can anyone help?
I am not sure if I am clear with my problem..