ipwnzphp Posted September 17, 2009 Share Posted September 17, 2009 This mysql/php data is display twice in the options for the drop down. It should only display the results once and not twice. <select name="altcaddy2" id="altcaddy2"> {php} $s_id = session_id(); $checkouts = mysql_query("SELECT * FROM `caddie_checkout_storeage` WHERE checkout_session_id = '$s_id'") or die (mysql_error()); while ($get_checkouts = mysql_fetch_array($checkouts)) { $date_id = $get_checkouts['date_id']; $datezs = mysql_query("SELECT * FROM `caddie_schedule` WHERE status='enable' && schedule_id = '$date_id'") or die (mysql_error()); while ($get_datezs = mysql_fetch_array($datezs)) { $datezss = mysql_query("SELECT DISTINCT member_id FROM `caddie_schedule` WHERE status='enable' && start_date = '$get_datezs[start_date]'") or die (mysql_error()); while ($get_datezss = mysql_fetch_array($datezss)) { $caddie_atl = mysql_query("SELECT * FROM `member` WHERE status='enable' && member_id = '$get_datezss[member_id]'") or die (mysql_error()); $get_caddie_atl = mysql_fetch_array($caddie_atl); $caddie_id = $get_caddie_atl['member_id']; {/php} <option value="{php} echo $caddie_id; {/php}">{php} echo $get_caddie_atl['first_name']; {/php}</option> {php} } } } {/php} </select> Example: <option value="43">Sooners</option> <option value="44">Emerge</option> <option value="45">Panita</option> <option value="43">Sooners</option> <option value="44">Emerge</option> <option value="45">Panita</option> Thanks! Link to comment https://forums.phpfreaks.com/topic/174524-phpmysql-data-displays-twice-help/ Share on other sites More sharing options...
ipwnzphp Posted September 17, 2009 Author Share Posted September 17, 2009 any one? Link to comment https://forums.phpfreaks.com/topic/174524-phpmysql-data-displays-twice-help/#findComment-919851 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.