» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 71
0 members and 71 guests
No Members online
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Rimonabant
www.rimonabant-weight-loss.com
Football Betting - best nfl betting promotions at sportsbook.com.
Poker Chips - Clay and composite poker chips for home games.

Register Now! Contact Us

About this Page
This is a discussion on no result from database, then show message within the Nuke 7.x - Modules forums, part of the PHP-Nuke 7.x category; When the code below is executed, it can happen that there was no result. When this happens i want to ...



Go Back   Nukemods Forum » PHP-Nuke 7.x » Nuke 7.x - Modules

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2005, 08:33 PM
Junior Member
 
Join Date: Dec 2004
Posts: 20
no result from database, then show message
When the code below is executed, it can happen that there was no result. When this happens i want to show the user a message that there were no items in the database to show for the upcomming period. How can i do that

Code:
   Opentable();
   $resultpersons = sql_query("SELECT * FROM ".$prefix."_probs_agenda WHERE Datum >= ".date("y-m-d")." ORDER BY Datum", 

$dbi);
   echo "<table border=1>";
   for ($m=0; $m < sql_num_rows($resultpersons, $dbi); $m++) {
Also, The date returned by mysql is in the format Year, Month, Day. I want this to be Day, Month Year. What do i have to do for that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2005, 04:28 AM
Junior Member
 
Join Date: Dec 2004
Posts: 20
This is the solution. if it seems to be incorrect, please say so
Code:
   if (1 > sql_num_rows($resultpersons, $dbi)) {
      echo "Geen items gevonden";
   } else {
      for ($m=0; $m < sql_num_rows($resultpersons, $dbi); $m++) { 
         list($id, $datum, $tijd, $klantid, $description, $addby) = sql_fetch_row($resultpersons, $dbi);
         $resultname = sql_query("SELECT Naam, Voornaam FROM ".$prefix."_probs_klant WHERE id='$klantid'", $dbi);
         list($lastname, $firstname) = sql_fetch_row($resultname, $dbi);
      }
   }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DATABASE, HOW DO I CONFIGURE MY DATABASE I SEE 3 OF THEM lhpnuke Site design 2 05-28-2006 06:08 PM
Site Registration result automtically to activate user zoch10 Nuke 7.x - General 0 07-17-2005 12:51 PM
Result on the forum with fiblack3d ERROR conens Theme packs 5 07-30-2004 09:53 AM
phpbb database converter to Nukemods database palooka Open topics 3 06-15-2003 10:57 AM
new: Splatt Forums database into your phpBB Forums database Martin Purged Topics 2 03-01-2003 07:47 PM


All times are GMT -5. The time now is 01:56 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31