turbocueca Posted May 6, 2006 Share Posted May 6, 2006 [code]<?php if (isset($_POST['query'])) { $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM usbextreme WHERE name LIKE '%$query%' OR system LIKE '%$query%' OR postedby LIKE '%$query%'"),0); if ($total_results!=0) { echo '<span class="style79">Searched results:</span> <span class="style80">'.$total_results.' - <a href="index.php">Reset</a></span'; } else { echo '<span class="style79">No results</span> - <a href="index.php">Reset</a>'; } } elseif (isset($_POST['select'])) { if ($_POST['select']="today") { $now=date(dmy); $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM usbextreme WHERE ins_date LIKE $now"),0); if ($total_results!=0) { echo '<span class="style79">Filtered results:</span> <span class="style80">'.$total_results.' - <a href="index.php">Reset</a></span>'; } else { if (!isset($_POST['select'])) { echo '<span class="style79">No results</span> - <a href="index.php">Reset</a>'; } } } } else { $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM usbextreme WHERE system LIKE '$filter' OR work_status LIKE '$filter'"),0); if ($total_results!=0) { echo '<span class="style79">Filtered results:</span> <span class="style80">'.$total_results.' - <a href="index.php">Reset</a></span>'; } else { echo '<span class="style79">No results</span> - <a href="index.php">Reset</a>'; } }?> [/code][a href=\"http://infocenter.awardspace.com/inter/ps2ub/index.php\" target=\"_blank\"]http://infocenter.awardspace.com/inter/ps2ub/index.php[/a]If you enter this link, you will find something at the bottom of the page like this "No results - Reset", that shouldn't be there without searching the db or using the filter. For any reason, I'm not being able to make it disappear. Please check the code. Quote Link to comment Share on other sites More sharing options...
turbocueca Posted May 6, 2006 Author Share Posted May 6, 2006 Dont bother replying, I figured out I have many problems in my code that doesn't let this work properly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.