PHP

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentPHP

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old August 10th, 2012, 04:04 PM
erickof erickof is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 1 erickof User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 30 sec
Reputation Power: 0
PHP while loop

Hello everybody, greeting to you all.

my php code below within the while loop appears twice(2 times). PLEASE can any expert programmer tell why and how to make it appear just once. Thanks in advance.

Best Regards,
erickof

include("db_conn.php"); //my db connection

$search_att013=mysql_query("SELECT * FROM attendance WHERE date=CURDATE()") or die("Search error on attendance");
while($records=mysql_fetch_array($search_att013))
{ $member_id_mid2=$records['member_id_mid'];

$search_namesWomtotal023=mysql_query("SELECT * FROM members WHERE sexdb='F' AND mid='$member_id_mid2'") or die("search error on members");

echo 'mysql_num_rows($search_namesWomtotal023)'; //<---THIS RESULT APPEARS TWICE(2TIMES)
}

Reply With Quote
  #2  
Old September 4th, 2012, 03:22 AM
ClickSSL ClickSSL is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Location: Newark, DE, USA
Posts: 11 ClickSSL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m 35 sec
Reputation Power: 0
Facebook MySpace
Thumbs up

hi,

When I test your code I have no any problem to display record 2 times in while loop. If you just enter date and your date available more then one time in your database then display records also more then one time. If you enter date and time in your db and compare date and time within your db field at that main problem is date and time not exact match with your field. So please confirm first you match only date with your db field or you match also date and time with your db field....

I think it's helpful to you ................

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentPHP > PHP while loop


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap