Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 18th, 2007, 9:56 PM   #1
MiKuS
Programmer
 
Join Date: Jun 2007
Posts: 92
Rep Power: 2 MiKuS is on a distinguished road
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:
php Syntax (Toggle Plain Text)
  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>";
MiKuS is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Php with Sun Java System Application Server Platform lucifer PHP 0 Jun 7th, 2007 4:03 AM
Classes in PHP kruptof PHP 9 May 11th, 2007 9:44 PM
Bind <Key-Return> to an Entry satguy Other Scripting Languages 2 Aug 1st, 2005 12:17 PM
Tk Data Entry Dietrich Python 1 Jul 23rd, 2005 8:36 AM
A random entry from MYSQL database scorpiosage PHP 4 Jan 12th, 2005 1:32 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:55 PM.

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