girlzz Posted August 11, 2008 Share Posted August 11, 2008 hello sir.. can help me please..how to filter 2 data in one search??? i want to make searching according to s_code and group... the s_code work but the group not be filter... can anybody help me...?? Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/ Share on other sites More sharing options...
bluejay002 Posted August 11, 2008 Share Posted August 11, 2008 please post your query so we can check it. Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/#findComment-613282 Share on other sites More sharing options...
girlzz Posted August 11, 2008 Author Share Posted August 11, 2008 $colname_mass = "-1"; if (isset($_GET['s_code'])) { $colname_mass = $_GET['s_code']; } mysql_select_db($database_mas, $mas); $query_mass = sprintf("SELECT * FROM medic_registered_course WHERE s_code = %s", GetSQLValueString($colname_mass, "text")); $mass = mysql_query($query_mass, $mas) or die(mysql_error()); $row_mass = mysql_fetch_assoc($mass); $totalRows_mass = mysql_num_rows($mass); Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/#findComment-613284 Share on other sites More sharing options...
bluejay002 Posted August 11, 2008 Share Posted August 11, 2008 mmm... can you post the actual query instead? am kinda lazy apprehending codes and all . also, can you post the table structure and the filtering methods (the fields connected to)? thanks, jay Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/#findComment-613286 Share on other sites More sharing options...
girlzz Posted August 11, 2008 Author Share Posted August 11, 2008 sir, i just had this coding for filter... i'm want to filter s_code and group from medic_registered_course... can you give me more detail want you want to see? Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/#findComment-613300 Share on other sites More sharing options...
fenway Posted August 11, 2008 Share Posted August 11, 2008 I don't see two conditions... and we want you to echo $query_mass. Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/#findComment-614096 Share on other sites More sharing options...
bluejay002 Posted August 12, 2008 Share Posted August 12, 2008 yes, the actual query being submitted to mysql, not the php code. also, if you can post the structure of that table, please post it to, so we may know what to change in your query just in case. Quote Link to comment https://forums.phpfreaks.com/topic/119099-filter/#findComment-614293 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.