Accurax Posted January 4, 2007 Share Posted January 4, 2007 I'm about to start building some search functionality into my site tomorrow morning, now, im pretty sure that i have the basics down, but correct my musins is they are wrong;1) create a form that allows the user to select or de-select search critera and submit it.2) Have an sql querey that covers all of the possible search criteria eg;[code]SELECT user FROM members WHERE hobbies='$hobbies' && fruit='$fruit' ... && ......... && ...... && etc etc etc ....[/code]This is really my first question;Can i us just one sql statement even though some of the search criterai may in fact be left empty in some searches?Will the SQL just ignore these empty variables?Secondly im a little confused as to how i could make my results display accross multiple pages, sat a search querey returned 500 results, id like to show these on 10 consequtive pages of 50 results each .... ive seen this done, but can neither figure it out in my head, or find a cod example on the good ole tinternet.Any and all advice is appreciated guys Link to comment https://forums.phpfreaks.com/topic/32903-search-functions/ Share on other sites More sharing options...
metrostars Posted January 4, 2007 Share Posted January 4, 2007 You have to use the LIMIT function of SQL DO you have MSN? We could chat there. Link to comment https://forums.phpfreaks.com/topic/32903-search-functions/#findComment-153175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.