This is a discussion on How to make a Query with diffrent variables, beeing empty or not? within the DB2 forums, part of the Database Server Software category; --> Hello all, im new here so bare with me This is what i have: $queryzoeken = ("SELECT SNR, SNM, ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello all, im new here so bare with me This is what i have: $queryzoeken = ("SELECT SNR, SNM, SOMS, SVER, SSER, SLEV, SLIC, SLM FROM software WHERE SNR = $array[snr] (!!if $array[snr is filled in then also look use it in the query!!) AND snm = $array[snr]"); $result = mysql_query( $queryzoeken); Explanation: User inputs one or more of these variables: $array[snr] $array[snm] etc. I need the server to look up the query with tha variables the use has filled in, and leave out the ones that are empty. Can anyone help me out with this? |