Howdy all! I've built a page in Dreamweaver MX that uses PHP for scripting. I can get data out of my mysql database but I need to be able to search for wildcards. currently it only matches 100% exact queries. Below is the code that is at the beggining of the PHP page. ----------- $varSort_search1 = "%"; if (isset($HTTP_POST_VARS["Sort"])) { $varSort_search1 = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS["Sort"] : addslashes($HTTP_POST_VARS["Sort"]); } $varText_search1 = "%"; if (isset($HTTP_POST_VARS["Text"])) { $varText_search1 = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS["Text"] : addslashes($HTTP_POST_VARS["Text"]); } mysql_select_db($database_CATCH, $CATCH); $query_search1 = sprintf("SELECT * FROM secureworks WHERE %s LIKE '%s'", $varSort_search1,$varText_search1); $search1 = mysql_query($query_search1, $CATCH) or die(mysql_error()); $row_search1 = mysql_fetch_assoc($search1); $totalRows_search1 = mysql_num_rows($search1);
------------- Does anyone have any ideas? Thanks, John Cole, TCISA Disclaimer: The information contained in this email is proprietary and confidential. It is intended solely for the use of the person identified and intended as the recipient. This document is forwarded to you in such a form (E-mail) that LGEFCU cannot guarantee the completeness and/or correctness of its contents and information. If you have received this E-mail message in error, please notify us immediately. Please also delete this document from your computer. This document may not be reproduced, copied, distributed, published, modified, or furnished to third parties, without the prior written consent of LGEFCU. LGEFCU specifically disclaims any responsibility or liability for any personal information or opinions of the author expressed in this email. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php