Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   PHP Webcalendar entry help (http://www.programmingforums.org/showthread.php?t=13587)

MiKuS Jul 18th, 2007 9:56 PM

PHP Webcalendar entry help
 
Hi i downloaded this script and need help with the way i'm pulling up my data, because of the way the script is set up when you add extra fields it does it in a very strange way. i have 3 extra fields (webcal_site_extras) but because of the way this all works it pulls it up like so:

This is the address
1234567 - (phone number)
9 - (cal id)


This is the address
general notes - (general notes)
9 - (cal id)


This is the address
145 a4 - (map ref)
9 - (cal id)

as you can see it just makes 3 entrys instead of modifying the database. how can i combine the tree rows into just one so it would look like:

This is the address
1234567 - (phone number)
general notes - (general notes)
145 a4 - (map ref)
9 - (cal id)

this is the code i'm running:
:

  1.  
  2.  
  3. $sql = ' SELECT webcal_entry.cal_id, webcal_entry.cal_create_by, webcal_entry.cal_date, webcal_entry.cal_time, webcal_entry.cal_duration, webcal_entry.cal_name, webcal_entry.cal_description, webcal_site_extras.cal_id, webcal_site_extras.cal_data, webcal_entry_user.cal_id, webcal_entry_user.cal_login'
  4.         . ' FROM webcal_entry'
  5.         . ' INNER JOIN webcal_site_extras ON ( webcal_entry.cal_id = webcal_site_extras.cal_id )'
  6.         . ' INNER JOIN webcal_entry_user ON ( webcal_entry_user.cal_id = webcal_entry.cal_id )'
  7.         . ' AND ('
  8.         . ' webcal_entry_user.cal_id = webcal_site_extras.cal_id'
  9.         . ' )'
  10.         . ' LIMIT 30 ';
  11. $result = mysql_query($sql, $conn) or die(mysql_error());
  12.  
  13. while ($list = mysql_fetch_array($result)) {
  14.     echo "{$list['cal_name']} <br>";
  15.     echo "{$list['cal_data']} <br>";
  16.     echo "{$list['cal_id']} <br>";
  17.     echo "{$list['cal_description']} <br>";
  18.     echo "<br><br>";



All times are GMT -5. The time now is 12:47 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC