Changeset 1015 for trunk/include
- Timestamp:
- Jan 27, 2006, 11:40:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r1012 r1015 774 774 775 775 /** 776 * returns the SQL clause from a search identifier 777 * 778 * Search rules are stored in search table as a serialized array. This array 779 * need to be transformed into an SQL clause to be used in queries. 776 * returns search rules stored into a serialized array in "search" 777 * table. Each search rules set is numericaly identified. 780 778 * 781 779 * @param int search_id 782 * @return string783 */ 784 function get_s ql_search_clause($search_id)780 * @return array 781 */ 782 function get_search_array($search_id) 785 783 { 786 784 if (!is_numeric($search_id)) … … 792 790 SELECT rules 793 791 FROM '.SEARCH_TABLE.' 794 WHERE id = '.$ _GET['search'].'792 WHERE id = '.$search_id.' 795 793 ;'; 796 794 list($serialized_rules) = mysql_fetch_row(pwg_query($query)); 797 795 798 $search = unserialize($serialized_rules); 799 800 // echo '<pre>'; 801 // print_r($search); 802 // echo '</pre>'; 803 796 return unserialize($serialized_rules); 797 } 798 799 /** 800 * returns the SQL clause from a search identifier 801 * 802 * Search rules are stored in search table as a serialized array. This array 803 * need to be transformed into an SQL clause to be used in queries. 804 * 805 * @param int search_id 806 * @return string 807 */ 808 function get_sql_search_clause($search_id) 809 { 810 $search = get_search_array($search_id); 811 804 812 // SQL where clauses are stored in $clauses array during query 805 813 // construction
Note: See TracChangeset
for help on using the changeset viewer.